|
|||||||||||
| 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.bs.mdi.swing.SwingRootView
An implementation of a RootView using Swing technology.
| 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 | |
SwingRootView()
Creates a new root view. |
|
| Method Summary | |
void |
actionPerformed(ActionObservable observable,
Action action)
Called from the ActionObservable when an action has been performed or redone. |
void |
actionUndone(ActionObservable observable,
Action action)
Called from the ActionObservable when an action has been undone. |
void |
addChild(View child)
Adds a child element. |
void |
addObserver(ActionObserver observer)
Registers this observer so that it will receive notification messages. |
void |
applyAction(Action action)
Applies an action or perform a redo. |
abstract Action |
copy()
Perform a "copy to clipboard" operation. |
int |
countChildren()
Counts all child elements. |
int |
countObservers()
Counts all registered observers. |
abstract Action |
cut()
Perform a "cut to clipboard" operation. |
abstract void |
delete()
Perform a delete operation. |
View |
getChild(int index)
Gets the child element at the specified index. |
Data |
getData()
Returns the Data object associated with this view. |
Document |
getDocument()
Returns the document which this view is assigned to. |
View |
getParentView()
Gets the parent View object, or null if there is no parent object (i.e. this is probably a RootView object). |
DocumentWindow |
getWindow()
Returns the window which is displaying this view. |
boolean |
isCopyPossible()
Returns true if content can be copied to the clipboard. |
boolean |
isCutPossible()
Returns true if content can be cutted to the clipboard. |
boolean |
isDeletePossible()
Returns true if content can be deleted. |
boolean |
isObserver(ActionObserver observer)
Determines if the given observer is currently observing this object. |
boolean |
isPastePossible()
Returns true if content can be pasted from the clipboard. |
void |
notifyObservers(Action action,
boolean undo)
Notifies the observers about an action which has been recently performed. |
abstract void |
paste(Action action)
Perform a "paste from clipboard" operation. |
void |
removeChild(View child)
Removes a child element. |
void |
removeObserver(ActionObserver observer)
Un-registers this observer so that it will not receive notifications any longer. |
void |
setCopyPossible(boolean possible)
Enables or disables copying to the clipboard. |
void |
setCutPossible(boolean possible)
Enables or disables cutting to the clipboard. |
void |
setData(Data data)
Associates this View with the given Data object. |
void |
setDeletePossible(boolean possible)
Enables or disables deleting operations. |
void |
setPastePossible(boolean possible)
Enables or disables pasting from the clipboard. |
abstract void |
syncWithData()
Called from the Data object to indicate that the documents data has changed. |
void |
undoAction(Action action)
Perform an undo. |
void |
windowChanged(DocumentWindow window)
Called from within the framework to indicate that the view's window has changed. |
| 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 SwingRootView()
| Method Detail |
public Document getDocument()
ViewgetData().getDocument.
getDocument in interface Viewpublic void setData(Data data)
View
setData in interface Viewdata - the Data objectpublic Data getData()
View
getData in interface Viewpublic View getParentView()
ViewRootView object).
getParentView in interface Viewpublic void addChild(View child)
View
addChild in interface Viewchild - the child elementpublic void removeChild(View child)
View
removeChild in interface Viewchild - the child elementpublic int countChildren()
View
countChildren in interface Viewpublic View getChild(int index)
View
getChild in interface Viewindex - the index
public void windowChanged(DocumentWindow window)
RootView
windowChanged in interface RootViewwindow - the new windowpublic DocumentWindow getWindow()
RootView
getWindow in interface RootViewpublic abstract Action copy()
View
copy in interface Viewpublic abstract Action cut()
View
cut in interface Viewpublic abstract void paste(Action action)
View
paste in interface Viewaction - the action object containing the information to be pastedpublic abstract void delete()
View
delete in interface Viewpublic final boolean isCopyPossible()
View
isCopyPossible in interface Viewpublic final boolean isCutPossible()
View
isCutPossible in interface Viewpublic final boolean isPastePossible()
View
isPastePossible in interface Viewpublic final boolean isDeletePossible()
View
isDeletePossible in interface Viewpublic void setCopyPossible(boolean possible)
View
setCopyPossible in interface Viewpossible - true if copying is possible, false otherwisepublic void setCutPossible(boolean possible)
View
setCutPossible in interface Viewpossible - true if cutting is possible, false otherwisepublic void setPastePossible(boolean possible)
View
setPastePossible in interface Viewpossible - true if pasting is possible, false otherwisepublic void setDeletePossible(boolean possible)
View
setDeletePossible in interface Viewpossible - true if deleting is possible, false otherwisepublic abstract void syncWithData()
ViewThe view update or redraw its contents the reflect that changes.
syncWithData in interface Viewpublic void addObserver(ActionObserver observer)
ActionObservable
addObserver in interface ActionObservableobserver - the observer to be registeredpublic void removeObserver(ActionObserver observer)
ActionObservable
removeObserver in interface ActionObservableobserver - the observer to be un-registeredpublic int countObservers()
ActionObservable
countObservers in interface ActionObservablepublic boolean isObserver(ActionObserver observer)
ActionObservable
isObserver in interface ActionObservableobserver - the observer
public void notifyObservers(Action action,
boolean undo)
ActionObservable
notifyObservers in interface ActionObservableaction - the action which has been performedundo - true if the action has been undone, false otherwise
public void actionPerformed(ActionObservable observable,
Action action)
ActionObserverActionObservable when an action has been performed or redone.
actionPerformed in interface ActionObserverobservable - the observable which this notification originated fromaction - the action which has been performed
public void actionUndone(ActionObservable observable,
Action action)
ActionObserverActionObservable when an action has been undone.
actionUndone in interface ActionObserverobservable - the observable which this notification originated fromaction - the action which has been undonepublic void applyAction(Action action)
ActionProcessor
applyAction in interface ActionProcessoraction - the action to be applied or redonepublic void undoAction(Action action)
ActionProcessor
undoAction in interface ActionProcessoraction - the action to be undone
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||