|
||||||||||
| 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
org.nuiton.widget.editor.NullEditor
public class NullEditor
Editor used when the have no file to edit
| 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 |
|---|
| 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 | |
|---|---|
NullEditor()
|
|
| Method Summary | |
|---|---|
boolean |
accept(File file)
If return true, this editor support this file type. |
void |
addCaretListener(CaretListener listener)
Add caret listener. |
void |
addDocumentListener(DocumentListener listener)
Add document listener. |
void |
copy()
Copy current current selection into system clipboard. |
void |
cut()
Cut current editor selection into system clipboard. |
String |
getText()
Return the current content text of the editor as String. |
boolean |
isModified()
when there is no file opened, the file is not modified. |
boolean |
open(File file)
Do nothing, can't open file, on Null editor. |
void |
paste()
Paste current clicboard content into editor at caret position. |
void |
removeCaretListener(CaretListener listener)
Remove caret listener. |
void |
removeDocumentListener(DocumentListener listener)
Remove document listener. |
boolean |
saveAs(File file)
Do nothing, can't save file, on Null editor |
void |
setText(String text)
Set all text with text in argument. |
| 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 |
| Methods inherited from interface org.nuiton.widget.editor.EditorInterface |
|---|
setEnabled |
| Constructor Detail |
|---|
public NullEditor()
| Method Detail |
|---|
public void addDocumentListener(DocumentListener listener)
EditorInterface
addDocumentListener in interface EditorInterfacelistener - listenerpublic void removeDocumentListener(DocumentListener listener)
EditorInterface
removeDocumentListener in interface EditorInterfacelistener - listenerpublic void addCaretListener(CaretListener listener)
EditorInterface
addCaretListener in interface EditorInterfacelistener - listenerpublic void removeCaretListener(CaretListener listener)
EditorInterface
removeCaretListener in interface EditorInterfacelistener - listenerpublic boolean accept(File file)
EditorInterfacetrue.
accept in interface EditorInterfacefile - file to test
true, this editor support this file type.public boolean isModified()
isModified in interface EditorInterfacepublic boolean open(File file)
open in interface EditorInterfacefile - the file to open
public boolean saveAs(File file)
saveAs in interface EditorInterfacefile - the file to open
public String getText()
EditorInterfaceString.
getText in interface EditorInterfaceStringpublic void setText(String text)
EditorInterface
setText in interface EditorInterfacetext - test to setpublic void copy()
EditorInterface
copy in interface EditorInterfacepublic void cut()
EditorInterface
cut in interface EditorInterfacepublic void paste()
EditorInterface
paste in interface EditorInterface
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||