UniVista.beans
Class ArrayVariableDisplay

java.lang.Object
  |
  +--UniVista.beans.VariableDisplay
        |
        +--UniVista.beans.ArrayVariableDisplay
All Implemented Interfaces:
java.util.EventListener, java.beans.PropertyChangeListener, java.io.Serializable, VariableUI

public class ArrayVariableDisplay
extends VariableDisplay

Used to display and edit arrays of UniVista objects.

See Also:
Serialized Form

Inner Class Summary
protected  class ArrayVariableDisplay.ArrayVariableTableModel
          the table model for a variable object.
protected  class ArrayVariableDisplay.DimensionComboBoxListener
           
protected  class ArrayVariableDisplay.DimensionFieldListener
           
protected  class ArrayVariableDisplay.VariableCellEditor
          the cell editor for the table.
protected  class ArrayVariableDisplay.VariableCellRenderer
          the cell renderer for the table.
 
Field Summary
protected  ArrayWrapper theVal
           
 
Fields inherited from class UniVista.beans.VariableDisplay
changeSupport, label, name, panel
 
Constructor Summary
ArrayVariableDisplay()
          Default constructor.
 
Method Summary
 void accept()
          Change the value inside the ArrayVariable to reflect the UI.
 java.lang.Object clone()
          adds replication of the array
 void destroyOptionsUI()
          ensure the options UI is destroyed
 void destroyUI()
          clean up the UI
 void duplicate(ArrayVariableDisplay toDup)
          adds duplication of the array object
 boolean equals(java.lang.Object obj)
          adds comparison of arrays
 java.awt.Rectangle getPreferredBounds()
          suggest the bounds for the UI element
 int getSize()
           
 java.lang.Object getValue()
          exports the array value
 java.lang.Object getValue(int loc, int dim)
           
 void reset()
          redraw the UI element to reflect the internal values of the variable
 void revert()
          do any special processing needed to reject any temporary changes of the UI
 void setReadOnly(boolean isReadOnly)
          flip the UI into display mode
 void setSize(int d)
           
 javax.swing.JComponent setupUI(java.awt.Rectangle bounds)
          construct the UI element for displaying and editing the array values
 void setValue(java.lang.Object value)
          Change the data.
 void setValue(java.lang.Object obj, int loc, int dim)
           
protected  void updateTable()
          create the table and insert it into the content pane
 
Methods inherited from class UniVista.beans.VariableDisplay
addPropertyChangeListener, getBounds, getLabelPosition, getLabelText, getName, getPreferredSize, getUI, isLabelVisible, propertyChange, removePropertyChangeListener, setDesignMode, setLabelPosition, setLabelText, setLabelVisible, setName, setToolTipEnabled, setToolTipText, validate
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theVal

protected ArrayWrapper theVal
Constructor Detail

ArrayVariableDisplay

public ArrayVariableDisplay()
Default constructor.
Method Detail

setSize

public void setSize(int d)

accept

public void accept()
Change the value inside the ArrayVariable to reflect the UI.
See Also:
VariableUI

clone

public java.lang.Object clone()
adds replication of the array
Overrides:
clone in class java.lang.Object

destroyOptionsUI

public void destroyOptionsUI()
ensure the options UI is destroyed
See Also:
VariableOptionsUI

destroyUI

public void destroyUI()
clean up the UI
Overrides:
destroyUI in class VariableDisplay
See Also:
VariableUI

duplicate

public void duplicate(ArrayVariableDisplay toDup)
adds duplication of the array object

equals

public boolean equals(java.lang.Object obj)
adds comparison of arrays
Overrides:
equals in class java.lang.Object

getPreferredBounds

public java.awt.Rectangle getPreferredBounds()
suggest the bounds for the UI element
Overrides:
getPreferredBounds in class VariableDisplay
See Also:
VariableUI

getValue

public java.lang.Object getValue()
exports the array value
Overrides:
getValue in class VariableDisplay
See Also:
TypedVariable

reset

public void reset()
redraw the UI element to reflect the internal values of the variable
See Also:
VariableUI

revert

public void revert()
do any special processing needed to reject any temporary changes of the UI
See Also:
VariableUI

setReadOnly

public void setReadOnly(boolean isReadOnly)
flip the UI into display mode
Overrides:
setReadOnly in class VariableDisplay
See Also:
VariableUI

setupUI

public javax.swing.JComponent setupUI(java.awt.Rectangle bounds)
construct the UI element for displaying and editing the array values
See Also:
VariableUI

setValue

public void setValue(java.lang.Object value)
              throws java.lang.Exception
Change the data.
Overrides:
setValue in class VariableDisplay

getValue

public java.lang.Object getValue(int loc,
                                 int dim)

setValue

public void setValue(java.lang.Object obj,
                     int loc,
                     int dim)

getSize

public int getSize()

updateTable

protected void updateTable()
create the table and insert it into the content pane