public class PropertyPanel extends LabeledComponentPanel
Modifier and Type | Field and Description |
---|---|
static boolean |
defaultExpandable |
static boolean |
defaultOrganize |
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
PropertyPanel() |
PropertyPanel(HasProperties host) |
PropertyPanel(HasProperties host,
java.lang.String[] excludeProps) |
PropertyPanel(java.lang.Iterable<? extends Property> props) |
Modifier and Type | Method and Description |
---|---|
void |
addGlobalValueChangeListener(ValueChangeListener l) |
void |
addPropertyWidget(Property prop,
LabeledComponentBase widget) |
void |
addPropertyWidget(Property prop,
LabeledComponentBase widget,
int idx) |
static void |
addValueChangeListener(LabeledControl ctrl,
ValueChangeListener l) |
java.awt.Component |
addWidget(java.awt.Component comp,
int idx) |
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 propPath,
double min,
double max,
HasProperties... hosts)
Create and add a slider widget that controls a specified scalar property
in one or more hosts.
|
LabeledComponentBase |
addWidget(java.lang.String propPath,
HasProperties... hosts)
Create and add a labeled widget that controls a specified property in one
or more hosts.
|
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) |
LabeledComponentBase |
addWidget(java.lang.String labelText,
java.lang.String propPath,
double min,
double max,
HasProperties... hosts)
Create and add a slider widget that controls a specified scalar property
in one or more hosts.
|
LabeledComponentBase |
addWidget(java.lang.String labelText,
java.lang.String propPath,
HasProperties... hosts)
Create and add a labeled widget that controls a specified property in one
or more hosts.
|
void |
addWidgets(java.lang.Iterable<?> items) |
void |
addWidgets(java.lang.Iterable<?> items,
boolean organized,
boolean expandable)
Add widgets to the panel.
|
void |
addWidgets(java.util.List<java.awt.Component> widgets) |
java.util.Collection<ValueChangeListener> |
getGlobalValueChangeListeners() |
LabeledComponentBase |
getPropertyWidget(java.lang.String propName) |
java.lang.Object |
getSynchronizeObject() |
Property |
getWidgetProperty(LabeledComponentBase comp) |
void |
processPropertyWidget(Property prop,
LabeledComponentBase widget) |
java.awt.Component[] |
removeAllWidgets() |
boolean |
removeGlobalValueChangeListener(ValueChangeListener l) |
static void |
removeValueChangeListener(LabeledControl ctrl,
ValueChangeListener l) |
boolean |
removeWidget(java.awt.Component comp) |
void |
setSynchronizeObject(java.lang.Object syncObj) |
void |
updateWidgetValues() |
void |
updateWidgetValues(boolean updateFromSource)
Update the widgets in this panel so that they reflect the values of the
underlying properties.
|
actionPerformed, addLabel, addSelectionListener, addWidget, addWidget, areWidgetsDraggable, areWidgetsSelectable, deselectAllWidgets, deselectWidget, dispose, findWidget, findWidgetAtCursor, getAutoRepackEnabled, getComponentIndex, getLabelSpacing, getLabelWidth, getLeftInsetToTop, getPreferredLabelSpacing, getSelectedWidgets, getSelectionListeners, getSpacing, getTopPanel, getWidget, getWidget, getWidgets, isStretchable, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, numBasicWidgets, numSelectedWidgets, numWidgets, popupMenuCanceled, popupMenuWillBecomeInvisible, popupMenuWillBecomeVisible, removeSelectionListener, removeWidget, repackContainingWindow, resetLabelAlignment, selectWidget, setAutoRepackEnabled, setLabelSpacing, setSpacing, setStretchable, setWidgetsDraggable, setWidgetsSelectable
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static boolean defaultOrganize
public static boolean defaultExpandable
public PropertyPanel()
public PropertyPanel(java.lang.Iterable<? extends Property> props)
public PropertyPanel(HasProperties host)
public PropertyPanel(HasProperties host, java.lang.String[] excludeProps)
public void addWidgets(java.lang.Iterable<?> items)
public void addWidgets(java.lang.Iterable<?> items, boolean organized, boolean expandable)
organize
is true, then
groups properties by their associated "groups" if any.public void addWidgets(java.util.List<java.awt.Component> widgets)
public java.awt.Component addWidget(java.awt.Component comp, int idx)
addWidget
in class LabeledComponentPanel
public void addPropertyWidget(Property prop, LabeledComponentBase widget)
public void processPropertyWidget(Property prop, LabeledComponentBase widget)
public void addPropertyWidget(Property prop, LabeledComponentBase widget, int idx)
public LabeledComponentBase getPropertyWidget(java.lang.String propName)
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 LabeledComponentBase addWidget(java.lang.String propPath, HasProperties... hosts)
propPath
- path of the property with respect to each hosthosts
- one or more hosts of the specified propertynull
if the specified
property was not found in all hostsjava.lang.IllegalArgumentException
- if no hosts are specifiedpublic LabeledComponentBase addWidget(java.lang.String propPath, double min, double max, HasProperties... hosts)
propPath
- path of the property with respect to each hostmin
- initial minimum value for the slidermax
- initial maximum value for the sliderhosts
- one or more hosts of the specified propertynull
if the specified property is
not a scalar property found in all hostsjava.lang.IllegalArgumentException
- if no hosts are specifiedpublic LabeledComponentBase addWidget(java.lang.String labelText, java.lang.String propPath, HasProperties... hosts)
labelText
- label text for the widgetpropPath
- path of the property with respect to each hosthosts
- one or more hosts of the specified propertynull
if the specified
property was not found in all hostsjava.lang.IllegalArgumentException
- if no hosts are specifiedpublic LabeledComponentBase addWidget(java.lang.String labelText, java.lang.String propPath, double min, double max, HasProperties... hosts)
labelText
- label text for the widgetpropPath
- path of the property with respect to each hostmin
- initial minimum value for the slidermax
- initial maximum value for the sliderhosts
- one or more hosts of the specified propertynull
if the specified property is
not a scalar property found in all hostsjava.lang.IllegalArgumentException
- if no hosts are specifiedpublic boolean removeWidget(java.awt.Component comp)
removeWidget
in class LabeledComponentPanel
public java.awt.Component[] removeAllWidgets()
removeAllWidgets
in class LabeledComponentPanel
public void updateWidgetValues()
public void updateWidgetValues(boolean updateFromSource)
Underlying properties which are instances of EditingProperty will
first normally update their own values from their source component(s).
In some cases it may be desirable to suppress this behavior, which can be
done by setting updateFromSource
to false
.
updateFromSource
- if false
, do not update the values
of EditingProperties from their underlying source component(s).public Property getWidgetProperty(LabeledComponentBase comp)
public static void addValueChangeListener(LabeledControl ctrl, ValueChangeListener l)
public void addGlobalValueChangeListener(ValueChangeListener l)
public static void removeValueChangeListener(LabeledControl ctrl, ValueChangeListener l)
public boolean removeGlobalValueChangeListener(ValueChangeListener l)
public java.util.Collection<ValueChangeListener> getGlobalValueChangeListeners()
public java.lang.Object getSynchronizeObject()
public void setSynchronizeObject(java.lang.Object syncObj)