com.virtuosotechnologies.lib.pane
Interface PaneController

All Superinterfaces:
PropertySet, RequestablePropertySet

public interface PaneController
extends RequestablePropertySet

Controller for a pane. This interface provides both a view of various properties of the pane, and a way to request changes to those properties. Not all PaneContainers will provide all these properties. Getting a property that is not provided by the PaneContainer will yield null. The semantics of changing property values is also PaneContainer-dependent. See the comments on RequestablePropertySet for more information.


Field Summary
static ClassConstrainedKey PANE_FOCUSED
          Property key for whether the pane is focused.
static ClassConstrainedKey PANE_JCOMPONENT
          Property key for the pane JComponent.
static ClassConstrainedKey PANE_LOCATION
          Property key for the position of the pane.
static ClassConstrainedKey PANE_MAXIMIZED
          Property key for whether the pane is maximized.
static ClassConstrainedKey PANE_MENUBAR
          Property key for the pane menu bar.
static ClassConstrainedKey PANE_MINIMIZED
          Property key for whether the pane is minimized.
static ClassConstrainedKey PANE_MODIFIED
          Property key for whether the pane is marked as modified.
static ClassConstrainedKey PANE_OPEN
          Property key for whether the pane is open.
static ClassConstrainedKey PANE_SIZE
          Property key for the size of the pane.
static ClassConstrainedKey PANE_TITLE
          Property key for the pane title.
 
Method Summary
 void addPaneClosingListener(PaneClosingListener listener)
          Add a PaneClosingListener.
 boolean isClosingVetoable()
          Returns true if closes are vetoable (that is, if it is okay to throw EventAbortedException from PaneClosingListeners).
 void removePaneClosingListener(PaneClosingListener listener)
          Remove a PaneClosingListener.
 boolean requestClose()
          Request the pane be closed.
 
Methods inherited from interface com.virtuosotechnologies.lib.container.RequestablePropertySet
requestPutValue, requestResetValue
 
Methods inherited from interface com.virtuosotechnologies.lib.container.PropertySet
addPropertySetListener, getDefaultValue, getValue, removePropertySetListener
 

Field Detail

PANE_JCOMPONENT

public static final ClassConstrainedKey PANE_JCOMPONENT
Property key for the pane JComponent. Class is JComponent.


PANE_MENUBAR

public static final ClassConstrainedKey PANE_MENUBAR
Property key for the pane menu bar. Class is CommandNode. If the CommandNode has container flavor, one menu is created. If the CommandNode has group flavor, multiple menus are created.


PANE_TITLE

public static final ClassConstrainedKey PANE_TITLE
Property key for the pane title. Class is String.


PANE_OPEN

public static final ClassConstrainedKey PANE_OPEN
Property key for whether the pane is open. Class is Boolean.


PANE_FOCUSED

public static final ClassConstrainedKey PANE_FOCUSED
Property key for whether the pane is focused. Class is Boolean.


PANE_SIZE

public static final ClassConstrainedKey PANE_SIZE
Property key for the size of the pane. Class is Size2D.


PANE_LOCATION

public static final ClassConstrainedKey PANE_LOCATION
Property key for the position of the pane. Class is Location2D.


PANE_MODIFIED

public static final ClassConstrainedKey PANE_MODIFIED
Property key for whether the pane is marked as modified. Class is Boolean.


PANE_MAXIMIZED

public static final ClassConstrainedKey PANE_MAXIMIZED
Property key for whether the pane is maximized. Class is Boolean.


PANE_MINIMIZED

public static final ClassConstrainedKey PANE_MINIMIZED
Property key for whether the pane is minimized. Class is Boolean.

Method Detail

requestClose

public boolean requestClose()
Request the pane be closed. This should have the same effect as requesting the property change of PANE_OPEN to Boolean.FALSE, except it returns a value specifying whether the property change was accepted or vetoed.

Returns:
true if the request was successful, or false if it was vetoed.

isClosingVetoable

public boolean isClosingVetoable()
Returns true if closes are vetoable (that is, if it is okay to throw EventAbortedException from PaneClosingListeners).

Returns:
true if closes are vetoable, or false if not

addPaneClosingListener

public void addPaneClosingListener(PaneClosingListener listener)
Add a PaneClosingListener. These listeners are notified before a pane is closed and can veto the close by throwing EventAbortedException. Note that some PaneContainers may not allow closes to be vetoed. (They should identify themselves by returning false from isClosingVetoable().) If a listener throws EventAbortedException when closes are not vetoable, the results are undefined and may involve the throwing of a RuntimeException.

Parameters:
listener - new listener

removePaneClosingListener

public void removePaneClosingListener(PaneClosingListener listener)
Remove a PaneClosingListener.

Parameters:
listener - listener to remove