|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.umd.cs.piccolo.PNode
org.simbrain.network.nodes.ScreenElement
public abstract class ScreenElement
ScreenElement extends a Piccolo node with property change, tool tip, property dialog, and ... support.
Subclasses of this class must implement the following methods:
protected abstract boolean isSelectable(); protected abstract boolean showSelectionHandle(); protected abstract boolean isDraggable(); protected abstract boolean hasToolTipText(); protected abstract String getToolTipText(); protected abstract boolean hasContextMenu(); protected abstract JPopupMenu getContextMenu(); protected abstract boolean hasPropertyDialog(); protected abstract JDialog getPropertyDialog();
| Field Summary |
|---|
| Fields inherited from class edu.umd.cs.piccolo.PNode |
|---|
PROPERTY_BOUNDS, PROPERTY_CHILDREN, PROPERTY_CHILDREN_PICKABLE, PROPERTY_CLIENT_PROPERTIES, PROPERTY_FULL_BOUNDS, PROPERTY_PAINT, PROPERTY_PARENT, PROPERTY_PICKABLE, PROPERTY_TRANSFORM, PROPERTY_TRANSPARENCY, PROPERTY_VISIBLE |
| Fields inherited from interface java.awt.print.Printable |
|---|
NO_SUCH_PAGE, PAGE_EXISTS |
| Constructor Summary | |
|---|---|
|
ScreenElement()
Default Constructor. |
protected |
ScreenElement(NetworkPanel networkPanel)
Create a new abstract screen element with the specified network panel. |
| Method Summary | |
|---|---|
protected abstract JPopupMenu |
getContextMenu()
Return a context menu specific to this screen element. |
NetworkPanel |
getNetworkPanel()
Return the network panel for this screen element. |
protected abstract JDialog |
getPropertyDialog()
Return a property dialog for this screen element. |
protected abstract String |
getToolTipText()
Return a String to use as tool tip text for this screen element. |
protected abstract boolean |
hasContextMenu()
Return true if this screen element has a context menu. |
protected abstract boolean |
hasPropertyDialog()
Return true if this screen element has a property dialog. |
protected abstract boolean |
hasToolTipText()
Return true if this screen element has tool tip text. |
void |
initCastor(NetworkPanel networkPanel)
Initializes relevant data after a ScreenElement has been unmarshalled via Castor. |
abstract boolean |
isDraggable()
Return true if this screen element is draggable. |
abstract boolean |
isSelectable()
Return true if this screen element is selectable. |
abstract void |
resetColors()
Reset colors when default colors have been changed in NetworkPreferences. |
void |
setNetworkPanel(NetworkPanel networkPanel)
Set the network panel for this screen element to networkPanel. |
abstract boolean |
showSelectionHandle()
Return true if this screen element should show a
selection handle. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ScreenElement()
protected ScreenElement(NetworkPanel networkPanel)
networkPanel - network panel for this screen element| Method Detail |
|---|
public void initCastor(NetworkPanel networkPanel)
ScreenElement has been unmarshalled via Castor.
networkPanel - network panelpublic abstract boolean isSelectable()
true if this screen element is selectable.
Being selectable requires that this screen element is pickable
as far as the Piccolo API is concerned, so if this method returns
true, be sure that this class also returns true
for its getPickable() method.
PNode.getPickable(),
PNode.setPickable(boolean)public abstract boolean showSelectionHandle()
true if this screen element should show a
selection handle.
Showing a selection handle requires that this screen element is pickable
as far as the Piccolo API is concerned, so if this method returns
true, be sure that this class also returns true
for its getPickable() method.
Showing a selection handle also requires that this screen element is selectable,
so if this method returns true, be sure that this class also
returns true for its isSelectable() method.
PNode.getPickable(),
PNode.setPickable(boolean),
isSelectable()public abstract boolean isDraggable()
true if this screen element is draggable.
Being draggable requires that this screen element is pickable
as far as the Piccolo API is concerned, so if this method returns
true, be sure that this class also returns true
for its getPickable() method.
Being draggable also requires that this screen element is selectable,
so if this method returns true, be sure that this class also
returns true for its isSelectable() method.
PNode.getPickable(),
PNode.setPickable(boolean),
isSelectable()protected abstract boolean hasToolTipText()
true if this screen element has tool tip text.
If this screen element does not have tool tip text, a tool tip
event handler will not be registered.
getToolTipText()protected abstract String getToolTipText()
String to use as tool tip text for this screen element.
Return null if this screen element does not have tool tip text
or to temporarily prevent the tool tip from displaying.
String to use as tool tip text for this screen elementhasToolTipText()protected abstract boolean hasContextMenu()
true if this screen element has a context menu.
If this screen element does not have a context menu, a context menu
event handler will not be registered.
getContextMenu()protected abstract JPopupMenu getContextMenu()
null if this screen element does not have a context
menu.
hasContextMenu()protected abstract boolean hasPropertyDialog()
true if this screen element has a property dialog.
If this screen element does not have a property dialog, a property
dialog event handler will not be registered.
getPropertyDialog()protected abstract JDialog getPropertyDialog()
null if this screen element does not have a
property dialog.
hasPropertyDialog()public abstract void resetColors()
NetworkPreferences.
public final NetworkPanel getNetworkPanel()
public final void setNetworkPanel(NetworkPanel networkPanel)
networkPanel.
This is a bound property.
networkPanel - network panel for this screen element
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||