|
|||||||||
| 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 EditorPanels, 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.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected Gui.EditorFrame |
ep
|
protected javax.swing.JMenuItem |
exitMenuItem
|
protected javax.swing.JMenu |
fileMenu
|
protected javax.swing.JFrame |
frame
|
protected static Gui |
gui
|
protected javax.swing.JMenuItem |
importMenuItem
|
protected javax.swing.JMenuBar |
menuBar
|
protected javax.swing.JMenuItem |
neMenuItem
|
protected javax.swing.JMenu |
optionsMenu
|
protected javax.swing.JMenuItem |
p2pCloseMenuItem
|
protected javax.swing.JMenuItem |
p2pDirectoryMenuItem
|
protected javax.swing.JMenuItem |
p2pLoginMenuItem
|
protected javax.swing.JMenu |
p2pMenu
|
protected AutoMedPeer |
peer
|
protected PeerApplication |
peerApp
|
protected boolean |
standalone
|
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 |
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 |
static UserActionResult |
idNodeExpand(Gui g,
java.lang.Object[] o)
Performs an id Node expand |
static UserActionResult |
idNodeMerge(Gui g,
java.lang.Object[] o)
Performs an id Node merge |
void |
importFile()
|
static UserActionResult |
inclusionExpand(Gui g,
java.lang.Object[] o)
Performs an inclusion expand |
static UserActionResult |
inclusionMerge(Gui g,
java.lang.Object[] o)
Performs an inclusion merge |
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 Positionables 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)
|
static UserActionResult |
moveInclusion(Gui g,
java.lang.Object[] o)
Moves an inclusion constraint |
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 |
void |
protect()
Change the protection status of GUI tool bar menus after changes have occurred that alter this protection status. |
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 |
setStandAlone(boolean standAlone)
Set stand-aloen |
static UserActionResult |
showExtent(Gui g,
java.lang.Object[] o)
Displays the extent of a schema object |
static UserActionResult |
uMRedirection(Gui g,
java.lang.Object[] o)
Performs a unique mandatory redirection |
static UserActionResult |
validateConstraints(Gui g,
java.lang.Object[] o)
Validate the constraints in an HDM schema |
| Methods inherited from class javax.swing.JDesktopPane |
|---|
getAccessibleContext, getAllFrames, getAllFramesInLayer, getDesktopManager, getDragMode, getSelectedFrame, getUI, getUIClassID, isOpaque, paramString, setDesktopManager, setDragMode, setSelectedFrame, setUI, updateUI |
| Methods inherited from class javax.swing.JLayeredPane |
|---|
addImpl, getComponentCountInLayer, getComponentsInLayer, getComponentToLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getObjectForLayer, getPosition, highestLayer, insertIndexForLayer, isOptimizedDrawingEnabled, lowestLayer, moveToBack, moveToFront, paint, putLayer, remove, removeAll, 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, 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, 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, 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 |
| 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.JMenuBar menuBar
protected Gui.EditorFrame ep
protected boolean standalone
protected PeerApplication peerApp
protected AutoMedPeer peer
| Constructor Detail |
|---|
public Gui(java.io.InputStream config)
| Method Detail |
|---|
public javax.swing.JFrame getFrame()
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 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 Positionables 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 highLevelToHDM(Gui g,
java.lang.Object[] o)
public static UserActionResult showExtent(Gui g,
java.lang.Object[] o)
public static UserActionResult validateConstraints(Gui g,
java.lang.Object[] o)
public static UserActionResult moveInclusion(Gui g,
java.lang.Object[] o)
public static UserActionResult uMRedirection(Gui g,
java.lang.Object[] o)
public static UserActionResult inclusionMerge(Gui g,
java.lang.Object[] o)
public static UserActionResult inclusionExpand(Gui g,
java.lang.Object[] o)
public static UserActionResult idNodeMerge(Gui g,
java.lang.Object[] o)
public static UserActionResult idNodeExpand(Gui g,
java.lang.Object[] o)
public static UserActionResult hdmToXML(Gui g,
java.lang.Object[] o)
public static UserActionResult hdmToSQL(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.
NotFoundExceptionpublic void createEditorFrame(Positionable p)
Positionable (e.g. Network or
Schema) in the Gui.
public static Gui openMainWindow()
public void initialiseGui()
public static void main(java.lang.String[] args)
public void close()
public void importFile()
public void exportFile(java.lang.Object o)
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
AutoMedExceptionpublic 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 | ||||||||