Gui
Keywords: uk.ac.ic.doc.automed.editor.Gui class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.ac.ic.doc.automed.editor
Class Gui

    java.lang.Object
      java.awt.Component
          java.awt.Container
              javax.swing.JComponent
                  javax.swing.JLayeredPane
                      javax.swing.JDesktopPane
                          uk.ac.ic.doc.automed.editor.Gui

All Implemented Interfaces:
  java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

    public class Gui

extends javax.swing.JDesktopPane

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.

Author:
  Michael Boyd (mboyd@doc.ic.ac.uk), Peter McBrien (pjm@doc.ic.ac.uk)
See Also:
  Serialized Form

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

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`

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
`void` | `importFile()`
`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)`
`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
`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.
`static UserActionResult` | `reverseTransformations(Gui g, java.lang.Object[] o)` Reverses the transformations on an HDM model

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`

Method Detail

### getFrame

    public javax.swing.JFrame getFrame()

### hideModel

    public void hideModel(Model m)

  Prevent the GUI from displaying any `SchemaObject` of a certain `Model` type in any window.

### revealModel

    public void revealModel(Model m)

  Reveal all `SchemaObject` of a certain `Model` type that have been previously hidden.

### hideConstruct

    public void hideConstruct(Construct c)

  Prevent the GUI from displaying any `SchemaObject` of a certain `Construct` type in any window.

### revealConstruct

    public void revealConstruct(Construct c)

  Reveal all `SchemaObject` of a certain `Construct` type that have been previously hidden.

### hidePositionable

    public void hidePositionable(Positionable so)

  Prevent the GUI from displaying a `Positionable`

### revealPositionable

    public void revealPositionable(Positionable so)

  Reveal a `Positionable` that has been previously hidden.

### hide

    public 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.

### reveal

    public 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.

### isHidden

    public boolean isHidden(Positionable p)

  Return true if a particular `Positionable` is hidden at present, and hence should not be displayed by the GUI

### isHidden

    public 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

### hidePositionables

    public static UserActionResult hidePositionables(Gui g,
                                                     java.lang.Object[] o)

  Gui menu handler to access `#hidePositionable()`, calling that method for each `Positionable` passed.

### hideConstructs

    public static UserActionResult hideConstructs(Gui g,
                                                  java.lang.Object[] o)

  Gui menu handler to access `#hideConstruct()`. For each `SchemaObject` passed, the corresponding `Construct` will be hidden.

### hideModels

    public static UserActionResult hideModels(Gui g,
                                              java.lang.Object[] o)

  Gui menu handler to access `#hideModel()`. For each `SchemaObject` passed, the corresponding `Model` will be hidden.

### reveal

    public static UserActionResult reveal(Gui g,
                                          java.lang.Object[] o)

### highLevelToHDM

    public static UserActionResult highLevelToHDM(Gui g,
                                                  java.lang.Object[] o)

  Converts any high level model to HDM

### reverseTransformations

    public static UserActionResult reverseTransformations(Gui g,
                                                          java.lang.Object[] o)

  Reverses the transformations on an HDM model

### hdmToXML

    public static UserActionResult hdmToXML(Gui g,
                                            java.lang.Object[] o)

  Converts an HDM model to XML

### hdmToSQL

    public static UserActionResult hdmToSQL(Gui g,
                                            java.lang.Object[] o)

  Converts an HDM model to SQL

### outputRelational

    public static UserActionResult outputRelational(Gui g,
                                                    java.lang.Object[] o)

  Materialises an SQL schema

### refresh

    public void refresh()

  Refresh the contents of all GUI windows. Normally user applications will not need to call this method, since calls to the reps package automatically update the appropriate GUI windows.

### protect

    public void protect()

  Change the protection status of GUI tool bar menus after changes have occurred that alter this protection status. Only need be called by user applications that have been integrated into the GUI tool bar.

### getDrawable

    public Drawable getDrawable(Positionable p)
                         throws NotFoundException

  Return a `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.

  Throws:
    `NotFoundException`

### createEditorFrame

    public void createEditorFrame(Positionable p)

  Open an editor window on a `Positionable` (e.g. `Network` or `Schema`) in the Gui.

### openMainWindow

    public static Gui openMainWindow()

  Open/reopen the main window of the Gui, containing initially a network editor window

### main

    public static void main(java.lang.String[] args)

### close

    public void close()

### importFile

    public void importFile()

### exportFile

    public void exportFile(java.lang.Object o)

### nullAction

    public static UserActionResult nullAction(Gui g,
                                              java.lang.Object[] selected)

### exportFile

    public static UserActionResult exportFile(Gui g,
                                              java.lang.Object[] selected)

### chooseForegroundColor

    public static UserActionResult chooseForegroundColor(Gui g,
                                                         java.lang.Object[] selected)

### chooseBackgroundColor

    public static UserActionResult chooseBackgroundColor(Gui g,
                                                         java.lang.Object[] selected)

### chooseTextColor

    public static UserActionResult chooseTextColor(Gui g,
                                                   java.lang.Object[] selected)

### exactlyTwo

    public static boolean exactlyTwo(java.lang.Object[] selected)

### applyIdent

    public static UserActionResult applyIdent(java.lang.Object[] selected)
                                       throws AutoMedException

  Throws:
    `AutoMedException`

### applyRetract

    public static UserActionResult applyRetract(java.lang.Object[] selected)

### getFontMetrics

    public 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`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD