|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartisynth.core.modelbase.ModelComponentBase
artisynth.core.gui.ControlPanel
public class ControlPanel
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface artisynth.core.modelbase.ModelComponent |
---|
ModelComponent.NavpanelVisibility |
Field Summary | |
---|---|
static PropertyList |
myProps
|
Fields inherited from class artisynth.core.modelbase.ModelComponentBase |
---|
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames |
Constructor Summary | |
---|---|
ControlPanel()
|
|
ControlPanel(java.lang.String name)
|
|
ControlPanel(java.lang.String name,
java.lang.String options)
|
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
addGlobalValueChangeListener(ValueChangeListener l)
Add a value change listener to all property widgets in this window and its owned windows. |
java.awt.Component |
addLabel(java.lang.String text)
|
java.awt.Component |
addWidget(java.awt.Component comp)
|
LabeledComponentBase |
addWidget(HasProperties host,
java.lang.String name)
|
LabeledComponentBase |
addWidget(HasProperties host,
java.lang.String name,
double min,
double max)
|
LabeledComponentBase |
addWidget(Property prop)
|
LabeledComponentBase |
addWidget(Property prop,
double min,
double max)
|
LabeledComponentBase |
addWidget(java.lang.String labelText,
HasProperties host,
java.lang.String name)
|
LabeledComponentBase |
addWidget(java.lang.String labelText,
HasProperties host,
java.lang.String name,
double min,
double max)
|
void |
connectToHierarchy()
Called by the system after this component is added to the component hierarchy (i.e., when it is added as a child of another CompositeComponent). |
void |
disconnectFromHierarchy()
Called by the system after this component is removed from the component hierarchy (i.e., when it is removed as a child of its parent). |
void |
dispose()
Dispose of all resources used by this object. |
void |
enableLiveUpdating(boolean enable)
|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by this object. |
PropertyFrame |
getFrame()
|
ValueChangeListener[] |
getGlobalValueChangeListeners()
Get an array of all the global value change listeners defined for this window. |
int |
getHeight()
|
java.awt.Point |
getLocation()
|
PropertyPanel |
getPropertyPanel()
|
java.awt.Dimension |
getSize()
|
java.lang.Object |
getSynchronizeObject()
Gets the object (if any) with which property widget value changes are synchronized. |
int |
getWidth()
|
boolean |
isLiveUpdatingEnabled()
If true, then the workspace should continuously update the property values whenever the model is rerendered. |
boolean |
isScrollable()
|
boolean |
isVisible()
|
void |
locateRight(java.awt.Component comp)
|
int |
numWidgets()
|
void |
pack()
|
void |
postscanWidget(java.util.Deque<ScanToken> tokens,
CompositeComponent ancestor)
|
void |
removeGlobalValueChangeListener(ValueChangeListener l)
Remove a value change listener from all property widgets in this window and its owned windows. |
boolean |
removeStalePropertyWidgets()
|
boolean |
scanItem(ReaderTokenizer rtok,
java.util.Deque<ScanToken> tokens)
|
void |
scanWidget(java.lang.String classNameOrAlias,
ReaderTokenizer rtok,
java.util.Deque<ScanToken> tokens)
|
void |
setDefaultValues()
Sets the attributes of this component to their default values. |
void |
setFocusableWindowState(boolean enable)
|
void |
setLocation(int x,
int y)
|
void |
setLocation(java.awt.Point dim)
|
void |
setName(java.lang.String name)
Sets the name of this component. |
void |
setScrollable(boolean scrollable)
|
void |
setSize(java.awt.Dimension dim)
|
void |
setSize(int w,
int h)
|
void |
setSynchronizeObject(java.lang.Object syncObj)
Sets an object with which property widget value changes are synchronized. |
void |
setVisible(boolean visible)
|
void |
updateWidgetValues()
Update the value of all property widgets in this window and its owned windows. |
void |
write(java.io.PrintWriter pw,
NumberFormat fmt,
java.lang.Object ref)
Writes a text description of this element to a PrintWriter. |
void |
writeWidget(java.io.PrintWriter pw,
java.awt.Component comp,
NumberFormat fmt,
CompositeComponent ancestor)
|
Methods inherited from class artisynth.core.modelbase.ModelComponentBase |
---|
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, copy, createTempFlag, getChildren, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, hasState, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, updateReferences |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static PropertyList myProps
Constructor Detail |
---|
public ControlPanel()
public ControlPanel(java.lang.String name)
public ControlPanel(java.lang.String name, java.lang.String options)
Method Detail |
---|
public void setName(java.lang.String name)
ModelComponentBase
notifyParentOfChange
with a NameChangeEvent
so that it's
parent can update the name map entry and other ancestors can adjust for
the new name.
Component names can be specified as null. However, if not null, they
should have non-zero length and should not begin with a digit or contain
the characters '.' or '/'. Implementations can use ModelComponentBase.checkName()
to determine if a proposed name is valid.
setName
in interface ModelComponent
setName
in class ModelComponentBase
name
- new component namepublic void setDefaultValues()
ModelComponentBase
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class ModelComponentBase
public int numWidgets()
public void setScrollable(boolean scrollable)
public boolean isScrollable()
public java.awt.Component addWidget(java.awt.Component comp)
public LabeledComponentBase addWidget(Property prop)
public LabeledComponentBase addWidget(Property prop, double min, double max)
public LabeledComponentBase addWidget(HasProperties host, java.lang.String name)
public LabeledComponentBase addWidget(HasProperties host, java.lang.String name, double min, double max)
public LabeledComponentBase addWidget(java.lang.String labelText, HasProperties host, java.lang.String name)
public LabeledComponentBase addWidget(java.lang.String labelText, HasProperties host, java.lang.String name, double min, double max)
public java.awt.Component addLabel(java.lang.String text)
public PropertyPanel getPropertyPanel()
public PropertyFrame getFrame()
public void dispose()
PropertyWindow
dispose
in interface Disposable
dispose
in interface PropertyWindow
public void updateWidgetValues()
PropertyWindow
updateWidgetValues
in interface PropertyWindow
public void addGlobalValueChangeListener(ValueChangeListener l)
PropertyWindow
addGlobalValueChangeListener
in interface PropertyWindow
public void removeGlobalValueChangeListener(ValueChangeListener l)
PropertyWindow
removeGlobalValueChangeListener
in interface PropertyWindow
public ValueChangeListener[] getGlobalValueChangeListeners()
PropertyWindow
getGlobalValueChangeListeners
in interface PropertyWindow
public void setSynchronizeObject(java.lang.Object syncObj)
PropertyWindow
setSynchronizeObject
in interface PropertyWindow
syncObj
- new synchronization object for this windowpublic java.lang.Object getSynchronizeObject()
PropertyWindow
getSynchronizeObject
in interface PropertyWindow
public void locateRight(java.awt.Component comp)
public boolean isLiveUpdatingEnabled()
PropertyWindow
isLiveUpdatingEnabled
in interface PropertyWindow
public void enableLiveUpdating(boolean enable)
public void writeWidget(java.io.PrintWriter pw, java.awt.Component comp, NumberFormat fmt, CompositeComponent ancestor) throws java.io.IOException
java.io.IOException
public void write(java.io.PrintWriter pw, NumberFormat fmt, java.lang.Object ref) throws java.io.IOException
ModelComponentBase
scan
and complete
enough to allow full reconstruction of the element.
write
in interface Scannable
write
in class ModelComponentBase
pw
- stream for writing the elementfmt
- numeric formating informationref
- optional reference object which can be used for producing references to
other objects
java.io.IOException
- if an I/O error occuredpublic void scanWidget(java.lang.String classNameOrAlias, ReaderTokenizer rtok, java.util.Deque<ScanToken> tokens) throws java.io.IOException
java.io.IOException
public void postscanWidget(java.util.Deque<ScanToken> tokens, CompositeComponent ancestor) throws java.io.IOException
java.io.IOException
public boolean scanItem(ReaderTokenizer rtok, java.util.Deque<ScanToken> tokens) throws java.io.IOException
java.io.IOException
public void pack()
public void setFocusableWindowState(boolean enable)
public void setVisible(boolean visible)
public boolean isVisible()
public void setSize(java.awt.Dimension dim)
public void setSize(int w, int h)
public java.awt.Dimension getSize()
public void setLocation(java.awt.Point dim)
public void setLocation(int x, int y)
public int getHeight()
public int getWidth()
public java.awt.Point getLocation()
public boolean removeStalePropertyWidgets()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void connectToHierarchy()
ModelComponentBase
When this method is called, ModelComponent.getParent()
will return
the new parent component; the system will have set this beforehand.
connectToHierarchy
in interface ModelComponent
connectToHierarchy
in class ModelComponentBase
public void disconnectFromHierarchy()
ModelComponentBase
When this
method is called, ModelComponent.getParent()
will still return this original
parent component; the system will set this to null
after.
disconnectFromHierarchy
in interface ModelComponent
disconnectFromHierarchy
in class ModelComponentBase
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |