|
JET | |||||||||
| 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.utep.cs.et.gui.DefaultStatusBar
class DefaultStatusBar
A simple status bar that can display the current file name and the current line and column numbers.
| 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 | |
|---|---|
private JTextField |
filenameField
The area where to display the current file name. |
private JTextField |
lineColumnField
The area where to display the current line and column numbers. |
private static int |
MIN_FIELD_SIZE
The minimum column size of text fields. |
| 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 | |
|---|---|
DefaultStatusBar()
Creates a new instance. |
|
| Method Summary | |
|---|---|
private int |
calcColumnSize(int numChars)
Calculates the column size of the text field based on the length of strings to be displayed. |
void |
fileOpened(File file)
Displays the given file name on this status bar. |
FileChangeListener |
getFileChangeListener()
Returns a file change listener that listens to the opening and closing of the file being edited by the editor. |
LineChangeListener |
getLineChangeListener()
Returns a line change listener that listens to the changes of line and column numbers of the document being edited by the editor. |
JComponent |
getView()
Returns the staus bar pane that can be added to the main GUI. |
void |
lineChanged(int line,
int column)
Displays the given line and column numbers on this status bar. |
| 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 |
|---|
private JTextField filenameField
private JTextField lineColumnField
private static final int MIN_FIELD_SIZE
| Constructor Detail |
|---|
public DefaultStatusBar()
| Method Detail |
|---|
public JComponent getView()
getView in interface StatusBarpublic LineChangeListener getLineChangeListener()
getLineChangeListener in interface StatusBarpublic FileChangeListener getFileChangeListener()
getFileChangeListener in interface StatusBar
public void lineChanged(int line,
int column)
LineChangeListener interface.
lineChanged in interface LineChangeListenerpublic void fileOpened(File file)
FileChangeListener interface.
fileOpened in interface FileChangeListenerprivate int calcColumnSize(int numChars)
|
JET | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||