org.argouml.ui
Class ProjectBrowser

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--javax.swing.JFrame
                                |
                                +--org.argouml.ui.ProjectBrowser
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, org.tigris.gef.ui.IStatusBar, java.awt.MenuContainer, NavigationListener, java.beans.PropertyChangeListener, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants

public class ProjectBrowser
extends javax.swing.JFrame
implements org.tigris.gef.ui.IStatusBar, NavigationListener, java.beans.PropertyChangeListener

The main window of the ArgoUML application.

See Also:
Serialized Form

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
 
Field Summary
protected  java.lang.String _appName
           
protected  DetailsPane _eastPane
           
protected  MultiEditorPane _editorPane
           
protected  DetailsPane _northEastPane
           
protected  DetailsPane _northPane
           
protected  DetailsPane _northWestPane
           
protected  DetailsPane _southEastPane
           
protected  DetailsPane _southPane
           
protected  StatusBar _statusBar
          partially implemented. needs work to display import of source and saving of zargo
protected  BorderSplitPane _workarea
           
protected static org.apache.log4j.Category cat
           
static int DEFAULT_COMPONENTHEIGHT
           
static int DEFAULT_COMPONENTWIDTH
           
 java.awt.Font defaultFont
          this needs work so that users can set the font size through a gui preference window
static ProjectBrowser TheInstance
           
 
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, ICONIFIED, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
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
ProjectBrowser()
          For testing purposes.
ProjectBrowser(java.lang.String appName, boolean doSplash)
           
 
Method Summary
protected  java.awt.Component createPanels(boolean doSplash)
          Creates the panels in the working area
 ArgoDiagram getActiveDiagram()
          Return the diagram, the user is currently working on.
 java.lang.String getAppName()
           
 java.lang.Object getDetailsTarget()
           
 MultiEditorPane getEditorPane()
           
 javax.swing.JMenuBar getJMenuBar()
           
 java.util.Locale getLocale()
           
 javax.swing.JPanel getNamedTab(java.lang.String tabName)
          Find the tabpage with the given label
 NavigatorPane getNavigatorPane()
          Returns the navigatorpane.
 SplashScreen getSplashScreen()
          Returns the splashscreen shown at startup.
 StatusBar getStatusBar()
           
 TabProps getTabProps()
          Get the tab page containing the properties
 java.lang.Object getTarget()
          return the current target in the editor pane
 ToDoPane getTodoPane()
          Returns the todopane.
 boolean isNavigateBackEnabled()
          Returns true if this listener has a target for a back navigation.
 boolean isNavigateForwardEnabled()
          Returns true if this listener has a target for a back navigation.
 void jumpToDiagramShowing(org.tigris.gef.util.VectorSet dms)
           
 void moduleDisabled(ArgoModuleEvent event)
           
 void moduleEnabled(ArgoModuleEvent event)
           
 void moduleUnloaded(ArgoModuleEvent event)
           
 boolean navigateBack(boolean attempt)
          Called to navigate to previous selection returns true if navigation performed
 boolean navigateForward(boolean attempt)
          Called to navigate to next selection returns true if navigation performed
 void navigateTo(java.lang.Object element)
          Called by a user interface element when a request to navigate to a model element has been received.
 void open(java.lang.Object element)
          Called by a user interface element when a request to open a model element in a new window has been recieved.
 void propertyChange(java.beans.PropertyChangeEvent evt)
           
 void saveScreenConfiguration()
          Save the positions of the screen spliters in the properties file
 void selectTabNamed(java.lang.String tabName)
          Find the tabpage with the given label and make it the front tab
 void setActiveDiagram(ArgoDiagram ad)
          Set the diagram on which the user is currently working.
 void setAppName(java.lang.String n)
           
 void setSplashScreen(SplashScreen splash)
          Sets the splashscreen.
 void setTarget(java.lang.Object o)
           
 void setTitle(java.lang.String title)
           
 void setToDoItem(java.lang.Object o)
          Select the tab page containing the todo item
 void setVisible(boolean b)
           
 void showStatus(java.lang.String s)
           
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getCursorType, getFrames, getIconImage, getMenuBar, getState, getTitle, isResizable, remove, removeNotify, setCursor, setIconImage, setMenuBar, setResizable, setState
 
Methods inherited from class java.awt.Window
addWindowListener, applyResourceBundle, applyResourceBundle, dispose, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isShowing, pack, postEvent, processEvent, removeWindowListener, setCursor, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, 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, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, 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, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

cat

protected static org.apache.log4j.Category cat

DEFAULT_COMPONENTWIDTH

public static final int DEFAULT_COMPONENTWIDTH

DEFAULT_COMPONENTHEIGHT

public static final int DEFAULT_COMPONENTHEIGHT

TheInstance

public static ProjectBrowser TheInstance

_appName

protected java.lang.String _appName

_editorPane

protected MultiEditorPane _editorPane

_northEastPane

protected DetailsPane _northEastPane

_northPane

protected DetailsPane _northPane

_northWestPane

protected DetailsPane _northWestPane

_eastPane

protected DetailsPane _eastPane

_southEastPane

protected DetailsPane _southEastPane

_southPane

protected DetailsPane _southPane

_statusBar

