|
||||||||||
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
ix.iview.AConstructFramePanel
ix.iview.ActionEditorPanel
public class ActionEditorPanel
An editor/viewer panel for refinement structures. The editor has a flag that specifies whether it is in minimal view (true) or in comprehensive view (false).
The editor is created with a minimal flag. Subsequently, the refinement can be set using the setRefinement method.
The editor will not let you update a current refinement yet, because we have not yet worked out how to manage the impact this would have on other modules that use the domain. The editor will let you add new refinements (if you have changed an old one, change the name to save it).
The refinement name, pattern, and comments are currently simply strings. They can all be edited by typing into their fields. The pattern should not stay as a string - it should change into something a bit more constrained. This will be changed when the refinement models have been sorted out.
Sub-activities and constraints can be added, deleted, and cleared, either using the buttons or using keys (enter or insert for add, delete for delete).
Sub-activities are simple LLists for the moment. Adding a sub-activity expects the user to type in a pattern (currently just a string) and it will generate a number for the activity. Deleting sub-activities will also delete any constraints in which the deleted activity participates.
The only constraints currently known are ordering constraints. Adding
constraints will bring up an editor that lets the user select activities
and time-points. For the moment, these "proper" constraints are translated
into simple versions because other modules cannot handle anything more
complex. A simple constraint "(
Example code for using the ActionEditorPanel:
...
editorPanel = new ActionEditorPanel(this,isMinimal);
mainJPanel.add(editorPanel);
...
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ix.iview.AConstructFramePanel |
---|
AConstructFramePanel.FieldValue, AConstructFramePanel.JModifyDialog |
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.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
(package private) java.util.HashSet |
actionListeners
Listeners interested in the current action |
(package private) int |
comprehensiveConstrIndex
|
(package private) java.util.List |
comprehensiveFields
|
ConditionEffectEditor |
conditionEditor
|
DefaultConstraintEditor |
constraintEditor
|
(package private) ConstructEditing |
currentPanel
|
DeclarationEditor |
declarationEditor
|
(package private) IFormModel |
formModel
|
(package private) GExpansionEditor |
graphPanel
|
SpecEditor |
issueSpecEditor
|
(package private) java.util.List |
minimalFields
|
SpecEditor |
nodeSpecEditor
|
ObjectConstraintEditor |
objectConstraintEditor
|
OrderingEditor |
orderingEditor
An editor for temporal relations |
PanelSearcher |
searcher
An editor for temporal relations |
(package private) boolean |
updatingTree
|
Fields inherited from class ix.iview.AConstructFramePanel |
---|
currentConstructListeners, DEFAULT_SORT, formPanel, hasOverview, mainPanel, parent, scrollPane, switching |
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 ix.iview.IDESymbols |
---|
C_ALL, C_CONDITIONS_ONLY, C_CONDITIONS_OTHER, C_NONE, C_ORDER_CONDITIONS, C_ORDER_ONLY, C_ORDER_OTHER, C_OTHER_ONLY, MODE_ADVANCED, MODE_SIMPLE, VIEW_COMPREHENSIVE, VIEW_GRAPHICAL, VIEW_MINIMAL, VIEWS |
Fields inherited from interface ix.icore.domain.SchemaTerms |
---|
O_NONE, O_OTHER, O_PARALLEL, O_SEQUENCE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
ActionEditorPanel(DomainEditorFrame theParent)
Creates the editor panel with the given parent. |
|
ActionEditorPanel(DomainEditorFrame theParent,
Symbol view,
Symbol constr)
Creates the editor panel with the given parent with the given view and the indicated set of constraints shown. |
Method Summary | |
---|---|
void |
actionChanged(java.awt.Component source,
UIRefinement old,
UIRefinement newAction)
Implement this method to take note of action selections |
void |
actionPerformed(java.awt.event.ActionEvent ae)
Wakes up the ActionListener with a user action. |
void |
addCurrentActionListener(CurrentActionListener cal)
|
boolean |
beforeClosing()
|
boolean |
checkConstruct()
User request to check the refinement - not implemented. |
protected boolean |
clearOrderings()
|
void |
clearUIConstruct()
Clears the current construct and the panel. |
protected UIObject |
cloneConstruct(UIObject uiConstruct)
|
void |
constructAdded(DomainEvent event)
|
void |
constructAdded(UIDomainEvent event)
Called when a UI construct is added. |
void |
constructEdited(UIDomainEvent event)
Called when a UI construct is edited. |
void |
constructRemoved(UIDomainEvent event)
Called when a UI construct is removed. |
void |
dataChanged(EditableObject object,
java.lang.String field,
java.lang.Object oldValue,
java.lang.Object newValue)
|
void |
domainCleared(UIDomainEvent event)
Called when the domain is cleared. |
void |
domainEdited(UIDomainEvent se)
Called when the domain's own fields changed (currently only name). |
void |
domainSet(UIDomainEvent event)
Called when the domain is added. |
void |
ensureConditionEditor()
|
void |
ensureConstraintEditor()
|
void |
ensureDeclarationEditor()
|
void |
ensureIssueSpecEditor()
|
void |
ensureNodeSpecEditor()
|
void |
ensureObjectConstraintEditor()
|
void |
ensureRelationEditor()
|
void |
ensureSearcher()
|
boolean |
frameActionPerformed(java.awt.event.ActionEvent event)
Recognises panel specific events and processes them. |
Symbol |
getActivityView()
|
java.util.List |
getAllConstructs()
Gets a full list of the constructs of the panel's type in the domain. |
java.util.ArrayList |
getAllExpansions(NodeSpec node)
|
java.util.ArrayList |
getAllExpansions(UIRefinement ref)
|
Named |
getNamedConstruct(java.lang.String name)
Gets a named construct of the panel's type from the domain |
boolean |
getSort()
|
boolean |
isComprehensive()
|
boolean |
isSequenceSet()
|
UIObject |
makeNewConstruct()
User request to make a new action. |
UIRefinement |
makeNewRefinement(java.lang.String name,
LList pattern)
|
void |
makeParallel()
Puts the nodes of the current refinement in parallel. |
void |
makeSequence()
Puts the nodes of the current refinement into sequence. |
static java.util.List |
makeSequence(java.util.List nodes)
Puts the given nodes into sequence. |
protected UIObject |
noteConstruct()
Note the settings in the editor in a UIObject. |
void |
noteTextNodes()
Parse the nodes from the text area and store them in the current refinement. |
protected static void |
notImp(java.lang.String message)
|
static boolean |
orderingsAreSequential(LList nodes,
LList orderings)
Checks whether the orderings are a sequence of the nodes. |
void |
populatePopup(JObjectPopup popup,
java.lang.Object construct)
|
void |
refresh()
|
protected void |
resetUIConstruct(UIObject object)
Same as setUIConstruct, but remembers the setting of the miniConstraints |
void |
setConstraintsView(Symbol constrView)
Changes the fields that are displayed in the form view. |
void |
setCurrentView(Symbol view)
|
void |
setDefaultSequence(boolean newSequence)
Sets the flag to put nodes in sequence (true) or in parallel (false) If the state of the checkbox does not correspond to the new setting, it is changed. |
void |
setOrdering(boolean isSequence)
|
protected void |
setPanel(ConstructEditing panel)
|
void |
setSort(boolean sortIt)
|
void |
setUIConstruct(UIObject object)
Sets the given UI construct to be viewed/edited. |
void |
setUIConstructOnly(UIObject object)
Sets the given UI construct to be viewed/edited without noting the previous construct. |
void |
setUIConstructPanel(UIObject object)
Sets the given UI construct in this editor and in the current panel Does not call beforeSwitching. |
protected void |
setupActionTree()
|
protected javax.swing.JPanel |
setupMainPanel()
Sets up the main panel in which construct editing will happen. |
void |
setupPanelProperties(Symbol view,
Symbol constr)
|
void |
updateToolbar(boolean show)
|
void |
updateTree()
|
void |
updateTreeSelection()
|
void |
userDeclareVariables()
|
void |
userMakeParallel()
User request to put the nodes of the current action in parallel. |
void |
userMakeSequence()
User request to put the nodes of the current action into sequence. |
void |
userSearch()
|
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, getBaseline, getBaselineResizeBehavior, 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, isPaintingForPrint, 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 |
Methods inherited from interface ix.iview.ConstructFraming |
---|
getDomain, getUIDomain, newConstruct, saveConstruct, setConstruct, setUIDomain, viewChanges, viewChangesFromOriginal |
Field Detail |
---|
public OrderingEditor orderingEditor
public ConditionEffectEditor conditionEditor
public DefaultConstraintEditor constraintEditor
public SpecEditor nodeSpecEditor
public SpecEditor issueSpecEditor
public DeclarationEditor declarationEditor
public ObjectConstraintEditor objectConstraintEditor
public PanelSearcher searcher
IFormModel formModel
ConstructEditing currentPanel
GExpansionEditor graphPanel
int comprehensiveConstrIndex
java.util.List comprehensiveFields
java.util.List minimalFields
boolean updatingTree
java.util.HashSet actionListeners
Constructor Detail |
---|
public ActionEditorPanel(DomainEditorFrame theParent)
parent
- the DomainEditorFrame that the panel belons to. Used
mainly to keep toggle buttons and menus in synchpublic ActionEditorPanel(DomainEditorFrame theParent, Symbol view, Symbol constr)
parent
- the DomainEditorFrame that the panel belons to. Used
mainly to keep toggle buttons and menus in synchview
- a symbol specifying whether the editor is to display
its minimal, comprehensive, or graphical view.constr
- a symbol indicating how constraints are shown (orderings,
conditions, others)Method Detail |
---|
public void setupPanelProperties(Symbol view, Symbol constr)
protected javax.swing.JPanel setupMainPanel()
AConstructFramePanel
setupMainPanel
in class AConstructFramePanel
protected void setupActionTree()
protected void setPanel(ConstructEditing panel)
public void updateToolbar(boolean show)
public void refresh()
refresh
in class AConstructFramePanel
public boolean isComprehensive()
public Symbol getActivityView()
public void setCurrentView(Symbol view)
public void setConstraintsView(Symbol constrView)
public boolean isSequenceSet()
public void setDefaultSequence(boolean newSequence)
public static boolean orderingsAreSequential(LList nodes, LList orderings)
nodes
- the nodes that can be part of the ordering.orderings
- the orderings to be tested.public void setOrdering(boolean isSequence)
public void makeSequence()
public static java.util.List makeSequence(java.util.List nodes)
public void makeParallel()
public void ensureRelationEditor()
public void ensureConditionEditor()
public void ensureConstraintEditor()
public void ensureObjectConstraintEditor()
public void ensureNodeSpecEditor()
public void ensureIssueSpecEditor()
public void ensureDeclarationEditor()
public void ensureSearcher()
public void userSearch()
public boolean beforeClosing()
beforeClosing
in class AConstructFramePanel
public void setUIConstruct(UIObject object)
setUIConstruct
in interface ConstructFraming
setUIConstruct
in class AConstructFramePanel
object
- the UI object to be viewed/editedpublic void setUIConstructPanel(UIObject object)
setUIConstructPanel
in class AConstructFramePanel
object
- the UI object to be viewed/editedpublic void setUIConstructOnly(UIObject object)
object
- the UI object to be viewed/editedpublic void clearUIConstruct()
public UIRefinement makeNewRefinement(java.lang.String name, LList pattern)
public java.util.ArrayList getAllExpansions(UIRefinement ref)
public java.util.ArrayList getAllExpansions(NodeSpec node)
protected UIObject noteConstruct()
noteConstruct
in class AConstructFramePanel
protected void resetUIConstruct(UIObject object)
public boolean checkConstruct()
checkConstruct
in interface ConstructFraming
protected UIObject cloneConstruct(UIObject uiConstruct)
cloneConstruct
in class AConstructFramePanel
public UIObject makeNewConstruct()
makeNewConstruct
in interface ConstructFraming
makeNewConstruct
in class AConstructFramePanel
public java.util.List getAllConstructs()
ConstructFraming
getAllConstructs
in interface ConstructFraming
public Named getNamedConstruct(java.lang.String name)
ConstructFraming
getNamedConstruct
in interface ConstructFraming
public void userMakeSequence()
public void userMakeParallel()
public void userDeclareVariables()
public void noteTextNodes()
protected boolean clearOrderings()
public void constructAdded(UIDomainEvent event)
constructAdded
in interface UIDomainListener
public void constructAdded(DomainEvent event)
constructAdded
in interface UIDomainListener
public void constructEdited(UIDomainEvent event)
constructEdited
in interface UIDomainListener
public void constructRemoved(UIDomainEvent event)
constructRemoved
in interface UIDomainListener
public void domainCleared(UIDomainEvent event)
UIDomainListener
domainCleared
in interface UIDomainListener
public void domainEdited(UIDomainEvent se)
UIDomainListener
domainEdited
in interface UIDomainListener
public void domainSet(UIDomainEvent event)
UIDomainListener
domainSet
in interface UIDomainListener
public void setSort(boolean sortIt)
setSort
in class AConstructFramePanel
public boolean getSort()
getSort
in class AConstructFramePanel
public void updateTree()
public void updateTreeSelection()
public void addCurrentActionListener(CurrentActionListener cal)
public void actionChanged(java.awt.Component source, UIRefinement old, UIRefinement newAction)
CurrentActionListener
actionChanged
in interface CurrentActionListener
source
- the component that changed the actionold
- the previous actionnewAction
- the new actionpublic boolean frameActionPerformed(java.awt.event.ActionEvent event)
frameActionPerformed
in interface FramePanel
frameActionPerformed
in interface ConstructFraming
frameActionPerformed
in class AConstructFramePanel
event
- the event to be processed.
public void populatePopup(JObjectPopup popup, java.lang.Object construct)
populatePopup
in class AConstructFramePanel
public void actionPerformed(java.awt.event.ActionEvent ae)
actionPerformed
in interface java.awt.event.ActionListener
actionPerformed
in class AConstructFramePanel
protected static void notImp(java.lang.String message)
public void dataChanged(EditableObject object, java.lang.String field, java.lang.Object oldValue, java.lang.Object newValue)
dataChanged
in interface DataChangeListener
dataChanged
in class AConstructFramePanel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |