|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Window
|
+--java.awt.Frame
|
+--javax.swing.JFrame
|
+--ix.iface.ui.JFrameMT
|
+--ix.iface.ui.JFrameMTP
|
+--ix.iview.DomainEditor
An editor/viewer frame for domain details. The editor can be created with a mandatory mode (true for simple, false for advanced) and an optional domain or an optional title. Most of the window buidling goes on in the ConstructFramePanels and their ConstructEditorPanels, except for the menubar and the toolbar.
Super-class JFrameMT defines useful menu/toolbar making things. Most of the action processing goes on in the ConstructFramePanels, except for domain specific things (read...) and window things (toggles).
Example for using DomainEditor:
...
File modelDirectory = new File("domain-library");
boolean isSimple = false;
DomainEditor frame = new DomainEditor(isSimple);
frame.setModelDirectory(modelDirectory);
frame.setVisible(true);
...
| Inner Class Summary | |
(package private) class |
DomainEditor.IXWindow
|
| Inner classes inherited from class javax.swing.JFrame |
javax.swing.JFrame.AccessibleJFrame |
| Inner classes inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
| Inner classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
| Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock |
| Fields inherited from class ix.iface.ui.JFrameMTP |
cardsPanel, isAdjusting, styleMenu, tabbedPane, windowsMenu |
| Fields inherited from class ix.iface.ui.JFrameMT |
aboutItem, closeItem, copyIcon, copyItem, cutIcon, cutItem, editMenu, exitItem, fileMenu, helpIcon, helpItem, helpMenu, JPanel2, mainJPanel, manualItem, menuBar, newIcon, newItem, openFileDialog, openIcon, openItem, optionsMenu, pasteIcon, pasteItem, revertIcon, saveAsItem, saveFileDialog, saveIcon, saveItem, TB_HEIGHT, TBB_HEIGHT, TBB_WIDTH, TBB_Y, toolBar, toolbarItem, toolsMenu, viewMenu |
| Fields inherited from class javax.swing.JFrame |
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, icon, ICONIFIED, mbManagement, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, ownedWindows, resizable, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, title, W_RESIZE_CURSOR, WAIT_CURSOR |
| Fields inherited from class java.awt.Window |
inputContext, OPENED, ownedWindowList, state, warningString, windowListener |
| Fields inherited from class java.awt.Container |
component, containerListener, layoutMgr, listeningBoundsChildren, listeningChildren, ncomponents |
| Fields inherited from class java.awt.Component |
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListener, componentListenerK, componentOrientation, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y |
| 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.iface.ui.FrameSymbols |
STYLE_CARD, STYLE_SIMPLE, STYLE_TABBED |
| Fields inherited from interface javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
DomainEditor()
Makes the editor with the default (simple) mode. |
|
DomainEditor(boolean standAlone)
Makes the editor with the given stand alone mode. |
|
DomainEditor(boolean isSimple,
boolean standAlone)
Makes the editor with the given mode and the given stand-alone or not. |
|
DomainEditor(Domain domain)
Makes the editor with the given domain - simple, stand-alone by default. |
|
DomainEditor(Domain domain,
boolean standAlone)
Makes the editor with the given mode and load the given domain. |
|
DomainEditor(IXAgent theAgent,
Domain domain)
Makes the editor with the given domain in not-stand-alone mode. |
|
| Method Summary | |
void |
aboutDialog()
|
void |
actionPerformed(java.awt.event.ActionEvent event)
Implements the ActionListener interface. |
void |
adaptDefaultMenu()
Dummy method that can be overridden by sub-classes to adapt the default. |
protected void |
adaptMenusToPanel(javax.swing.JPanel panel)
Called whenever the current panel is updated |
void |
constructAdded(RefinementEvent e)
|
void |
constructAdded(UIDomainEvent e)
Called when a UI construct is added. |
void |
constructEdited(UIDomainEvent e)
Called when a UI construct is edited. |
void |
constructRemoved(UIDomainEvent e)
Called when a UI construct is removed. |
protected boolean |
currentPanelChanging(javax.swing.JPanel oldPanel,
javax.swing.JPanel newPanel)
Changing current panel from old to new. |
void |
domainCleared(UIDomainEvent e)
Called when the domain is cleared. |
void |
domainEdited(UIDomainEvent se)
Called when the domain's own fields changed (currently only name). |
void |
domainSet(UIDomainEvent se)
Called when the domain is added. |
void |
ensureHelpFrame()
|
void |
exitApplication()
|
Domain |
getDomain()
|
java.io.File |
getModelDirectory()
|
java.io.File |
getPreferencesFile()
|
UIDomain |
getUIDomain()
|
boolean |
isSimpleMode()
|
void |
loadProperties()
|
static void |
main(java.lang.String[] args)
|
void |
makeEditMenu()
Makes an edit menu |
void |
makeFileMenu()
Makes a the file menu and toolbar buttons. |
void |
makeFileMenuExits()
Makes default close/exit menu options and and toolbar buttons. |
void |
makeHelpMenu()
Make sure that if this is overwritten, adaptDefaultMenu is called elsewhere. |
void |
makeModeMenu()
|
void |
makeOptionsMenu()
Overrides the one in JFrameMTP and JFrameMT - goes into View menu, not File. |
protected void |
makePreferences()
|
protected void |
makePreferencesMenu()
|
protected void |
makeToolbar()
|
void |
makeToolsMenu()
Makes a tools menu and toolbar buttons. |
void |
makeViewMenu()
|
void |
makeViewsMenu()
|
protected void |
populateEditMenu()
Fill the edit menu with constructs from the domain. |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
|
void |
refinementAdded(RefinementEvent e)
|
void |
saveExpansion(Refinement data)
The name of this is a hangover from something Jeff did. |
void |
saveProperties()
|
void |
setActivityView(Symbol view)
If the state of the menu item does not correspond to the new setting, it is changed. |
void |
setConstraintsView(Symbol constrView)
|
void |
setConstruct(IXObject construct)
Sets the given construct as the current one and displays it for editing. |
void |
setCurrentProperties(java.util.Properties properties)
|
void |
setDefaultProperties(java.util.Properties defaults)
|
void |
setDefaultSequence(boolean on)
Sets the toggle for default sub-activity sequencing behaviour. |
void |
setDomain(Domain domain)
Sets the given domain as current both in this frame and the domain editor panel. |
void |
setDomain(java.io.File domainFile)
Reads the descriptions in the given domain file. |
void |
setGraphical()
If the state of the menu item does not correspond to the new setting, it is changed. |
void |
setModelDirectory(java.io.File directory)
Sets the directory used to load/save models. |
boolean |
setPanelStyle(java.lang.String style)
|
void |
setSimpleMode(boolean newSimple)
Sets the editor to simple (true) or advanced (false) mode. |
void |
setUIConstruct(UIObject construct)
Sets the given UIObject as the current one and displays it for editing. |
void |
setUIDomain(UIDomain uiDomain)
Sets the given UIDomain as current both in this frame and the domain editor panel. |
protected void |
setVisuals()
|
void |
showButtonTexts(boolean show)
|
void |
updateCurrentPanel(AConstructFramePanel panel)
Sets the current panel and sets the domain in the panel |
void |
updateIDEFromProperties()
|
void |
updatePropertiesFromIDE()
|
void |
updateViewMenu(Symbol view)
Call this to keep the Activity Views menu in line with the view that is shown. |
protected void |
userClearDomain()
Clears the current domain. |
boolean |
userClose()
Close the editor or exit it if it is running stand-alone. |
protected void |
userInsertDomain()
Gets a domain file name and reads it. |
protected void |
userOpenDomain()
Gets a domain file name, reads it, and replaces the contents of the current domain with the read ones. |
protected void |
userPublishDomain()
|
protected void |
userRevertDomain()
Reverts the whole draft domain to the last published (or original) one. |
protected java.io.File |
userSaveDomain()
|
protected java.io.File |
userSaveDomainAs()
|
| Methods inherited from class javax.swing.JFrame |
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
| Methods inherited from class java.awt.Frame |
|
| Methods inherited from class java.awt.Window |
addOwnedWindow, addWindowListener, adjustListeningChildren, applyResourceBundle, applyResourceBundle, connectOwnedWindow, dispatchEventImpl, dispose, eventEnabled, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isActive, isShowing, nextFocus, pack, postEvent, postWindowEvent, preProcessKeyEvent, processEvent, removeOwnedWindow, removeWindowListener, resetGC, setCursor, setFocusOwner, show, toBack, toFront, transferFocus |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventToSelf, doLayout, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, numListening, paint, paintComponents, paintHeavyweightComponents, postsOldMouseEvents, preferredSize, print, printComponents, printHeavyweightComponents, processContainerEvent, proxyEnableEvents, proxyRequestFocus, remove, removeAll, removeContainerListener, setFont, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkitImpl, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, 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, processMouseEvent, processMouseMotionEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.swing.event.ChangeListener |
stateChanged |
| Methods inherited from interface ix.iview.InternalDomainEditor |
setVisible |
| Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
| Field Detail |
protected IXAgent agent
public java.util.Properties ideProperties
protected JPreferencesDialog preferencesDialog
protected GlobalFramePanel domainPanel
protected ActionEditorPanel actionPanel
protected AROEditorPanel aroPanel
protected GrammarEditorPanel grammarPanel
protected AConstructFramePanel lexiconPanel
protected AConstructFramePanel testPanel
protected OrderingEditor orderingEditor
protected javax.swing.ImageIcon checkIcon
protected javax.swing.ImageIcon revertOIcon
protected javax.swing.ImageIcon modifyIcon
protected javax.swing.ImageIcon publishIcon
protected javax.swing.ImageIcon minimalIcon
protected javax.swing.ImageIcon comprehensiveIcon
protected javax.swing.ImageIcon graphicalIcon
protected javax.swing.ImageIcon preferredIcon
protected javax.swing.ImageIcon simpleIcon
protected javax.swing.ImageIcon advancedIcon
protected HelpFrame helpFrame
public IXToolItem revertItem
protected IXToolItem publishItem
protected IXToolItem insertItem
protected IXToolItem clearItem
protected IXToolItem revertDItem
protected IXToolItem newEditItem
protected IXToolItem revertOItem
protected IXToolItem modifyItem
protected javax.swing.JMenu modeMenu
protected IXToolItem simpleItem
protected IXToolItem advancedItem
protected javax.swing.JMenu viewsMenu
protected IXToolItem minimalItem
protected IXToolItem comprehensiveItem
protected IXToolItem graphicalItem
protected IXToolItem checkItem
protected IXToolItem preferencesItem
protected IXToolItem preferredItem
protected IXToolItem sequenceNewItem
protected IXToolItem sequenceItem
protected IXToolItem parallelItem
protected IXToolItem propModeItem
protected IXToolItem propButtTextItem
protected IXToolItem propEditableItem
protected IXToolItem propListTextItem
protected IXToolItem propSaveItem
public IXToolItem[] allButtons
protected Symbol preferredConstraints
protected java.io.File modelDirectory
public UIDomain uiDomain
javax.swing.JToolBar.Separator tbs
| Constructor Detail |
public DomainEditor()
public DomainEditor(boolean isSimple,
boolean standAlone)
isSimple - mode: true for simple, false for advancedstandAlone - mode: true for standAlone, false for part of other
applicationpublic DomainEditor(boolean standAlone)
standAlone - mode: true for standAlone, false for part of other
applicationpublic DomainEditor(Domain domain)
domain - the domain to use in the editor
public DomainEditor(Domain domain,
boolean standAlone)
domain - the domain to use in the editorstandAlone - mode: true for standAlone, false for part of other
application
public DomainEditor(IXAgent theAgent,
Domain domain)
theAgent - the IXAgent that wants the editor to startdomain - the domain to use in the editor| Method Detail |
public java.io.File getPreferencesFile()
public void loadProperties()
public void setDefaultProperties(java.util.Properties defaults)
public void setCurrentProperties(java.util.Properties properties)
public void saveProperties()
public void updateIDEFromProperties()
public void updatePropertiesFromIDE()
protected boolean currentPanelChanging(javax.swing.JPanel oldPanel,
javax.swing.JPanel newPanel)
currentPanelChanging in class JFrameMTPix.iface.ui.JFrameMTPprotected void setVisuals()
public void ensureHelpFrame()
public boolean isSimpleMode()
public void setActivityView(Symbol view)
public boolean setPanelStyle(java.lang.String style)
setPanelStyle in class JFrameMTPpublic void setConstraintsView(Symbol constrView)
public void updateViewMenu(Symbol view)
public void setSimpleMode(boolean newSimple)
public void setGraphical()
public void setModelDirectory(java.io.File directory)
public java.io.File getModelDirectory()
public void adaptDefaultMenu()
JFrameMTadaptDefaultMenu in class JFrameMTpublic void makeFileMenu()
makeFileMenu in class JFrameMTpublic void makeFileMenuExits()
makeFileMenuExits in class JFrameMTpublic void makeOptionsMenu()
makeOptionsMenu in class JFrameMTPpublic void makeEditMenu()
makeEditMenu in class JFrameMTpublic void makeViewMenu()
makeViewMenu in class JFrameMTPpublic void makeModeMenu()
public void makeViewsMenu()
public void makeToolsMenu()
makeToolsMenu in class JFrameMTpublic void makeHelpMenu()
JFrameMTmakeHelpMenu in class JFrameMTprotected void makeToolbar()
public void showButtonTexts(boolean show)
protected void adaptMenusToPanel(javax.swing.JPanel panel)
adaptMenusToPanel in class JFrameMTPprotected void populateEditMenu()
protected void makePreferences()
protected void makePreferencesMenu()
public void saveExpansion(Refinement data)
saveExpansion in interface InternalDomainEditorpublic void setConstruct(IXObject construct)
construct - the original domain object to be viewed/editedpublic void setUIConstruct(UIObject construct)
construct - the UI object to be viewed/editedpublic void setDomain(java.io.File domainFile)
domainFile - the file from which to read the domainpublic void setDomain(Domain domain)
domain - the domain to usepublic void setUIDomain(UIDomain uiDomain)
uiDomain - the UIDomain to usepublic UIDomain getUIDomain()
public Domain getDomain()
public void updateCurrentPanel(AConstructFramePanel panel)
domain - the domain to usepublic void setDefaultSequence(boolean on)
on - true: put new sub-activities in sequence, false: put them in
parallel.protected void userClearDomain()
protected void userRevertDomain()
protected void userOpenDomain()
protected void userInsertDomain()
protected java.io.File userSaveDomain()
protected java.io.File userSaveDomainAs()
protected void userPublishDomain()
public void refinementAdded(RefinementEvent e)
refinementAdded in interface DomainListenerpublic void constructAdded(RefinementEvent e)
constructAdded in interface UIDomainListenerpublic void constructAdded(UIDomainEvent e)
UIDomainListenerconstructAdded in interface UIDomainListenerpublic void constructEdited(UIDomainEvent e)
UIDomainListenerconstructEdited in interface UIDomainListenerpublic void constructRemoved(UIDomainEvent e)
UIDomainListenerconstructRemoved in interface UIDomainListenerpublic void domainCleared(UIDomainEvent e)
UIDomainListenerdomainCleared in interface UIDomainListenerpublic void domainEdited(UIDomainEvent se)
UIDomainListenerdomainEdited in interface UIDomainListenerpublic void domainSet(UIDomainEvent se)
UIDomainListenerdomainSet in interface UIDomainListenerpublic void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange in interface java.beans.PropertyChangeListenerpublic void actionPerformed(java.awt.event.ActionEvent event)
Catch specific menu/toolbar events here. Let the panels process their own events, let the superclass process panel-swapping events (inc. style) and, via its superclass, general window events (close, exit, ...)
actionPerformed in class JFrameMTPpublic void exitApplication()
exitApplication in class JFrameMTpublic boolean userClose()
public void aboutDialog()
aboutDialog in class JFrameMTpublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||