|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.util.Attribute
ptolemy.actor.gui.properties.GUIProperty
public abstract class GUIProperty
Base class for the properties that can be used to configure a tableau.
Red (tfeng) |
Red (tfeng) |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj |
---|
NamedObj.ContainedObjectsIterator |
Field Summary | |
---|---|
private javax.swing.JComponent |
_component
The Java Swing component. |
private java.lang.Object |
_constraint
The layout constraint. |
Parameter |
preferredSize
The preferred size of the Swing component. |
Fields inherited from class ptolemy.kernel.util.NamedObj |
---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Constructor Summary | |
---|---|
GUIProperty(NamedObj container,
java.lang.String name)
Construct a GUI property with the given name contained by the specified entity. |
|
GUIProperty(NamedObj container,
java.lang.String name,
javax.swing.JComponent component)
Construct a GUI property with the given name contained by the specified entity with the given Java Swing component. |
|
GUIProperty(NamedObj container,
java.lang.String name,
javax.swing.JComponent component,
java.lang.Object constraint)
Construct a GUI property with the given name contained by the specified entity with the given Java Swing component and the given layout constraint. |
|
GUIProperty(NamedObj container,
java.lang.String name,
java.lang.Object constraint)
Construct a GUI property with the given name contained by the specified entity with the given layout constraint. |
Method Summary | |
---|---|
private boolean |
_add(NamedObj container)
Add the Java Swing component to the tableau or GUI property that contains this GUI property. |
protected abstract javax.swing.JComponent |
_createComponent()
Create a new Java Swing component. |
private void |
_remove()
Remove the Java Swing component from the tableau or GUI property that contains this GUI property. |
void |
attributeChanged(Attribute attribute)
React to a change in an attribute. |
javax.swing.JComponent |
getComponent()
Return the Swing component. |
void |
setContainer(NamedObj container)
Specify the container NamedObj, adding this attribute to the list of attributes in the container. |
Methods inherited from class ptolemy.kernel.util.Attribute |
---|
_checkContainer, _getContainedObject, _propagateExistence, clone, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public Parameter preferredSize
private javax.swing.JComponent _component
private java.lang.Object _constraint
Constructor Detail |
---|
public GUIProperty(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of this attribute.
IllegalActionException
- If the attribute is not of an
acceptable class for the container, or if the name contains a period.
NameDuplicationException
- If the name coincides with
an attribute already in the container.public GUIProperty(NamedObj container, java.lang.String name, javax.swing.JComponent component) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of this attribute.component
- The Java Swing component.
IllegalActionException
- If the attribute is not of an
acceptable class for the container, or if the name contains a period.
NameDuplicationException
- If the name coincides with
an attribute already in the container.public GUIProperty(NamedObj container, java.lang.String name, javax.swing.JComponent component, java.lang.Object constraint) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of this attribute.component
- The Java Swing component.constraint
- The layout constraint.
IllegalActionException
- If the attribute is not of an
acceptable class for the container, or if the name contains a period.
NameDuplicationException
- If the name coincides with
an attribute already in the container.public GUIProperty(NamedObj container, java.lang.String name, java.lang.Object constraint) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of this attribute.constraint
- The layout constraint.
IllegalActionException
- If the attribute is not of an
acceptable class for the container, or if the name contains a period.
NameDuplicationException
- If the name coincides with
an attribute already in the container.Method Detail |
---|
public void attributeChanged(Attribute attribute) throws IllegalActionException
preferredSize
, then the preferred size of the Swing
component in this GUI property is adjusted accordingly.
attributeChanged
in class NamedObj
attribute
- The attribute that changed.
IllegalActionException
- If the change is not acceptable
to this container (not thrown in this base class).public javax.swing.JComponent getComponent()
public void setContainer(NamedObj container) throws IllegalActionException, NameDuplicationException
Subclasses may constrain the type of container by overriding
setContainer(NamedObj)
.
setContainer
in class Attribute
container
- The container to attach this attribute to..
IllegalActionException
- If this attribute is not of the
expected class for the container, or it has no name,
or the attribute and container are not in the same workspace, or
the proposed container would result in recursive containment.
NameDuplicationException
- If the container already has
an attribute with the name of this attribute.Attribute.getContainer()
protected abstract javax.swing.JComponent _createComponent() throws IllegalActionException
IllegalActionException
- Not thrown in this base class.private boolean _add(NamedObj container)
container
- The new container.
private void _remove()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |