jsynoptic.ui
Interface JSynopticInterface

All Known Implementing Classes:
JSynopticFrame, JSynopticPanels

public interface JSynopticInterface

JSynoptic current implementation assumes that there is one singleton owned by JSynoptic class which provides an interface to all the graphical elements coming from the plugins. This is the interface specification.

Author:
cazenave_c

Method Summary
 void addContainer(ShapesContainer sc, java.io.File f)
          Add a new synoptic The name of the synoptic is based on the file name used to load it
 void addEditMenu(javax.swing.JPopupMenu popup)
          Add an edit menu to a popup menu generated by a specific shape popup menu This edit menu is the generic menu for all the shapes.
 void addLongActions(long actionMask, java.lang.Object target)
          Add a long action If the action is related to a shape, then the shape can be locked until action completion
 boolean canEdit()
           
 ShapesContainer.ShapesComponent getActiveComponent()
          Get the active synoptic
 ShapesContainer getActiveContainer()
          Get the active synoptic
 javax.swing.JFileChooser getFileChooser()
           
 FiledDesktopCardPanel getFilePanel()
          Returns the FiledDesktopCardPanel used to display the synoptics If this class is not used by the implementation, then it will return null but the Builtin plugin (at least) will not work.
 boolean getIsOpenProcessCancelled()
           
 java.util.AbstractList getLockedShapes()
          Get the list of locked shapes
 java.awt.Frame getOwner()
           
 java.io.File getPath()
          Get the current directory used to select files
 java.util.AbstractList getSelectionList()
          Get the selection, i.e. an element to interract with the current synoptic That can be, for instance, a ShapeCreator to generate a new shape in the current synoptic or a DataSource to be used as the source of the selected shape in the current synoptic
 SourceTree getSourceTree()
          Get the source tree which provides all the sources currently available
 void newComponent()
          Create a new active synoptic
 boolean open(java.io.File f)
          Open a file.
 void removeLongActions(long actionMask, java.lang.Object target)
          Remove a long action If the action was related to a shape and the shape was loacked then it becomes unlocked
 void setIsOpenProcessCancelled(boolean b)
           
 void setPath(java.io.File f)
          Set the current directory used to select file If the implementation is based on a JFileChooser this value will be used to define the first directory displayed by this dialog
 void setStatus(java.lang.String message)
          Displays a status message
 

Method Detail

getOwner

java.awt.Frame getOwner()
Returns:
the frame to be used for dialogs creation

canEdit

boolean canEdit()
Returns:
true if shapes can be modified (edited)

addContainer

void addContainer(ShapesContainer sc,
                  java.io.File f)
Add a new synoptic The name of the synoptic is based on the file name used to load it

Parameters:
sc - the shapes container
f - the file used to load it

getActiveContainer

ShapesContainer getActiveContainer()
Get the active synoptic

Returns:
the selected shapes container

getActiveComponent

ShapesContainer.ShapesComponent getActiveComponent()
Get the active synoptic

Returns:
the selected shapes component (JComponent derivative)

newComponent

void newComponent()
Create a new active synoptic


getSourceTree

SourceTree getSourceTree()
Get the source tree which provides all the sources currently available

Returns:
the source tree

getSelectionList

java.util.AbstractList getSelectionList()
Get the selection, i.e. an element to interract with the current synoptic That can be, for instance, a ShapeCreator to generate a new shape in the current synoptic or a DataSource to be used as the source of the selected shape in the current synoptic

Returns:
the selected objects list

addEditMenu

void addEditMenu(javax.swing.JPopupMenu popup)
Add an edit menu to a popup menu generated by a specific shape popup menu This edit menu is the generic menu for all the shapes. The menu items availability is according to the current status of the synoptic editing


getFilePanel

FiledDesktopCardPanel getFilePanel()
Returns the FiledDesktopCardPanel used to display the synoptics If this class is not used by the implementation, then it will return null but the Builtin plugin (at least) will not work.

Returns:
the desktop card panel to navigate through synoptics

getLockedShapes

java.util.AbstractList getLockedShapes()
Get the list of locked shapes

Returns:
the list

addLongActions

void addLongActions(long actionMask,
                    java.lang.Object target)
Add a long action If the action is related to a shape, then the shape can be locked until action completion

Parameters:
actionMask -
target -
See Also:
LongAction

removeLongActions

void removeLongActions(long actionMask,
                       java.lang.Object target)
Remove a long action If the action was related to a shape and the shape was loacked then it becomes unlocked

Parameters:
actionMask -
target -
See Also:
LongAction

setPath

void setPath(java.io.File f)
Set the current directory used to select file If the implementation is based on a JFileChooser this value will be used to define the first directory displayed by this dialog

Parameters:
f - the directory

getPath

java.io.File getPath()
Get the current directory used to select files

Returns:
the current directory

open

boolean open(java.io.File f)
Open a file. The file is open according to available plugins. For instance, if one shape has a link the link action will call this method and if the file is a .syn then the related synoptic will be loaded.

Parameters:
f - the file to load
Returns:
true if file was sucessfully opened

setStatus

void setStatus(java.lang.String message)
Displays a status message

Parameters:
the - message to display

getFileChooser

javax.swing.JFileChooser getFileChooser()
Returns:
the frame to be used for dialogs creation

getIsOpenProcessCancelled

boolean getIsOpenProcessCancelled()
Returns:
true if open process has been cancelled

setIsOpenProcessCancelled

void setIsOpenProcessCancelled(boolean b)