UniVista.support
Interface VariableUI

All Known Implementing Classes:
VariableDisplay

public interface VariableUI

implemented by subclasses of Variable that can implement a user interface for viewing, editing, and changing values


Method Summary
 void accept()
          called to make the Variable internals accurately reflect the UI
 void destroyUI()
          destroy the UI
 java.awt.Rectangle getBounds()
          return the current bounds of the UI element
 java.awt.Rectangle getPreferredBounds()
          return the recommended bounds for the UI element.
 java.awt.Dimension getPreferredSize()
          Returns the width and height suggested.
 javax.swing.JComponent getUI()
          return the UI element or container for the Variable
 void reset()
          called to explicitly revert the UI back to the internal values
 void revert()
          called to reset the Variable internals to negate any changes that may have been made by the UI
 void setDesignMode(boolean isDesigning)
          informs the variable whether the UI is being utilized in design mode
 void setReadOnly(boolean isReadOnly)
          informs the variable wheter it should make its UI read-only or not
 javax.swing.JComponent setupUI(java.awt.Rectangle bounds)
          construct the UI element for the Variable using the passed bounds for sizing it
 

Method Detail

accept

public void accept()
called to make the Variable internals accurately reflect the UI

destroyUI

public void destroyUI()
destroy the UI

getBounds

public java.awt.Rectangle getBounds()
return the current bounds of the UI element

getPreferredBounds

public java.awt.Rectangle getPreferredBounds()
return the recommended bounds for the UI element. We'll use a width or height of -1 to indicate that that bounds is flexible.

getPreferredSize

public java.awt.Dimension getPreferredSize()
Returns the width and height suggested.

getUI

public javax.swing.JComponent getUI()
return the UI element or container for the Variable

reset

public void reset()
called to explicitly revert the UI back to the internal values

revert

public void revert()
called to reset the Variable internals to negate any changes that may have been made by the UI

setDesignMode

public void setDesignMode(boolean isDesigning)
informs the variable whether the UI is being utilized in design mode

setReadOnly

public void setReadOnly(boolean isReadOnly)
informs the variable wheter it should make its UI read-only or not

setupUI

public javax.swing.JComponent setupUI(java.awt.Rectangle bounds)
construct the UI element for the Variable using the passed bounds for sizing it
Returns:
UI element cast to a Component for passing to an add()