protected StatusBar _statusBar
partially implemented. needs work to display import of source and saving of zargo

defaultFont

public java.awt.Font defaultFont
this needs work so that users can set the font size through a gui preference window

_workarea

protected BorderSplitPane _workarea
Constructor Detail

ProjectBrowser

public ProjectBrowser()
For testing purposes. In tests this constructor can be called so TheInstance is filled.

ProjectBrowser

public ProjectBrowser(java.lang.String appName,
                      boolean doSplash)
Method Detail

getLocale

public java.util.Locale getLocale()
Overrides:
getLocale in class java.awt.Window

createPanels

protected java.awt.Component createPanels(boolean doSplash)
Creates the panels in the working area
Returns:
Component

setTitle

public void setTitle(java.lang.String title)
Overrides:
setTitle in class java.awt.Frame

getAppName

public java.lang.String getAppName()

setAppName

public void setAppName(java.lang.String n)

setTarget

public void setTarget(java.lang.Object o)

getTarget

public java.lang.Object getTarget()
return the current target in the editor pane

setActiveDiagram

public void setActiveDiagram(ArgoDiagram ad)
Set the diagram on which the user is currently working. When importing sources this should call the name of the folder from which the classes were imported. It should also default the model name as well. setTarget(java.lang.Object).

getActiveDiagram

public ArgoDiagram getActiveDiagram()
Return the diagram, the user is currently working on.

setToDoItem

public void setToDoItem(java.lang.Object o)
Select the tab page containing the todo item

getDetailsTarget

public java.lang.Object getDetailsTarget()

getTabProps

public TabProps getTabProps()
Get the tab page containing the properties
Returns:
the TabProps tabpage

getStatusBar

public StatusBar getStatusBar()

getJMenuBar

public javax.swing.JMenuBar getJMenuBar()
Overrides:
getJMenuBar in class javax.swing.JFrame

getEditorPane

public MultiEditorPane getEditorPane()

selectTabNamed

public void selectTabNamed(java.lang.String tabName)
Find the tabpage with the given label and make it the front tab
Parameters:
The - tabpage label
Returns:
false if no tab was found of given name

getNamedTab

public javax.swing.JPanel getNamedTab(java.lang.String tabName)
Find the tabpage with the given label
Parameters:
The - tabpage label
Returns:
the tabpage

jumpToDiagramShowing

public void jumpToDiagramShowing(org.tigris.gef.util.VectorSet dms)

setVisible

public void setVisible(boolean b)
Overrides:
setVisible in class java.awt.Component

showStatus

public void showStatus(java.lang.String s)
Specified by:
showStatus in interface org.tigris.gef.ui.IStatusBar

navigateTo

public void navigateTo(java.lang.Object element)
Called by a user interface element when a request to navigate to a model element has been received.
Specified by:
navigateTo in interface NavigationListener

open

public void open(java.lang.Object element)
Called by a user interface element when a request to open a model element in a new window has been recieved.
Specified by:
open in interface NavigationListener

navigateBack

public boolean navigateBack(boolean attempt)
Description copied from interface: NavigationListener
Called to navigate to previous selection returns true if navigation performed
Specified by:
navigateBack in interface NavigationListener
Following copied from interface: org.argouml.ui.NavigationListener
Parameters:
attempt - false if navigation accomplished by earlier listener
Returns:
true if navigation performed

navigateForward

public boolean navigateForward(boolean attempt)
Description copied from interface: NavigationListener
Called to navigate to next selection returns true if navigation performed
Specified by:
navigateForward in interface NavigationListener
Following copied from interface: org.argouml.ui.NavigationListener
Parameters:
attempt - false if navigation accomplished by earlier listener
Returns:
true if navigation performed

isNavigateBackEnabled

public boolean isNavigateBackEnabled()
Description copied from interface: NavigationListener
Returns true if this listener has a target for a back navigation. Only one listener needs to return true for the back button to be enabled.
Specified by:
isNavigateBackEnabled in interface NavigationListener

isNavigateForwardEnabled

public boolean isNavigateForwardEnabled()
Description copied from interface: NavigationListener
Returns true if this listener has a target for a back navigation. Only one listener needs to return true for the back button to be enabled.
Specified by:
isNavigateForwardEnabled in interface NavigationListener

saveScreenConfiguration

public void saveScreenConfiguration()
Save the positions of the screen spliters in the properties file

moduleUnloaded

public void moduleUnloaded(ArgoModuleEvent event)

moduleEnabled

public void moduleEnabled(ArgoModuleEvent event)

moduleDisabled

public void moduleDisabled(ArgoModuleEvent event)

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener
See Also:
PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)

getTodoPane

public ToDoPane getTodoPane()
Returns the todopane.
Returns:
ToDoPane

getNavigatorPane

public NavigatorPane getNavigatorPane()
Returns the navigatorpane.
Returns:
NavigatorPane The navigatorpane

getSplashScreen

public SplashScreen getSplashScreen()
Returns the splashscreen shown at startup.
Returns:
SplashScreen

setSplashScreen

public void setSplashScreen(SplashScreen splash)
Sets the splashscreen. Sets the current splashscreen to invisible
Parameters:
splash -  


ArgoUML (c) 1996-2002
ArgoUML Project Home
ArgoUML Cookbook