|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
ptolemy.actor.gui.run.PtolemyFormEditor
public class PtolemyFormEditor
A customized version of the FormEditor class by Michael Connor (mlconnor@yahoo.com).
FormEditor
,
Serialized Form
Red (cxh) |
Yellow (eal) |
Nested Class Summary | |
---|---|
private class |
PtolemyFormEditor.ColSpanSpinnerModel
Model for the column span control. |
private class |
PtolemyFormEditor.ComponentPaletteListModel
Model for the palette. |
private static class |
PtolemyFormEditor.ComponentPaletteListRenderer
Renderer for the palette items. |
private class |
PtolemyFormEditor.ConstraintTableCellRenderer
Renderer for table cells. |
private class |
PtolemyFormEditor.DeleteColumnAction
Action to delete a column. |
private class |
PtolemyFormEditor.DeleteRowAction
Action to delete a row. |
private class |
PtolemyFormEditor.GridTableModel
The data model for the table. |
private class |
PtolemyFormEditor.InsertColumnAfterAction
Action to insert a column after the selected column. |
private class |
PtolemyFormEditor.InsertColumnBeforeAction
Action to insert a column before the selected column. |
private class |
PtolemyFormEditor.InsertRowAfterAction
Action to insert a row after the selected one. |
private class |
PtolemyFormEditor.InsertRowBeforeAction
Action to insert a row before the selected one. |
private class |
PtolemyFormEditor.PackAction
Action to pack the run control panel. |
private class |
PtolemyFormEditor.RemoveComponentAction
Action to remove a component. |
private class |
PtolemyFormEditor.RowSpanSpinnerModel
Model for the row span control. |
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
private javax.swing.JSpinner |
_bottomInsetSpinner
The bottom inset control. |
private javax.swing.SpinnerNumberModel |
_bottomInsetSpinnerModel
Model for the bottom inset control. |
private javax.swing.JButton |
_columnDeleteButton
The button to delete a column. |
private javax.swing.JButton |
_columnInsertAfterButton
The button to insert after the selected column. |
private javax.swing.JButton |
_columnInsertBeforeButton
The button to insert before the selected column. |
private javax.swing.JSpinner |
_columnSpanSpinner
The column span control. |
private PtolemyFormEditor.ColSpanSpinnerModel |
_columnSpanSpinnerModel
The model for the column span control. |
protected java.awt.Container |
_container
The container. |
protected ContainerLayout |
_containerLayout
The layout manager. |
private javax.swing.JComboBox |
_horizontalAlignmentCombo
The horizontal alignment control. |
private java.lang.String[] |
_horizontalAlignmentList
The list of horizontal alignment options. |
private RunLayoutFrame |
_layoutFrame
The layout frame. |
private javax.swing.JSpinner |
_leftInsetSpinner
The left inset control. |
private javax.swing.SpinnerNumberModel |
_leftInsetSpinnerModel
Model for the left inset control. |
private javax.swing.Action |
_packAction
Action to pack the run control window. |
private static java.util.Set<java.lang.String> |
_propertiesToIgnore
Properties to ignore and not present to the user. |
private javax.swing.Action |
_removeComponentAction
Action to remove a component. |
private javax.swing.JButton |
_removeComponentButton
Button to remove a component. |
private javax.swing.JSpinner |
_rightInsetSpinner
The right inset control. |
private javax.swing.SpinnerNumberModel |
_rightInsetSpinnerModel
Model for the right inset control. |
private javax.swing.JButton |
_rowDeleteButton
The button to delete a row. |
private javax.swing.JButton |
_rowInsertAfterButton
The button to insert a row after the selected one. |
private javax.swing.JButton |
_rowInsertBeforeButton
The button to insert a row before the selected one. |
private javax.swing.JSpinner |
_rowSpanSpinner
The row span control. |
private PtolemyFormEditor.RowSpanSpinnerModel |
_rowSpanSpinnerModel
The model for the row span control. |
private boolean |
_suspendConstraintControlUpdates
Flag to suspend updates. |
private LayoutTable |
_table
The layout table, built in the constructor. |
private PtolemyFormEditor.GridTableModel |
_tableModel
The data model for the table. |
private javax.swing.JSpinner |
_topInsetSpinner
The top inset control. |
private javax.swing.SpinnerNumberModel |
_topInsetSpinnerModel
Model for the top inset control. |
private javax.swing.JComboBox |
_verticalAlignmentCombo
The vertical alignment control. |
private java.lang.String[] |
_verticalAlignmentList
The list of vertical alignment options. |
protected java.util.Set<java.awt.Component> |
newComponents
The set of new components. |
protected java.awt.Component |
topComponent
The top level component. |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
PtolemyFormEditor(RunLayoutFrame layoutFrame,
ContainerLayout layout,
java.awt.Container container)
Construct a new form editor. |
Method Summary | |
---|---|
private CellConstraints |
_getComponentConstraints(java.awt.Component component)
Return the component constraints from the layout manager. |
private java.lang.String |
_getComponentName(java.awt.Component control)
Return the name of the specified component as known by the layout controller. |
private void |
_insertColumn(int column)
Insert a column. |
private void |
_insertRow(int rowIndex)
Insert a row. |
private void |
_putValue(javax.swing.AbstractAction abstractAction,
java.lang.String iconName)
Put an icon onto an AbstractAction. |
private void |
_setSelectedCell(int columnIndex,
int rowIndex,
boolean forceVisible)
Specify the cell in the table that is selected. |
private void |
_setupListeners()
Set up the listeners. |
private void |
_specsChanged()
Specify that the specifications have changed. |
protected void |
_updateLayouts()
Update the layouts. |
boolean |
editComponent(java.awt.Component component)
Edit the component by presenting a dialog that infers the settable properties of the components. |
void |
setFormComponent(java.awt.Component component)
Specify the selected component. |
void |
updateLayout(java.awt.Component component)
Update the layout for the specified component. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, 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, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, 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, hide, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, 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, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ContainerLayout _containerLayout
protected java.awt.Container _container
protected java.util.Set<java.awt.Component> newComponents
protected java.awt.Component topComponent
private javax.swing.SpinnerNumberModel _bottomInsetSpinnerModel
private javax.swing.JSpinner _bottomInsetSpinner
private javax.swing.JButton _columnDeleteButton
private javax.swing.JButton _columnInsertAfterButton
private javax.swing.JButton _columnInsertBeforeButton
private PtolemyFormEditor.ColSpanSpinnerModel _columnSpanSpinnerModel
private javax.swing.JSpinner _columnSpanSpinner
private java.lang.String[] _horizontalAlignmentList
private javax.swing.JComboBox _horizontalAlignmentCombo
private RunLayoutFrame _layoutFrame
private javax.swing.SpinnerNumberModel _leftInsetSpinnerModel
private javax.swing.JSpinner _leftInsetSpinner
private javax.swing.Action _packAction
private static java.util.Set<java.lang.String> _propertiesToIgnore
private javax.swing.Action _removeComponentAction
private javax.swing.JButton _removeComponentButton
private javax.swing.SpinnerNumberModel _rightInsetSpinnerModel
private javax.swing.JSpinner _rightInsetSpinner
private javax.swing.JButton _rowDeleteButton
private javax.swing.JButton _rowInsertAfterButton
private javax.swing.JButton _rowInsertBeforeButton
private PtolemyFormEditor.RowSpanSpinnerModel _rowSpanSpinnerModel
private javax.swing.JSpinner _rowSpanSpinner
private boolean _suspendConstraintControlUpdates
private LayoutTable _table
private PtolemyFormEditor.GridTableModel _tableModel
private javax.swing.SpinnerNumberModel _topInsetSpinnerModel
private javax.swing.JSpinner _topInsetSpinner
private java.lang.String[] _verticalAlignmentList
private javax.swing.JComboBox _verticalAlignmentCombo
Constructor Detail |
---|
public PtolemyFormEditor(RunLayoutFrame layoutFrame, ContainerLayout layout, java.awt.Container container)
layoutFrame
- The frame within which this editor will be added.layout
- The layout manager.container
- The container.Method Detail |
---|
public boolean editComponent(java.awt.Component component)
component
- The component.
public void setFormComponent(java.awt.Component component)
component
- The selected component.public void updateLayout(java.awt.Component component)
component
- The component to have its layout updated.protected void _updateLayouts()
private CellConstraints _getComponentConstraints(java.awt.Component component)
component
- The component.
private java.lang.String _getComponentName(java.awt.Component control)
control
- The component.
private void _insertColumn(int column)
column
- The column index.private void _insertRow(int rowIndex)
rowIndex
- The row index.private void _putValue(javax.swing.AbstractAction abstractAction, java.lang.String iconName)
private void _setSelectedCell(int columnIndex, int rowIndex, boolean forceVisible)
private void _setupListeners()
private void _specsChanged()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |