|
||||||||||
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
lapisx.swing.FileEditorPanel
Nested Class Summary |
Nested classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
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 | |
FileEditorPanel()
|
|
FileEditorPanel(JTextComponent myEditor)
|
Method Summary | |
void |
addColorChooser()
Add a Select Color button that allows the background color for the text editor to be changed. |
void |
addFileMenu()
Add a file "menu" (actually a combo box) to the toolbar. |
void |
clear()
Clear the editor. |
boolean |
getDirty()
Return the value of the dirty flag, which signals whether or not the editor's contents have been changed but not saved. |
JTextComponent |
getEditor()
Return the editor. |
Document |
getEditorDocument()
Return the document for the editor. |
int |
getEditorSelectionEnd()
Return the ending index of the selection in the editor. |
int |
getEditorSelectionStart()
Return the starting index of the selection in the editor. |
File |
getFile()
Return the file from which the editor contents were loaded, or null if there was none. |
String |
getText()
Return editor contents. |
JToolBar |
getToolBar()
Return the toolbar. |
protected void |
handleInteractiveException(Exception exception)
|
protected FileChooser |
makeFileChooser()
Make a file-chooser object. |
boolean |
okToClear()
Check whether or not the editor has unsaved content; if there is, pops up a dialog box to ask if editor contents should be saved. |
void |
open()
Pop up a file-open dialog to open a file into the editor. |
void |
open(File f)
Open a file (or URL) in the editor. |
boolean |
save()
Pop up a save-as dialog box, then saves the editor contents. |
boolean |
save(File f)
Save editor contents to a local file. |
void |
setDirty(boolean dirty)
Set the dirty flag to the new boolean value. |
void |
setFile(File file)
Set the file from which the editor contents are loaded. |
void |
setText(String text)
Set the editor contents. |
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 |
Constructor Detail |
public FileEditorPanel()
public FileEditorPanel(JTextComponent myEditor)
Method Detail |
protected void handleInteractiveException(Exception exception)
public void clear()
public boolean okToClear()
public void open()
protected FileChooser makeFileChooser()
public void open(File f)
f
- File to openpublic boolean save()
public boolean save(File f)
f
- Local file to savepublic String getText()
public void setText(String text)
public JTextComponent getEditor()
public int getEditorSelectionStart()
public int getEditorSelectionEnd()
public Document getEditorDocument()
public JToolBar getToolBar()
public boolean getDirty()
public void setDirty(boolean dirty)
public File getFile()
public void setFile(File file)
public void addFileMenu()
public void addColorChooser()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |