|
||||||||||
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 advanced mode (true for advanced, false for simple) 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 isAdvanced = false;
DomainEditor frame = new DomainEditor(isAdvanced);
frame.setModelDirectory(modelDirectory);
frame.setVisible(true);
...
Inner Class Summary | |
static class |
DomainEditor.DomainFileFilter
|
(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 |
Field Summary | |
protected ActionEditorPanel |
actionPanel
|
protected javax.swing.ImageIcon |
advancedIcon
|
protected IXToolItem |
advancedItem
|
protected IXAgent |
agent
|
protected AROEditorPanel |
aroPanel
|
protected javax.swing.ImageIcon |
checkIcon
|
protected IXToolItem |
checkItem
|
protected IXToolItem |
clearItem
|
protected GlobalFramePanel |
domainPanel
|
protected GrammarEditorPanel |
grammarPanel
|
protected javax.swing.ImageIcon |
graphicalIcon
|
protected IXToolItem |
graphicalItem
|
protected HelpFrame |
helpFrame
|
protected IXToolItem |
insertItem
|
protected AConstructFramePanel |
lexiconPanel
|
protected java.io.File |
modelDirectory
|
protected javax.swing.ImageIcon |
modifyIcon
|
protected IXToolItem |
modifyItem
|
protected IXToolItem |
newEditItem
|
protected OrderingEditor |
orderingEditor
|
protected javax.swing.ImageIcon |
publishIcon
|
protected IXToolItem |
publishItem
|
protected IXToolItem |
revertDItem
|
protected javax.swing.ImageIcon |
revertOIcon
|
protected IXToolItem |
revertOItem
|
protected javax.swing.ImageIcon |
simpleIcon
|
protected IXToolItem |
simpleItem
|
protected AConstructFramePanel |
testPanel
|
ix.iview.domain.UIDomain |
uiDomain
The current domain in the editor. |
Fields inherited from class ix.iface.ui.JFrameMTP |
cardsPanel, isAdjusting, styleMenu, tabbedPane, windowsMenu |
Fields inherited from class ix.iface.ui.JFrameMT |
aboutDialog, aboutItem, closeItem, copyIcon, copyItem, cutIcon, cutItem, editMenu, exitItem, fileMenu, helpIcon, helpItem, helpMenu, imageDir, JPanel2, mainJPanel, manualItem, menuBar, newIcon, newItem, openFileDialog, openIcon, openItem, optionsMenu, pasteIcon, pasteItem, revertIcon, revertItem, saveAsItem, saveFileDialog, saveIcon, saveItem, TB_HEIGHT, TBB_HEIGHT, TBB_WIDTH, TBB_Y, toolBar, 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 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) advanced mode. |
|
DomainEditor(boolean isAdvanced)
Makes the editor with the given advanced mode. |
|
DomainEditor(Domain domain)
Makes the editor with the given domain - simple by default. |
|
DomainEditor(Domain domain,
boolean isAdvanced)
Makes the editor with the given advanced mode and load the given domain. |
|
DomainEditor(IXAgent theAgent,
Domain domain)
Makes the editor with the given domain - simple by default. |
|
DomainEditor(java.lang.String title,
boolean isAdvanced)
Makes the editor with the given advanced mode and the given title. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent event)
Implements the ActionListener interface. |
void |
adaptDefaultMenuToolbar()
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(ix.iview.domain.event.UIDomainEvent e)
|
void |
constructEdited(ix.iview.domain.event.UIDomainEvent e)
|
void |
constructRemoved(ix.iview.domain.event.UIDomainEvent e)
|
protected boolean |
currentPanelChanging(javax.swing.JPanel oldPanel,
javax.swing.JPanel newPanel)
Changing current panel from old to new. |
void |
domainCleared(ix.iview.domain.event.UIDomainEvent e)
|
void |
domainEdited(ix.iview.domain.event.UIDomainEvent se)
|
void |
domainSet(ix.iview.domain.event.UIDomainEvent se)
|
void |
ensureHelpFrame()
|
Domain |
getDomain()
|
java.io.File |
getModelDirectory()
|
ix.iview.domain.UIDomain |
getUIDomain()
|
boolean |
isAdvancedSet()
|
static void |
main(java.lang.String[] args)
|
javax.swing.JMenu |
makeEditMenuTool(javax.swing.JComponent parentMenu)
Makes an edit menu |
javax.swing.JMenu |
makeFileMenuTool(javax.swing.JComponent parentMenu)
Makes a the file menu and toolbar buttons. |
void |
makeFileMenuToolExits(javax.swing.JMenu fileMenu)
Makes default close/exit menu options and and toolbar buttons. |
protected void |
makeToolbar()
|
javax.swing.JMenu |
makeToolsMenuTool(javax.swing.JComponent parentMenu)
Makes a tools menu and toolbar buttons. |
protected void |
populateEditMenu()
Fill the edit menu with constructs from the domain. |
void |
refinementAdded(RefinementEvent e)
|
void |
saveExpansion(Refinement data)
The name of this is a hangover from something Jeff did. |
void |
setAdvanced(boolean newAdvanced)
Sets the editor to advanced (true) or simple (false) mode. |
void |
setConstruct(IXObject construct)
Sets the given construct as the current one and displays it for editing. |
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. |
void |
setOriginalStyle()
If the editor is brought up in simple mode, style is changed to simple too - this should move to tabbed style when first advanced or graphical is selected (do only once!) |
void |
setUIConstruct(ix.iview.domain.UIObject construct)
Sets the given UIObject as the current one and displays it for editing. |
void |
setUIDomain(ix.iview.domain.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 |
protected void |
userClearDomain()
Clears the current domain. |
void |
userClose()
|
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 void |
userSaveDomain()
|
protected void |
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
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 simpleIcon
protected javax.swing.ImageIcon advancedIcon
protected javax.swing.ImageIcon graphicalIcon
protected HelpFrame helpFrame
protected IXToolItem publishItem
protected IXToolItem insertItem
protected IXToolItem clearItem
protected IXToolItem revertDItem
protected IXToolItem newEditItem
protected IXToolItem revertOItem
protected IXToolItem modifyItem
protected IXToolItem simpleItem
protected IXToolItem advancedItem
protected IXToolItem graphicalItem
protected IXToolItem checkItem
protected java.io.File modelDirectory
public ix.iview.domain.UIDomain uiDomain
Constructor Detail |
public DomainEditor()
public DomainEditor(boolean isAdvanced)
isAdvanced
- advanced mode: true for advanced, false for simplepublic DomainEditor(Domain domain)
domain
- the domain to use in the editorpublic DomainEditor(Domain domain, boolean isAdvanced)
domain
- the domain to use in the editorisAdvanced
- advanced mode: true for advanced, false for simplepublic DomainEditor(java.lang.String title, boolean isAdvanced)
title
- the title of the frameisAdvanced
- advanced mode: true for advanced, false for simplepublic DomainEditor(IXAgent theAgent, Domain domain)
domain
- the domain to use in the editorMethod Detail |
protected boolean currentPanelChanging(javax.swing.JPanel oldPanel, javax.swing.JPanel newPanel)
currentPanelChanging
in class JFrameMTP
ix.iface.ui.JFrameMTP
protected void setVisuals()
public void ensureHelpFrame()
public boolean isAdvancedSet()
public void setAdvanced(boolean newAdvanced)
public void setGraphical()
public void setModelDirectory(java.io.File directory)
public java.io.File getModelDirectory()
public void setOriginalStyle()
public void adaptDefaultMenuToolbar()
JFrameMTP
adaptDefaultMenuToolbar
in class JFrameMTP
public javax.swing.JMenu makeFileMenuTool(javax.swing.JComponent parentMenu)
makeFileMenuTool
in class JFrameMT
public void makeFileMenuToolExits(javax.swing.JMenu fileMenu)
makeFileMenuToolExits
in class JFrameMT
public javax.swing.JMenu makeEditMenuTool(javax.swing.JComponent parentMenu)
makeEditMenuTool
in class JFrameMT
public javax.swing.JMenu makeToolsMenuTool(javax.swing.JComponent parentMenu)
makeToolsMenuTool
in class JFrameMT
protected void makeToolbar()
public void showButtonTexts(boolean show)
protected void adaptMenusToPanel(javax.swing.JPanel panel)
adaptMenusToPanel
in class JFrameMTP
protected void populateEditMenu()
public void saveExpansion(Refinement data)
saveExpansion
in interface InternalDomainEditor
public void setConstruct(IXObject construct)
construct
- the original domain object to be viewed/editedpublic void setUIConstruct(ix.iview.domain.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(ix.iview.domain.UIDomain uiDomain)
uiDomain
- the UIDomain to usepublic ix.iview.domain.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 void userSaveDomain()
protected void userSaveDomainAs()
protected void userPublishDomain()
public void refinementAdded(RefinementEvent e)
refinementAdded
in interface DomainListener
public void constructAdded(RefinementEvent e)
constructAdded
in interface ix.iview.domain.event.UIDomainListener
public void constructAdded(ix.iview.domain.event.UIDomainEvent e)
constructAdded
in interface ix.iview.domain.event.UIDomainListener
public void constructEdited(ix.iview.domain.event.UIDomainEvent e)
constructEdited
in interface ix.iview.domain.event.UIDomainListener
public void constructRemoved(ix.iview.domain.event.UIDomainEvent e)
constructRemoved
in interface ix.iview.domain.event.UIDomainListener
public void domainCleared(ix.iview.domain.event.UIDomainEvent e)
domainCleared
in interface ix.iview.domain.event.UIDomainListener
public void domainEdited(ix.iview.domain.event.UIDomainEvent se)
domainEdited
in interface ix.iview.domain.event.UIDomainListener
public void domainSet(ix.iview.domain.event.UIDomainEvent se)
domainSet
in interface ix.iview.domain.event.UIDomainListener
public 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 JFrameMTP
public void userClose()
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |