|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
org.argouml.ui.ProjectBrowser
public final class ProjectBrowser
The main window of the ArgoUML application.
Nested Class Summary | |
---|---|
static class |
ProjectBrowser.Position
Position of pane in overall browser window. |
Nested classes/interfaces inherited from class javax.swing.JFrame |
---|
javax.swing.JFrame.AccessibleJFrame |
Nested classes/interfaces inherited from class java.awt.Frame |
---|
java.awt.Frame.AccessibleAWTFrame |
Nested classes/interfaces inherited from class java.awt.Window |
---|
java.awt.Window.AccessibleAWTWindow |
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 | |
---|---|
static int |
DEFAULT_COMPONENTHEIGHT
Default height. |
static int |
DEFAULT_COMPONENTWIDTH
Default width. |
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, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, 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 |
Method Summary | |
---|---|
void |
addFileSaved(java.io.File file)
Register a new file saved. |
void |
addPanel(java.awt.Component comp,
ProjectBrowser.Position position)
Add a panel to a split pane area. |
boolean |
askConfirmationAndSave()
If the current project is dirty (needs saving) then this function will ask confirmation from the user. |
void |
buildTitleWithCurrentProjectName()
Rebuild the title using the name of the current project. |
void |
clearDialogs()
We should remove all open dialogs. |
protected void |
createPanels(SplashScreen splash,
javax.swing.JPanel leftBottomPane)
Creates the panels in the working area. |
void |
dispose()
|
void |
exit()
Exit the application saving the current user settings. |
java.lang.String |
getAppName()
|
java.awt.Font |
getDefaultFont()
|
javax.swing.JPanel |
getDetailsPane()
|
MultiEditorPane |
getEditorPane()
|
org.argouml.ui.NavigatorPane |
getExplorerPane()
|
static ProjectBrowser |
getInstance()
Singleton retrieval method for the projectbrowser. |
javax.swing.JMenuBar |
getJMenuBar()
|
java.util.Locale |
getLocale()
|
protected java.io.File |
getNewFile()
|
javax.swing.AbstractAction |
getRemoveFromDiagramAction()
Get the action that removes selected figs from the diagram. |
javax.swing.AbstractAction |
getSaveAction()
Get the action that can save the current project. |
StatusBar |
getStatusBar()
|
AbstractArgoJPanel |
getTab(java.lang.Class tabClass)
Deprecated. by for 0.25.5 by tfmorris. Tabs should register themselves with whoever they need to communicate with in a distributed fashion rather than relying on a central registry. Currently the only place this is used is to communicate between WizStep and TabToDo in the Cognitive subsystem. |
javax.swing.JPanel |
getTodoPane()
Returns the todopane. |
boolean |
loadProject(java.io.File file,
boolean showUI,
ProgressMonitor pmw)
Loads the project file and opens all kinds of error message windows if it doesn't work for some reason. |
void |
loadProjectWithProgressMonitor(java.io.File file,
boolean showUI)
Loads a project displaying a nice ProgressMonitor |
static ProjectBrowser |
makeInstance(SplashScreen splash,
boolean mainApplication,
javax.swing.JPanel leftBottomPane)
Creator method for the ProjectBrowser which optionally allows all components to be created without making a top level application window visible. |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
|
void |
removePanel(java.awt.Component comp)
Remove a panel from a split pane area. |
void |
setAppName(java.lang.String n)
|
void |
setToDoItem(java.lang.Object o)
Deprecated. for 0.25.5 by tfmorris. Send an event that the DetailsPane/TabToDo will be listening for. |
void |
setVisible(boolean b)
|
void |
showSaveIndicator()
Set the save indicator (the * after the title) to appear depending on the current save action enabled status. |
void |
targetAdded(TargetEvent e)
Fired when a target is added to the list of targets. |
void |
targetRemoved(TargetEvent e)
Fired when a target is removed from the list of targets |
void |
targetSet(TargetEvent e)
Fired when a total new set of targets is set |
void |
tryExit()
Exit the application if no save is required. |
void |
trySave(boolean overwrite)
Try to save the project, possibly not creating a new file |
void |
trySave(boolean overwrite,
boolean saveNewFile)
Try to save the project. |
void |
trySave(boolean overwrite,
boolean saveNewFile,
boolean exitAfterSave)
Try to save the project. |
boolean |
trySave(boolean overwrite,
java.io.File file,
ProgressMonitor pmw)
Deprecated. in 0.29.1 by Bob Tarling use trySaveWithProgressMonitor |
void |
trySaveWithProgressMonitor(boolean overwrite,
java.io.File file,
boolean exit)
Loads a project displaying a nice ProgressMonitor |
Methods inherited from class javax.swing.JFrame |
---|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
Methods inherited from class java.awt.Frame |
---|
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, show, toBack, toFront |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, show, size, toString, transferFocus, transferFocusUpCycle |
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 |
---|
public static final int DEFAULT_COMPONENTWIDTH
public static final int DEFAULT_COMPONENTHEIGHT
Method Detail |
---|
public static ProjectBrowser getInstance()
public static ProjectBrowser makeInstance(SplashScreen splash, boolean mainApplication, javax.swing.JPanel leftBottomPane)
splash
- true if we are allowed to show a splash screenmainApplication
- true to create a top level application, false if integrated
with something else.leftBottomPane
- panel to place in the bottom left corner of the GUI
public java.util.Locale getLocale()
getLocale
in class java.awt.Window
protected void createPanels(SplashScreen splash, javax.swing.JPanel leftBottomPane)
splash
- true if we show the splashscreen during startupleftBottomPane
- panel to be placed in the bottom left (southwest)
corner of the UI.public void addPanel(java.awt.Component comp, ProjectBrowser.Position position)
comp
- the panel to addposition
- the position where the panel should be addedpublic void removePanel(java.awt.Component comp)
comp
- the panel to removepublic void showSaveIndicator()
public java.lang.String getAppName()
public void setAppName(java.lang.String n)
n
- the application name ("ArgoUML") as shown in the titlebar@Deprecated public void setToDoItem(java.lang.Object o)
o
- the todo item to select@Deprecated public AbstractArgoJPanel getTab(java.lang.Class tabClass)
tabClass
- the given class
public StatusBar getStatusBar()
public javax.swing.JMenuBar getJMenuBar()
getJMenuBar
in class javax.swing.JFrame
public MultiEditorPane getEditorPane()
public org.argouml.ui.NavigatorPane getExplorerPane()
public javax.swing.JPanel getDetailsPane()
public void setVisible(boolean b)
setVisible
in class java.awt.Component
public void tryExit()
public void exit()
public void dispose()
dispose
in class java.awt.Window
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
public void targetAdded(TargetEvent e)
TargetListener
targetAdded
in interface TargetListener
e
- The targetevent, name will be TARGET_ADDEDpublic void targetRemoved(TargetEvent e)
TargetListener
targetRemoved
in interface TargetListener
e
- The targetevent, name will be TARGET_REMOVEDpublic void targetSet(TargetEvent e)
TargetListener
targetSet
in interface TargetListener
e
- The targetevent, name will be TARGET_SETpublic javax.swing.JPanel getTodoPane()
public java.awt.Font getDefaultFont()
public void trySave(boolean overwrite)
overwrite
- if true, then we overwrite without askingpublic void trySave(boolean overwrite, boolean saveNewFile)
overwrite
- if true, then we overwrite without askingsaveNewFile
- if true, we'll ask for a new file even if
the current project already had onepublic void trySave(boolean overwrite, boolean saveNewFile, boolean exitAfterSave)
overwrite
- if true, then we overwrite without askingsaveNewFile
- if true, we'll ask for a new file even if
the current project already had oneexitAfterSave
- The application will exit when the save has
completed successfullypublic void trySaveWithProgressMonitor(boolean overwrite, java.io.File file, boolean exit)
overwrite
- if true, the file is going to be overwrittenfile
- the target file
TODO: Separate this into a Swing specific class - tfmpublic void buildTitleWithCurrentProjectName()
@Deprecated public boolean trySave(boolean overwrite, java.io.File file, ProgressMonitor pmw)
overwrite
- if true, then we overwrite without askingfile
- the File to save topmw
- the ProgressMonitor to be updated;
public void addFileSaved(java.io.File file) throws java.io.IOException
file
- The file.
java.io.IOException
- if we cannot get the file name from the file.public boolean askConfirmationAndSave()
public void loadProjectWithProgressMonitor(java.io.File file, boolean showUI)
file
- the project to be openedshowUI
- whether to show the GUI or not
TODO: This needs to be refactored to be GUI independent - tfmpublic boolean loadProject(java.io.File file, boolean showUI, ProgressMonitor pmw)
file
- the file to open.showUI
- true if an error message may be shown to the user,
false if run in commandline modepmw
- the ProgressMonitor to be updated;
if not needed, use null
public void clearDialogs()
public javax.swing.AbstractAction getSaveAction()
public javax.swing.AbstractAction getRemoveFromDiagramAction()
protected java.io.File getNewFile()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2006 | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |