harmonic.mz.entries
Class NodeSetEntry

java.lang.Object
  |
  +--HWPanel
        |
        +--harmonic.mz.gui.ValueEntry
              |
              +--harmonic.mz.entries.NodeSetEntry
All Implemented Interfaces:
java.awt.event.ComponentListener, Documentable, java.util.EventListener, NodeListener, SelectionListener, harmonic.viewer3D.Task, harmonic.viewer3D.event.TaskListener

public class NodeSetEntry
extends ValueEntry
implements SelectionListener, harmonic.viewer3D.event.TaskListener

GUI widget for entering a selection set of DataNode's.

See Also:
Serialized Form

Nested Class Summary
 class NodeSetEntry.ExpandSection
           
 
Constructor Summary
NodeSetEntry()
          Constructs a NodeSetEntry
NodeSetEntry(java.lang.String _label, java.lang.Object listener, java.lang.String callback)
          Constructs a NodeSetEntry
NodeSetEntry(java.lang.String label, java.lang.Object listener, java.lang.String callback, java.util.Vector selectionSet)
          Constructs a NodeSetEntry
 
Method Summary
 void beginEntry(harmonic.viewer3D.Task parentTask)
          Starts input.
 void cancelEntry()
          Called when entry or thing owning entry is canceled, as the elements of the task tree are canceled.
 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 finishTask()
          Implements Task by calling finishEntry(), and sending events
 void format(int w, int h)
           
 void formatTall(int w, int h)
           
 void formatWide(int w, int h)
           
 java.awt.Dimension getEntrySize()
          Override to return the size of the specialized value entry controls.
 ModelNode[] getSelection()
          Returns selection set.
 Selector getSelector()
           
 ShapeNode[] getShapeSelection()
          Returns selection set.
 void init()
          Called when entry is posted for the first time
 void makeUI()
           
 void onAll()
           
 void onNone()
           
 void onPartMode(java.awt.event.ItemEvent e)
           
 void onPickMode(java.awt.event.ItemEvent e)
           
 void onPolygon()
           
 void onRemove()
           
 void onShapeSelection(java.awt.event.ItemEvent e)
           
 void onSubsetList(java.awt.event.ItemEvent e)
           
 void onText(java.awt.event.TextEvent e)
           
 void selectionChanged(SelectionEvent event)
          Selection has changed.
 void setExactCount(int n)
          Set exact count requirement.
 void setExclude(ShapeNode[] exclude)
          Sets reference comparison exclusion filter.
 void setField(ModelNode node)
           
 void setFilter(java.lang.String[] filter)
          Sets type filter.
 void setInclude(ShapeNode[] include)
          Sets reference comparison inclusion filter.
 void setMinCount(int n)
          Set minimum count requirement.
 void setPickInvisible(boolean b)
          Set pick invisible switch in selector.
 void setPickMode(int pickMode)
          Set pick mode in selector.
 void setSelection(java.lang.Object[] set)
          Sets selection set.
 void setSelection(java.util.Vector s)
          Sets selection set.
 void setStaticSelector(Selector s)
           
 void setSubsetList(java.util.Vector s)
           
 void showTentativeInBox(ModelNode niw)
           
 void taskStateChanged(harmonic.viewer3D.event.TaskEvent event)
           
static void updateActive()
           
 void updateDialogContenseFromSelection()
           
 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, assignFromReadout, beginTask, cancelTask, componentHidden, componentMoved, componentResized, componentShown, contractIcon, echoFieldChange, expandCheck, expandIcon, getField, getInstanceURL, getPreferredSize, getTaskName, getTypeURL, highlight, initReadout, innerChange, isActive, isDoingTask, isExpanded, monologFinished, mousePressed, nodeChanged, notifyListeners_ValueChanged, notifyListeners, onSettingsButton, 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
 

Constructor Detail

NodeSetEntry

public NodeSetEntry()
Constructs a NodeSetEntry


NodeSetEntry

public NodeSetEntry(java.lang.String _label,
                    java.lang.Object listener,
                    java.lang.String callback)
Constructs a NodeSetEntry


NodeSetEntry

public NodeSetEntry(java.lang.String label,
                    java.lang.Object listener,
                    java.lang.String callback,
                    java.util.Vector selectionSet)
Constructs a NodeSetEntry

Parameters:
label - Label to draw
listener - Listener to send ObjectEvents to
callback - Listeners callback, declared as fnname(EntryEvent)
Method Detail

setStaticSelector

public void setStaticSelector(Selector s)

getSelector

public Selector getSelector()

setSubsetList

public void setSubsetList(java.util.Vector s)

setExclude

public void setExclude(ShapeNode[] exclude)
Sets reference comparison exclusion filter. (NOT these)


setFilter

public void setFilter(java.lang.String[] filter)
Sets type filter. (ONLY these)


setInclude

public void setInclude(ShapeNode[] include)
Sets reference comparison inclusion filter. (ONLY these)


setMinCount

public void setMinCount(int n)
Set minimum count requirement.


setExactCount

public void setExactCount(int n)
Set exact count requirement.


setPickMode

public void setPickMode(int pickMode)
Set pick mode in selector.


setPickInvisible

public void setPickInvisible(boolean b)
Set pick invisible switch in selector.


setSelection

public void setSelection(java.util.Vector s)
Sets selection set.


setSelection

public void setSelection(java.lang.Object[] set)
Sets selection set.


getSelection

public ModelNode[] getSelection()
Returns selection set.


getShapeSelection

public ShapeNode[] getShapeSelection()
Returns selection set.


setField

public void setField(ModelNode node)
Overrides:
setField in class ValueEntry

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

selectionChanged

public void selectionChanged(SelectionEvent event)
Description copied from interface: SelectionListener
Selection has changed.

Specified by:
selectionChanged in interface SelectionListener

makeUI

public void makeUI()

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

format

public void format(int w,
                   int h)

formatWide

public void formatWide(int w,
                       int h)

formatTall

public void formatTall(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

init

public void init()
Description copied from class: ValueEntry
Called when entry is posted for the first time

Overrides:
init in class ValueEntry

fillListBox

public void fillListBox()

beginEntry

public void beginEntry(harmonic.viewer3D.Task parentTask)
Starts input. Starts a Selector. If there is a selection set already in the default selector this set is used and input is over. Other wise, the input is gathered up and returned via an EntryEvent.

Overrides:
beginEntry in class ValueEntry

finishTask

public void finishTask()
Description copied from class: ValueEntry
Implements Task by calling finishEntry(), and sending events

Specified by:
finishTask in interface harmonic.viewer3D.Task
Overrides:
finishTask in class ValueEntry

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

cancelEntry

public void cancelEntry()
Description copied from class: ValueEntry
Called when entry or thing owning entry is canceled, as the elements of the task tree are canceled. Do listener deregistration and remove any objects from viewport.

Overrides:
cancelEntry in class ValueEntry

cleanTask

public void cleanTask()
Specified by:
cleanTask in interface harmonic.viewer3D.Task

onShapeSelection

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

onSubsetList

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

showTentativeInBox

public void showTentativeInBox(ModelNode niw)

updateDialogContenseFromSelection

public void updateDialogContenseFromSelection()

updateActive

public static void updateActive()

onText

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

onPartMode

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

onPickMode

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

taskStateChanged

public void taskStateChanged(harmonic.viewer3D.event.TaskEvent event)
Specified by:
taskStateChanged in interface harmonic.viewer3D.event.TaskListener

onPolygon

public void onPolygon()

onNone

public void onNone()

onAll

public void onAll()

onRemove

public void onRemove()