harmonic.mz.entries
Class FileEntry

java.lang.Object
  |
  +--HWPanel
        |
        +--harmonic.mz.gui.ValueEntry
              |
              +--harmonic.mz.entries.FileEntry
All Implemented Interfaces:
java.awt.event.ComponentListener, Documentable, java.util.EventListener, NodeListener, harmonic.viewer3D.Task
Direct Known Subclasses:
ImageEntry

public class FileEntry
extends ValueEntry

GUI wiget for setting a filename. This has a file name text box, a file listing box, a directory box... your basic file selector.

See Also:
Serialized Form

Field Summary
 boolean bDirectory
           
 boolean bSave
           
static int FORMAT_POPUP
           
static int FORMAT_TALL
           
static int FORMAT_WIDE
           
 
Constructor Summary
FileEntry(java.lang.String _label, java.lang.Object listener, java.lang.String callback, java.lang.String val)
          Constructs an FileEntry
FileEntry(java.lang.String _label, java.lang.String val)
          Constructs an FileEntry
 
Method Summary
 void _assignFromReadout()
           
 void assignFromReadout()
          Override to assign value from readout.
 void beginEntry(harmonic.viewer3D.Task parentTask)
          Override to begin collecting input from user.
 void cleanTask()
           
 void contract()
          Shrink to small size.
 void expand()
          Expand to full size.
 void fillListBox()
           
 void finishEntry()
          Called when entry is properly finished.
 void format(int w, int h)
           
 java.awt.Dimension getEntrySize()
          Override to return the size of the specialized value entry controls.
 java.lang.String getFilename()
          Returns filename value.
 void makeValueUI()
           
 void onDirBox(java.awt.event.TextEvent e)
           
 void onFileBox(java.awt.event.TextEvent e)
           
 void onFilterBox(java.awt.event.TextEvent e)
           
 void onListBox(java.awt.event.ItemEvent _e)
           
 void onPopupButton()
           
 void onRecentDir(java.awt.event.ItemEvent e)
           
 void onRecentFile(java.awt.event.ItemEvent e)
           
 void onSaveDir()
           
 void onSettingsButton(java.awt.event.ItemEvent e)
           
 void setField(ModelNode f)
          Sets field to effect.
 void setFilename(java.lang.String filename)
          Sets filename value.
 void setFormat(int f)
           
 void setPathAndExt(java.lang.String path, java.lang.String extention)
          Sets start path and extension.
 void updateField()
          This is called by notifyListeners we have a EntryEvent.VALUE_CHANGED.
 
Methods inherited from class harmonic.mz.gui.ValueEntry
_notifyListeners_, add, addEntryListener, aquireInput, beginTask, cancelEntry, cancelTask, componentHidden, componentMoved, componentResized, componentShown, contractIcon, echoFieldChange, expandCheck, expandIcon, finishTask, getField, getInstanceURL, getPreferredSize, getTaskName, getTypeURL, highlight, init, initReadout, innerChange, isActive, isDoingTask, isExpanded, monologFinished, mousePressed, nodeChanged, notifyListeners_ValueChanged, notifyListeners, removeEntryListener, savePrev, setDocURL, setInnerChange, setValue, transferListener, unlinkField, validateUISettings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bSave

public boolean bSave

bDirectory

public boolean bDirectory

FORMAT_TALL

public static final int FORMAT_TALL
See Also:
Constant Field Values

FORMAT_WIDE

public static final int FORMAT_WIDE
See Also:
Constant Field Values

FORMAT_POPUP

public static final int FORMAT_POPUP
See Also:
Constant Field Values
Constructor Detail

FileEntry

public FileEntry(java.lang.String _label,
                 java.lang.String val)
Constructs an FileEntry

Parameters:
val - Initial file value (absolute path)

FileEntry

public FileEntry(java.lang.String _label,
                 java.lang.Object listener,
                 java.lang.String callback,
                 java.lang.String val)
Constructs an FileEntry

Parameters:
listener - Listener to send FileEvents to
callback - Listeners callback, declared as fnname(FileEvent)
val - Initial file value (absolute path)
Method Detail

setPathAndExt

public void setPathAndExt(java.lang.String path,
                          java.lang.String extention)
Sets start path and extension.


setField

public void setField(ModelNode f)
Sets field to effect.

Overrides:
setField in class ValueEntry

setFilename

public void setFilename(java.lang.String filename)
Sets filename value.


getFilename

public java.lang.String getFilename()
Returns filename value.


setFormat

public void setFormat(int f)

updateField

public void updateField()
Description copied from class: ValueEntry
This is called by notifyListeners we have a EntryEvent.VALUE_CHANGED. It is a good place to insert code that updates a data nodes value from this. The policy is to update the field if it is known, rather than expecting a field to update it self by adding itself as a EntryListener. The caller of this changes the transientness of the field to match the EntryEvent.FINAL/INCREMENTAL flag.

Overrides:
updateField in class ValueEntry

makeValueUI

public void makeValueUI()

format

public void format(int w,
                   int h)

getEntrySize

public java.awt.Dimension getEntrySize()
Description copied from class: ValueEntry
Override to return the size of the specialized value entry controls.

Overrides:
getEntrySize in class ValueEntry

beginEntry

public void beginEntry(harmonic.viewer3D.Task parentTask)
Description copied from class: ValueEntry
Override to begin collecting input from user. This may simply set the keyboard focus to a inner window, or if could register a mouse listener with the viewports, or it may create a Selector and start selecting objects. Be sure to call super.aquireInput().

Overrides:
beginEntry in class ValueEntry

onSettingsButton

public void onSettingsButton(java.awt.event.ItemEvent e)
Overrides:
onSettingsButton in class ValueEntry

onPopupButton

public void onPopupButton()

expand

public void expand()
Description copied from class: ValueEntry
Expand to full size. Default does nothing. There are no assumptions built into how the expand is accomplished, but a general pattern would be to add child components, calling reformat() when finished. These functions (expand() and contract()) provide users of ValueEntries to handle these ideas generally.

Overrides:
expand in class ValueEntry

contract

public void contract()
Description copied from class: ValueEntry
Shrink to small size.

Overrides:
contract in class ValueEntry

onSaveDir

public void onSaveDir()

fillListBox

public void fillListBox()

onListBox

public void onListBox(java.awt.event.ItemEvent _e)

_assignFromReadout

public void _assignFromReadout()

assignFromReadout

public void assignFromReadout()
Description copied from class: ValueEntry
Override to assign value from readout. Called by InputEntrySequence when next value is requested.

Overrides:
assignFromReadout in class ValueEntry

onFileBox

public void onFileBox(java.awt.event.TextEvent e)

onFilterBox

public void onFilterBox(java.awt.event.TextEvent e)

onDirBox

public void onDirBox(java.awt.event.TextEvent e)

onRecentFile

public void onRecentFile(java.awt.event.ItemEvent e)

onRecentDir

public void onRecentDir(java.awt.event.ItemEvent e)

finishEntry

public void finishEntry()
Description copied from class: ValueEntry
Called when entry is properly finished. Do listener deregistration and remove any objects from viewport.

Overrides:
finishEntry in class ValueEntry

cleanTask

public void cleanTask()