|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLayeredPane
javax.swing.JDesktopPane
uk.ac.ic.doc.automed.editor.Gui
public class Gui
Provide a GUI into the AutoMed repositories. The defualt application contains
tools to view Network
and Schema
instances in the repository,
and perform the basic creation of Transformation
instances, and to
wrap data sources. The GUI is very customisable. It displays graphical
information in EditorPanel
s, which have the notion of display arcs
and vertices using implementations of DrawableArc
and
DrawableVertex
. The set of tools available may be extended by
editing the user's actions.cfg. Details are provided in the
AutoMed in a Nutshell guide.
Nested Class Summary | |
---|---|
class |
Gui.EditorFrame
A frame inside the main window to represent either All Networks, the contents of a Network (ie a connect seted of Schemas), or the contents of a Schema. |
Nested classes/interfaces inherited from class javax.swing.JDesktopPane |
---|
javax.swing.JDesktopPane.AccessibleJDesktopPane |
Nested classes/interfaces inherited from class javax.swing.JLayeredPane |
---|
javax.swing.JLayeredPane.AccessibleJLayeredPane |
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 | |
---|---|
private java.util.HashMap |
editorFrames
|
protected boolean |
enableP2P
|
protected Gui.EditorFrame |
ep
|
protected javax.swing.JMenuItem |
exitMenuItem
|
private DotExtensionFileFilter |
extensionFileFilter
|
protected javax.swing.JMenu |
fileMenu
|
protected javax.swing.JFrame |
frame
|
protected static Gui |
gui
|
(package private) java.util.WeakHashMap |
hiddenConstructs
|
(package private) java.util.WeakHashMap |
hiddenModels
|
(package private) java.util.WeakHashMap |
hiddenPositionables
|
protected javax.swing.JMenuItem |
importMenuItem
|
private java.io.File |
lastSelectedDir
|
protected javax.swing.JMenuBar |
menuBar
|
protected javax.swing.JMenuItem |
neMenuItem
|
private java.util.List |
networkActions
|
protected javax.swing.JMenu |
optionsMenu
|
protected javax.swing.JMenuItem |
p2pCloseMenuItem
|
protected javax.swing.JMenuItem |
p2pDirectoryMenuItem
|
protected javax.swing.JMenuItem |
p2pImplSchemaMenuItem
|
protected javax.swing.JMenuItem |
p2pKQueryMenuItem
|
protected javax.swing.JMenuItem |
p2pLoginMenuItem
|
protected javax.swing.JMenu |
p2pMenu
|
protected javax.swing.JMenuItem |
p2pPSchemaMenuItem
|
protected javax.swing.JMenuItem |
p2pRemoteSessionMenuItem
|
protected javax.swing.JMenuItem |
p2pSMRMenuItem
|
private boolean[] |
pathSel
|
protected AutoMedPeer |
peer
|
protected PeerApplication |
peerApp
|
private java.util.List |
rootActions
|
private java.util.List |
schemaActions
|
private java.util.List |
schemaObjectActions
|
private java.util.List |
selected
|
(package private) Schema |
selectedSchema
|
protected boolean |
standalone
|
(package private) static long |
startTime
|
protected javax.swing.JMenu |
toolMenu
|
Fields inherited from class javax.swing.JDesktopPane |
---|
LIVE_DRAG_MODE, OUTLINE_DRAG_MODE |
Fields inherited from class javax.swing.JLayeredPane |
---|
DEFAULT_LAYER, DRAG_LAYER, FRAME_CONTENT_LAYER, LAYER_PROPERTY, MODAL_LAYER, PALETTE_LAYER, POPUP_LAYER |
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 | |
---|---|
Gui(java.io.InputStream config)
|
Method Summary | |
---|---|
static UserActionResult |
applyIdent(java.lang.Object[] selected)
|
static UserActionResult |
applyRetract(java.lang.Object[] selected)
|
static UserActionResult |
chooseBackgroundColor(Gui g,
java.lang.Object[] selected)
|
static UserActionResult |
chooseForegroundColor(Gui g,
java.lang.Object[] selected)
|
static UserActionResult |
chooseTextColor(Gui g,
java.lang.Object[] selected)
|
void |
close()
|
void |
createEditorFrame(Positionable p)
Open an editor window on a Positionable (e.g. |
static boolean |
exactlyTwo(java.lang.Object[] selected)
|
static UserActionResult |
exportFile(Gui g,
java.lang.Object[] selected)
|
void |
exportFile(java.lang.Object o)
|
Drawable |
getDrawable(Positionable p)
Return a Drawable that has been used to represent a
Positionable . |
static java.awt.FontMetrics |
getFontMetrics(javax.swing.JComponent comp)
Utility method for all editor drawing tools to use when they need to obtain the FontMetrics of a JComponent |
javax.swing.JFrame |
getFrame()
|
static UserActionResult |
hdmToEER(Gui g,
java.lang.Object[] o)
Converts an HDM model to ER |
static UserActionResult |
hdmToER(Gui g,
java.lang.Object[] o)
Converts an HDM model to ER |
static UserActionResult |
hdmToSQL(Gui g,
java.lang.Object[] o)
Converts an HDM model to SQL |
static UserActionResult |
hdmToXML(Gui g,
java.lang.Object[] o)
Converts an HDM model to XML |
void |
hide(java.lang.Object p)
Hide an object from the GUI, such that is does not display it in any of its graphical views of the repository. |
void |
hideConstruct(Construct c)
Prevent the GUI from displaying any SchemaObject of a certain
Construct type in any window. |
static UserActionResult |
hideConstructs(Gui g,
java.lang.Object[] o)
Gui menu handler to access #hideConstruct() . |
void |
hideModel(Model m)
Prevent the GUI from displaying any SchemaObject of a certain
Model type in any window. |
static UserActionResult |
hideModels(Gui g,
java.lang.Object[] o)
Gui menu handler to access #hideModel() . |
void |
hidePositionable(Positionable so)
Prevent the GUI from displaying a Positionable |
static UserActionResult |
hidePositionables(Gui g,
java.lang.Object[] o)
Gui menu handler to access #hidePositionable() , calling that
method for each Positionable passed. |
static UserActionResult |
highLevelToHDM(Gui g,
java.lang.Object[] o)
Converts any high level model to HDM |
void |
importFile()
|
void |
initialiseGui()
|
boolean |
isHidden(Drawable d)
Return true if a particular Drawable is hidden, meaning that either
the Positionable on which it is based is hidden, or one of the
Positionable s it depends on is hidden |
boolean |
isHidden(Positionable p)
Return true if a particular Positionable is hidden at present, and
hence should not be displayed by the GUI |
static void |
main(java.lang.String[] args)
|
protected java.awt.event.ActionListener |
newMenuItemHandler_KQuery(javax.swing.JMenuItem mitem)
Display K-query interface |
protected java.awt.event.ActionListener |
newMenuItemHandler_PublishSchema(javax.swing.JMenuItem mitem)
Publish a schema to the network. |
protected java.awt.event.ActionListener |
newMenuItemHandler_RemoteSession(javax.swing.JMenuItem mitem)
|
protected java.awt.event.ActionListener |
newMenuItemHandler_SMR(javax.swing.JMenuItem mitem)
|
static UserActionResult |
nullAction(Gui g,
java.lang.Object[] selected)
|
static Gui |
openMainWindow()
Open/reopen the main window of the Gui, containing initially a network editor window |
static UserActionResult |
outputRelational(Gui g,
java.lang.Object[] o)
Materialises an SQL schema |
static UserActionResult |
outputXMLSchema(Gui g,
java.lang.Object[] o)
Materialises an XML Schema |
private void |
parseDeclarations(Syntax.Tokenizer in)
|
private java.util.HashMap |
parseProperties(Syntax.Tokenizer in,
javax.swing.Action ua)
|
private int |
parseTarget(Syntax.Tokenizer in)
|
void |
protect()
Change the protection status of GUI tool bar menus after changes have occurred that alter this protection status. |
private void |
readConfig(java.io.InputStream is)
|
void |
refresh()
Refresh the contents of all GUI windows. |
static UserActionResult |
reveal(Gui g,
java.lang.Object[] o)
|
void |
reveal(java.lang.Object p)
Reveal an object from the GUI, such that it is displayed it in any of its graphical views of the repository. |
void |
revealConstruct(Construct c)
Reveal all SchemaObject of a certain Construct type that
have been previously hidden. |
void |
revealModel(Model m)
Reveal all SchemaObject of a certain Model type that have
been previously hidden. |
void |
revealPositionable(Positionable so)
Reveal a Positionable that has been previously hidden. |
void |
setEnableP2P(boolean enableP2P)
|
void |
setStandAlone(boolean standAlone)
Set stand-aloen |
static UserActionResult |
showExtent(Gui g,
java.lang.Object[] o)
Displays the extent of a schema object |
private void |
timedComment(java.lang.String c)
|
static UserActionResult |
transform(Gui g,
java.lang.Object[] o)
Restructure an HDM schema to match the HDM struture of a target DDL |
Methods inherited from class javax.swing.JDesktopPane |
---|
addImpl, getAccessibleContext, getAllFrames, getAllFramesInLayer, getDesktopManager, getDragMode, getSelectedFrame, getUI, getUIClassID, paramString, remove, removeAll, selectFrame, setComponentZOrder, setDesktopManager, setDragMode, setSelectedFrame, setUI, updateUI |
Methods inherited from class javax.swing.JLayeredPane |
---|
getComponentCountInLayer, getComponentsInLayer, getComponentToLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getObjectForLayer, getPosition, highestLayer, insertIndexForLayer, isOptimizedDrawingEnabled, lowestLayer, moveToBack, moveToFront, paint, putLayer, setLayer, setLayer, setPosition |
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, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, 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, 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, removeContainerListener, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, transferFocusBackward, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static Gui gui
protected javax.swing.JFrame frame
protected javax.swing.JMenuItem importMenuItem
protected javax.swing.JMenuItem exitMenuItem
protected javax.swing.JMenuItem neMenuItem
protected javax.swing.JMenu fileMenu
protected javax.swing.JMenu toolMenu
protected javax.swing.JMenu p2pMenu
protected javax.swing.JMenu optionsMenu
protected javax.swing.JMenuItem p2pLoginMenuItem
protected javax.swing.JMenuItem p2pDirectoryMenuItem
protected javax.swing.JMenuItem p2pCloseMenuItem
protected javax.swing.JMenuItem p2pSMRMenuItem
protected javax.swing.JMenuItem p2pKQueryMenuItem
protected javax.swing.JMenuItem p2pPSchemaMenuItem
protected javax.swing.JMenuItem p2pImplSchemaMenuItem
protected javax.swing.JMenuItem p2pRemoteSessionMenuItem
protected javax.swing.JMenuBar menuBar
protected Gui.EditorFrame ep
protected boolean standalone
java.util.WeakHashMap hiddenModels
java.util.WeakHashMap hiddenConstructs
java.util.WeakHashMap hiddenPositionables
static long startTime
protected PeerApplication peerApp
protected AutoMedPeer peer
Schema selectedSchema
protected boolean enableP2P
private java.util.HashMap editorFrames
private java.util.List rootActions
private java.util.List networkActions
private java.util.List schemaActions
private java.util.List schemaObjectActions
private java.util.List selected
private boolean[] pathSel
private java.io.File lastSelectedDir
private DotExtensionFileFilter extensionFileFilter
Constructor Detail |
---|
public Gui(java.io.InputStream config)
Method Detail |
---|
public javax.swing.JFrame getFrame()
private void timedComment(java.lang.String c)
public void hideModel(Model m)
SchemaObject
of a certain
Model
type in any window.
public void revealModel(Model m)
SchemaObject
of a certain Model
type that have
been previously hidden.
public void hideConstruct(Construct c)
SchemaObject
of a certain
Construct
type in any window.
public void revealConstruct(Construct c)
SchemaObject
of a certain Construct
type that
have been previously hidden.
public void setStandAlone(boolean standAlone)
public void setEnableP2P(boolean enableP2P)
public void hidePositionable(Positionable so)
Positionable
public void revealPositionable(Positionable so)
Positionable
that has been previously hidden.
public void hide(java.lang.Object p)
public void reveal(java.lang.Object p)
public boolean isHidden(Positionable p)
Positionable
is hidden at present, and
hence should not be displayed by the GUI
public boolean isHidden(Drawable d)
Drawable
is hidden, meaning that either
the Positionable
on which it is based is hidden, or one of the
Positionable
s it depends on is hidden
public static UserActionResult hidePositionables(Gui g, java.lang.Object[] o)
#hidePositionable()
, calling that
method for each Positionable
passed.
public static UserActionResult hideConstructs(Gui g, java.lang.Object[] o)
#hideConstruct()
. For each
SchemaObject
passed, the corresponding Construct
will be
hidden.
public static UserActionResult hideModels(Gui g, java.lang.Object[] o)
#hideModel()
. For each
SchemaObject
passed, the corresponding Model
will be
hidden.
public static UserActionResult reveal(Gui g, java.lang.Object[] o)
public static UserActionResult showExtent(Gui g, java.lang.Object[] o)
public static UserActionResult highLevelToHDM(Gui g, java.lang.Object[] o)
public static UserActionResult hdmToSQL(Gui g, java.lang.Object[] o)
public static UserActionResult hdmToXML(Gui g, java.lang.Object[] o)
public static UserActionResult hdmToER(Gui g, java.lang.Object[] o)
public static UserActionResult hdmToEER(Gui g, java.lang.Object[] o)
public static UserActionResult transform(Gui g, java.lang.Object[] o)
public static UserActionResult outputRelational(Gui g, java.lang.Object[] o)
public static UserActionResult outputXMLSchema(Gui g, java.lang.Object[] o)
public void refresh()
public void protect()
public Drawable getDrawable(Positionable p) throws NotFoundException
Drawable
that has been used to represent a
Positionable
. In principle there could be more than one Drawable,
but since they will be all of the same class, it does not matter which is
returned.
NotFoundException
public void createEditorFrame(Positionable p)
Positionable
(e.g. Network
or
Schema
) in the Gui.
public static Gui openMainWindow()
public void initialiseGui()
protected java.awt.event.ActionListener newMenuItemHandler_SMR(javax.swing.JMenuItem mitem)
protected java.awt.event.ActionListener newMenuItemHandler_KQuery(javax.swing.JMenuItem mitem)
mitem
-
protected java.awt.event.ActionListener newMenuItemHandler_PublishSchema(javax.swing.JMenuItem mitem)
mitem
-
protected java.awt.event.ActionListener newMenuItemHandler_RemoteSession(javax.swing.JMenuItem mitem)
public static void main(java.lang.String[] args)
public void close()
public void importFile()
public void exportFile(java.lang.Object o)
private void readConfig(java.io.InputStream is) throws java.io.IOException, ConfigException
java.io.IOException
ConfigException
private void parseDeclarations(Syntax.Tokenizer in) throws java.io.IOException, ConfigException
java.io.IOException
ConfigException
private int parseTarget(Syntax.Tokenizer in) throws java.io.IOException, ConfigException
java.io.IOException
ConfigException
private java.util.HashMap parseProperties(Syntax.Tokenizer in, javax.swing.Action ua) throws java.io.IOException, ConfigException
java.io.IOException
ConfigException
public static UserActionResult nullAction(Gui g, java.lang.Object[] selected)
public static UserActionResult exportFile(Gui g, java.lang.Object[] selected)
public static UserActionResult chooseForegroundColor(Gui g, java.lang.Object[] selected)
public static UserActionResult chooseBackgroundColor(Gui g, java.lang.Object[] selected)
public static UserActionResult chooseTextColor(Gui g, java.lang.Object[] selected)
public static boolean exactlyTwo(java.lang.Object[] selected)
public static UserActionResult applyIdent(java.lang.Object[] selected) throws AutoMedException
AutoMedException
public static UserActionResult applyRetract(java.lang.Object[] selected)
public static java.awt.FontMetrics getFontMetrics(javax.swing.JComponent comp)
FontMetrics
of a JComponent
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |