|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
edu.rice.cs.drjava.ui.TabbedPanel
public abstract class TabbedPanel
Extended by all panels that can dynamically be added or removed from the _tabbedPane in MainFrame. Provides a boolean indicating if the panel is being displayed, and a close button. Attaches an action to the close button which calls the _close method. This method can be overwritten in a subclass if needed.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| 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 | |
|---|---|
protected JButton |
_closeButton
button which removes this pane's tab. |
private ActionListener |
_closeListener
Defines the action that takes place upon clicking the close button. |
protected JPanel |
_closePanel
|
protected boolean |
_displayed
indicates whether this tab is displayed in the tabbed pane. |
protected MainFrame |
_frame
|
protected JPanel |
_mainPanel
|
private String |
_name
|
(package private) DropTarget |
dropTarget
Drag and drop target. |
| 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 |
| Constructor Summary | |
|---|---|
TabbedPanel(MainFrame frame,
String name)
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
_close()
Visibly closes the panel and removes it from the frame. |
private void |
_setUpPanes()
Puts the close panel in the east of this panel and puts the main panel in the center. |
void |
addCloseListener(ActionListener l)
|
void |
dragEnter(DropTargetDragEvent dropTargetDragEvent)
User dragged something into the component. |
void |
dragExit(DropTargetEvent dropTargetEvent)
|
void |
dragOver(DropTargetDragEvent dropTargetDragEvent)
|
void |
drop(DropTargetDropEvent dropTargetDropEvent)
User dropped something on the component. |
void |
dropActionChanged(DropTargetDragEvent dropTargetDragEvent)
|
(package private) JPanel |
getMainPanel()
|
String |
getName()
|
boolean |
isDisplayed()
|
boolean |
requestFocusInWindow()
This is overridden so that when switch previous pane focus is called on the currentDefPane, the caret will move here on the first call. |
void |
setDisplayed(boolean displayed)
Sets whether the tab is displayed. |
void |
setVisible(boolean b)
|
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected volatile boolean _displayed
protected volatile JButton _closeButton
protected volatile JPanel _closePanel
protected volatile JPanel _mainPanel
protected volatile MainFrame _frame
private volatile String _name
private final ActionListener _closeListener
volatile DropTarget dropTarget
| Constructor Detail |
|---|
public TabbedPanel(MainFrame frame,
String name)
frame - MainFrame displaying the tabname - Name to display for the tab| Method Detail |
|---|
private void _setUpPanes()
protected void _close()
public void addCloseListener(ActionListener l)
public void setVisible(boolean b)
setVisible in class JComponentpublic boolean isDisplayed()
public String getName()
getName in class Componentpublic void setDisplayed(boolean displayed)
JPanel getMainPanel()
public boolean requestFocusInWindow()
requestFocusInWindow in class JComponentpublic void dragEnter(DropTargetDragEvent dropTargetDragEvent)
dragEnter in interface DropTargetListenerpublic void dragExit(DropTargetEvent dropTargetEvent)
dragExit in interface DropTargetListenerpublic void dragOver(DropTargetDragEvent dropTargetDragEvent)
dragOver in interface DropTargetListenerpublic void dropActionChanged(DropTargetDragEvent dropTargetDragEvent)
dropActionChanged in interface DropTargetListenerpublic void drop(DropTargetDropEvent dropTargetDropEvent)
drop in interface DropTargetListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||