|
|||||||||
| 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.ceryle.ui.EditorPanel
public class EditorPanel
A subclass of JPanel providing an editing view of text content, specifically used for editing document and database Node (ie., record) contents, including some basic node metadata such as creation and modification timestamps, etc.
Note that because some metadata fields are auto-filled, some are entered by hand, and they vary in how they are stored, entified, and used entified. Their get() methods are not consistent in how they return "empty" values, i.e., some return null, some perform whitespace trimming or normalization.
| 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.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected JButton |
btn_meta_viz
The corner maximize/minimize button. |
static boolean |
canUndo
If true (the default) the Undo/Redo features will be active. |
protected Document |
doc
The javax.swing.text.Document content of the editor window. |
protected EventListenerList |
listenerList
List of edit event listeners. |
protected CompoundEdit |
m_compoundEdit
The CompoundEdit object, used only during multiple edits. |
protected org.ceryle.ui.EditorPanel.RedoAction |
redoAction
Handles redo edits. |
boolean |
suppressDirtyStateChange
When true, suppresses changes to the editor dirtiness state. |
static int |
TAB_CONTENT
An int constant indicating the content tab. |
static int |
TAB_METADATA
An int constant indicating the metadata tab. |
static int |
TAB_REVISIONS
An int constant indicating the revisions tab. |
protected JTabbedPane |
tabbedpane
|
protected org.ceryle.ui.EditorPanel.UndoAction |
undoAction
Handles undo edits. |
protected UndoableEditListener |
undoHandler
Listener for edits on current document. |
protected UndoManager |
undoManager
UndoManager to which are added edits. |
protected boolean |
useCornerButton
When true, the corner maximize/minimize button is included. |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, 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 | |
|---|---|
EditorPanel(DocumentView documentview)
Constructor with the parent DocumentView documentView. |
|
| Method Summary | |
|---|---|
void |
addDirtyListener(DirtyListener listener)
Add a listener for changes to the dirty state. |
void |
beginCompoundEdit()
Begins a compound edit session. |
void |
clearAll(boolean clearTextArea)
Clears all metadata fields. |
void |
copy()
Copies the text area's selection to the system clipboard. |
void |
cut()
Deletes the text area's current selection, placing it into the system clipboard. |
void |
endCompoundEdit()
Ends a compound edit session. |
protected void |
fireDirtyStateChanged()
Notify all listeners that have registered interest for notification on this event type. |
String |
getCID()
Returns the collection ID. |
String |
getContributor()
Returns the contributor. |
String |
getCreated()
Returns the creation date. |
String |
getCreator()
Returns the creator. |
String |
getDescription()
Returns the description. |
protected DocumentView |
getDocumentView()
Return the parent DocumentView. |
Document |
getEditorDocument()
Returns the javax.swing.text.Document (currently, a PlainDocument) used as the content storage for this DocumentView's editor text area. |
String |
getEditorSelectedText()
Returns the selected text of the editor text area. |
String |
getFormat()
Returns the format (MIME type). |
String |
getHarmonizedNid()
Returns the node ID, harmonized with the Node ID list in DocumentView. |
String |
getIsMetadataReference()
Returns the isMetadataReference. |
MetadataPanel |
getMetadataPanel()
Returns the metadata panel. |
String |
getModified()
Returns the modified date. |
String |
getNID()
Returns the node ID. |
protected org.ceryle.ui.EditorPanel.RedoAction |
getRedoAction()
Returns the current RedoAction. |
String |
getReferences()
Returns the DCTERMS.references as a WS-delimited String. |
String |
getRevision()
Returns the revision number. |
XNodeRevisionManagerPanel |
getRevisionManagerPanel()
Returns the third XNodeRevisionManagerPanel tab panel. |
HorizontalRuler |
getRuler()
Return the horizontal ruler. |
int |
getSelectedTab()
Returns the int indicating which tab is currently selected. |
String |
getSource()
Returns the source. |
String |
getSubject()
Returns the subject. |
String |
getSystemId()
Returns the systemId. |
String |
getText()
Returns the content of the JTextArea as a String. |
EditorArea |
getTextArea()
Returns the node content JTextArea. |
String |
getTitle()
Returns the document title. |
protected org.ceryle.ui.EditorPanel.UndoAction |
getUndoAction()
Returns the current UndoAction. |
protected UndoManager |
getUndoManager()
Returns the UndoManager used by this EditorPanel. |
boolean |
isDirty()
Returns true if the current document has been edited. |
boolean |
isMetadataVisible()
Returns the current visibility of the metadata panel. |
boolean |
isTitleVisible()
Returns the current visibility of the title panel. |
void |
paste()
Pastes the system clipboard to either the text area's selection or its current caret 'dot' position. |
void |
redo()
Reverses the previous undo action. |
void |
removeDirtyListener(DirtyListener listener)
Remove a listener for changes to the dirty state. |
void |
requestFocus()
Sets the current focus to the editor text area. |
protected void |
resetUndoManager()
Resets the undo manager. |
void |
scrollToLine(int line)
Scrolls the document content to line line of the document. |
void |
selectAll()
Selects the entire content of the text area. |
void |
setCID(String cid,
boolean strict)
Sets the collection ID. |
void |
setContributor(String contributor)
Sets the contributor. |
void |
setCreated(String created)
Sets the creation date. |
void |
setCreator(String creator)
Sets the creator. |
void |
setDescription(String description)
Sets the description. |
protected void |
setDirty(boolean dirty)
Sets the state indicating that the current document has been edited. |
void |
setEditorDocument(Document document)
Set the Document of the editor text area to the doc. |
void |
setEditorText(String content)
Sets the content of the editor text area to the provided String content, to an empty String if s is null. |
void |
setFormat(String format)
Sets the format (MIME type). |
void |
setIsMetadataReference(String source)
Sets the isMetadataReference. |
void |
setMetadataVisible(boolean visible)
Shows or hides the metadata panels surrounding the text area. |
void |
setModified(String modified)
Sets the modified date. |
void |
setNID(String nid,
boolean strict)
Sets the node ID. |
void |
setReferences(String references)
Sets the DCTERMS.references value. |
void |
setRevision(String revision)
Sets the revision number. |
protected void |
setScrollBarPolicy(boolean always)
Sets the editor's scrollbar policy to either always present or only as needed. |
protected void |
setSelectedTab(int tab)
Set the selected tab to the indicated tab. |
void |
setSource(String source)
Sets the source. |
void |
setSubject(String subject)
Sets the subject. |
void |
setSystemId(String systemId)
Sets the systemId. |
void |
setTitle(String title)
Sets the document title. |
void |
setTitleVisible(boolean visible)
Sets the visibility of the title panel to the boolean visible. |
void |
setXID(XNodeID xid,
boolean strict)
Sets the Collection and Node IDs from the provided XNodeID. |
void |
undo()
Reverses the previous edit action. |
| 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 |
|---|
public static final int TAB_CONTENT
public static final int TAB_METADATA
public static final int TAB_REVISIONS
public static boolean canUndo
protected Document doc
protected boolean useCornerButton
public boolean suppressDirtyStateChange
protected JButton btn_meta_viz
protected org.ceryle.ui.EditorPanel.UndoAction undoAction
protected org.ceryle.ui.EditorPanel.RedoAction redoAction
protected CompoundEdit m_compoundEdit
protected final UndoableEditListener undoHandler
protected final UndoManager undoManager
protected EventListenerList listenerList
protected JTabbedPane tabbedpane
| Constructor Detail |
|---|
public EditorPanel(DocumentView documentview)
| Method Detail |
|---|
protected DocumentView getDocumentView()
protected void setSelectedTab(int tab)
public int getSelectedTab()
TAB_CONTENT, TAB_METADATA,
or TAB_REVISIONS.
public HorizontalRuler getRuler()
protected void setScrollBarPolicy(boolean always)
public MetadataPanel getMetadataPanel()
public void setCreated(String created)
MetadataPanel.
public String getCreated()
MetadataPanel.
public void setModified(String modified)
public String getModified()
public void setTitle(String title)
public String getTitle()
public void setSystemId(String systemId)
public String getSystemId()
public void setXID(XNodeID xid,
boolean strict)
throws ProcessException
ProcessExceptionMetadataPanel.setCID(String,boolean),
MetadataPanel.setNID(String,boolean)
public void setCID(String cid,
boolean strict)
throws ProcessException
MetadataPanel.setCID(String,boolean).
ProcessExceptionpublic String getCID()
public void setNID(String nid,
boolean strict)
throws ProcessException
MetadataPanel.setNID(String,boolean).
ProcessExceptionpublic String getNID()
public String getHarmonizedNid()
throws ProcessException
ProcessExceptionpublic void setCreator(String creator)
public String getCreator()
public void setContributor(String contributor)
public String getContributor()
public void setRevision(String revision)
public String getRevision()
public void setFormat(String format)
public String getFormat()
public void setSource(String source)
public String getSource()
public void setIsMetadataReference(String source)
public String getIsMetadataReference()
public void setSubject(String subject)
public String getSubject()
public void setDescription(String description)
public String getDescription()
public void setReferences(