|
||||||||||
| 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
edu.rice.cs.util.swing.SwingFrame
edu.rice.cs.drjava.ui.DetachedFrame
public class DetachedFrame
| Nested Class Summary | |
|---|---|
static class |
DetachedFrame.FrameState
Class to save the frame state, i.e. |
| Nested classes/interfaces inherited from class javax.swing.JFrame |
|---|
JFrame.AccessibleJFrame |
| Nested classes/interfaces inherited from class java.awt.Frame |
|---|
Frame.AccessibleAWTFrame |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
Window.AccessibleAWTWindow |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
(package private) Runnable1<DetachedFrame> |
_detach
Lambda to execute when component is being detached. |
private OptionListener<Vector<KeyStroke>> |
_keyBindingOptionListener
OptionListener responding to changes for the undo/redo key bindings. |
private DetachedFrame.FrameState |
_lastState
Last frame state. |
private HashMap<PropertyChangeListener,JMenuItem> |
_listenersToRemoveWhenDisposed
Listeners that need to be removed when this frame is disposed. |
private MainFrame |
_mainFrame
Main frame. |
private InputMap |
_oldInputMap
Old InputMap without accelerators added. |
(package private) Runnable1<DetachedFrame> |
_reattach
Lambda to execute when component is being re-attached. |
private WindowAdapter |
_wa
Window adapter to re-attach the tabbed pane when the window is closed. |
| 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 |
| Constructor Summary | |
|---|---|
DetachedFrame(String name,
MainFrame mf,
Runnable1<DetachedFrame> detach,
Runnable1<DetachedFrame> reattach)
Create a tabbed pane frame. |
|
| Method Summary | |
|---|---|
protected void |
copyAccelerators(JMenuBar source,
JMenuBar dest)
Recursively copy the first menu bar's accelerators into the second menu bar. |
protected void |
copyAccelerators(MenuElement source,
MenuElement dest)
Recursively copy the first menu's accelerators into the second menu. |
void |
dispose()
|
DetachedFrame.FrameState |
getFrameState()
Returns the last state of the frame, i.e. |
protected static void |
processMenuElement(MenuElement elt,
InputMap im,
ActionMap am)
Recursively process the MenuElement and add entries to the InputMap and ActionMap so that the menu element's accelerator will invoke the menu element's action even if the MenuElement is not present in another frame. |
void |
setDisplayInFrame(boolean b)
Set whether the the tabbed pane is displayed in this frame. |
void |
setFrameState(DetachedFrame.FrameState ds)
Sets state of the frame, i.e. |
void |
setFrameState(String s)
Sets state of the frame, i.e. |
void |
setUpMenuBar()
|
void |
setVisible(boolean vis)
Toggle visibility of this frame. |
void |
updateKeyBindings()
Update the key bindings from the MainFrame menu bar. |
| Methods inherited from class edu.rice.cs.util.swing.SwingFrame |
|---|
duringInit, initDone |
| Methods inherited from class java.awt.Frame |
|---|
addNotify, 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.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.MenuContainer |
|---|
getFont, postEvent |
| Field Detail |
|---|
Runnable1<DetachedFrame> _detach
Runnable1<DetachedFrame> _reattach
private DetachedFrame.FrameState _lastState
private MainFrame _mainFrame
private WindowAdapter _wa
private final InputMap _oldInputMap
private final HashMap<PropertyChangeListener,JMenuItem> _listenersToRemoveWhenDisposed
private final OptionListener<Vector<KeyStroke>> _keyBindingOptionListener
| Constructor Detail |
|---|
public DetachedFrame(String name,
MainFrame mf,
Runnable1<DetachedFrame> detach,
Runnable1<DetachedFrame> reattach)
name - frame namemf - the MainFramedetach - command to detach the component. The parameter is the instance of DetachedFrame that may contain the component.reattach - command to re-attach the component. The parameter is the instance of DetachedFrame that may contain the component.| Method Detail |
|---|
public DetachedFrame.FrameState getFrameState()
public void setFrameState(DetachedFrame.FrameState ds)
ds - State to update to, or null to resetpublic void setFrameState(String s)
s - State to update to, or null to reset
protected static void processMenuElement(MenuElement elt,
InputMap im,
ActionMap am)
protected void copyAccelerators(JMenuBar source,
JMenuBar dest)
protected void copyAccelerators(MenuElement source,
MenuElement dest)
public void updateKeyBindings()
public void dispose()
dispose in class Windowpublic void setUpMenuBar()
public void setVisible(boolean vis)
setVisible in class Windowpublic void setDisplayInFrame(boolean b)
b - true to display the tabbed pane in this window, false to display it in the MainFrame split pane
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||