|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container java.awt.Window java.awt.Dialog javax.swing.JDialog ix.iface.ui.JConstraintEditor ix.iview.ConstraintEditor ix.iview.ObjectConstraintEditor
public class ObjectConstraintEditor
An editor for specifying (world-state) constraints on objects in refinements. The editor is implemented as a frame using a JTextField, a JCheckBox, and a JTable.
The editor can be created with no arguments or with a given refinement which will be set as the current refinement whose object constraints are to be specified. Subsequently, the refinement in the editor can be set using the setRefinement method.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JDialog |
---|
javax.swing.JDialog.AccessibleJDialog |
Nested classes/interfaces inherited from class java.awt.Dialog |
---|
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType |
Nested classes/interfaces inherited from class java.awt.Window |
---|
java.awt.Window.AccessibleAWTWindow |
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.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected ListEditorPanel |
classEd
|
(package private) boolean |
isAdjusting
|
protected UIObjectClass |
objectClass
|
protected ListEditorPanel |
propConstraintEd
|
protected java.util.HashMap |
propertyConstraints
|
protected ToggleEditorPanel |
propModePan
|
protected Constraint |
typeConstraint
|
protected UIDomain |
uiDomain
|
protected java.util.HashMap |
varConstraints
|
protected ItemVar |
variable
|
protected ListEditorPanel |
varNameEd
|
Fields inherited from class ix.iview.ConstraintEditor |
---|
varDecs |
Fields inherited from class ix.iface.ui.JConstraintEditor |
---|
bitsBox, butBox, cancelBut, constraintListeners, currentObject, focusComponent, label, mainPanel, moreBut, okBut, original |
Fields inherited from class javax.swing.JDialog |
---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Dialog |
---|
DEFAULT_MODALITY_TYPE |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
ObjectConstraintEditor(java.awt.Frame owner,
UIDomain domain)
Creates an editor for specifying object constraints. |
|
ObjectConstraintEditor(java.awt.Frame owner,
UIRefinement refinement)
Creates an editor for specifying object constraints within the given refinement. |
Method Summary | |
---|---|
void |
clear()
|
protected java.lang.Object |
collectConstraint()
Normally reads the constraint and updates the current object. |
void |
dataChanged(EditableObject eo,
java.lang.String field,
java.lang.Object vNew,
java.lang.Object vOld)
|
protected void |
deleteConstraint(ObjectProperty prop,
Constraint c)
|
protected void |
finishEdits()
|
protected javax.swing.JComponent |
getFocusComponent()
By default, there is no focus component |
protected java.util.List |
getObjectProperties()
|
protected static java.util.List |
getObjectProperties(int mode,
UIObjectClass oClass)
|
protected void |
initFromObject()
Sets the refinement whose objects are to be constrained. |
protected Constraint |
makeConstraint(ItemVar var,
UIObjectClass oClass,
java.lang.String typeProperty)
Make a type constraint for the variable |
protected java.awt.Component |
makeRels()
Makes all items on the relations panel. |
void |
moreInitFromObject()
Set up the editor to specify more of the same (add more button) This is disabled for the editor - all constraints are done here anyway |
void |
mouseClicked(java.awt.event.MouseEvent e)
|
protected void |
noteType()
|
protected void |
setFromObject(java.lang.Object original)
Set the editor for editing a constraint (not putting in a new one) |
void |
setObject(java.lang.Object o)
Set the object (UIRefinement) whose objects are to be constrained |
protected void |
updateVariable()
|
void |
valueChanged(javax.swing.event.ListSelectionEvent e)
|
void |
variableConstraintsChanged(ItemVar variable,
java.util.HashMap propConsts)
|
void |
variableNameChanged(ItemVar oldVar,
ItemVar newVar)
|
void |
variableTypeChanged(ItemVar var,
UIObjectClass oldType,
UIObjectClass newType)
|
Methods inherited from class ix.iview.ConstraintEditor |
---|
addVariableDeclaration, getField, getPreviousList, getVarsToOffer, handleVariables, makeBits, processConstraint, start |
Methods inherited from class ix.iface.ui.JConstraintEditor |
---|
addConstraintListener, closeEditor, focus, getObject, isEditing, mouseEntered, mouseExited, mousePressed, mouseReleased, noteNewValue, removeConstraintListener, setMessage, setOriginal, start, start, start, start, start |
Methods inherited from class javax.swing.JDialog |
---|
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update |
Methods inherited from class java.awt.Dialog |
---|
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, setVisible, show, toBack |
Methods inherited from class java.awt.Window |
---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, toFront |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.event.MouseListener |
---|
mouseEntered, mouseExited, mousePressed, mouseReleased |
Field Detail |
---|
protected ListEditorPanel varNameEd
protected ListEditorPanel classEd
protected ListEditorPanel propConstraintEd
protected ToggleEditorPanel propModePan
protected UIDomain uiDomain
protected UIObjectClass objectClass
protected Constraint typeConstraint
protected ItemVar variable
protected java.util.HashMap propertyConstraints
protected java.util.HashMap varConstraints
boolean isAdjusting
Constructor Detail |
---|
public ObjectConstraintEditor(java.awt.Frame owner, UIDomain domain)
public ObjectConstraintEditor(java.awt.Frame owner, UIRefinement refinement)
refinement
- the refinement whose objects are to be consrained.Method Detail |
---|
protected java.awt.Component makeRels()
makeRels
in class ConstraintEditor
protected javax.swing.JComponent getFocusComponent()
JConstraintEditor
getFocusComponent
in class JConstraintEditor
public void moreInitFromObject() throws java.lang.NullPointerException
moreInitFromObject
in class JConstraintEditor
java.lang.NullPointerException
protected void initFromObject() throws java.lang.NullPointerException
initFromObject
in class ConstraintEditor
java.lang.NullPointerException
- if *******protected void setFromObject(java.lang.Object original)
setFromObject
in class ConstraintEditor
public void setObject(java.lang.Object o)
setObject
in class JConstraintEditor
o
- the object whose children are to be relatedpublic void clear()
protected void updateVariable()
public void variableConstraintsChanged(ItemVar variable, java.util.HashMap propConsts)
variableConstraintsChanged
in interface PropertyConstraintsListener
public void variableNameChanged(ItemVar oldVar, ItemVar newVar)
variableNameChanged
in interface PropertyConstraintsListener
public void variableTypeChanged(ItemVar var, UIObjectClass oldType, UIObjectClass newType)
variableTypeChanged
in interface PropertyConstraintsListener
protected void noteType()
protected java.lang.Object collectConstraint()
collectConstraint
in class ConstraintEditor
protected Constraint makeConstraint(ItemVar var, UIObjectClass oClass, java.lang.String typeProperty)
protected void deleteConstraint(ObjectProperty prop, Constraint c)
protected java.util.List getObjectProperties()
protected static java.util.List getObjectProperties(int mode, UIObjectClass oClass)
protected void finishEdits()
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
mouseClicked
in class JConstraintEditor
public void dataChanged(EditableObject eo, java.lang.String field, java.lang.Object vNew, java.lang.Object vOld)
public void valueChanged(javax.swing.event.ListSelectionEvent e)
valueChanged
in interface javax.swing.event.ListSelectionListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |