|
|||||||||||
| 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
com.fg.xmleditor.FXBasicView
FXBasicView Swing component provides all the basic XML
viewer/editor functionality. A data model object for the FXBasicView
has to implement FXModel interface.
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Field Summary |
| Fields inherited from class javax.swing.JComponent |
TOOL_TIP_TEXT_KEY, 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 | |
FXBasicView()
Creates an instance of FXBasicView component with default FXDocumentModelImpl data model. |
|
FXBasicView(FXModel model)
Creates an instance of FXBasicView component, which refers to the specified data model object. |
|
| Method Summary | |
void |
addExternalDialog(java.lang.String id,
javax.swing.JDialog dialog)
Method registers an external dialog under the specified id. |
void |
addViewStatusListener(FXViewStatusListener l)
Adds an FXChangeListener listener. |
static void |
cancelCellEditing(javax.swing.JComponent editor)
Method has to be called from some "valueChanged" event handler of the field editing component in order to cancel editing. |
boolean |
cancelEditing()
Method cancels node editing and discards a value from the editor. |
boolean |
canInsert()
Returns true if the parent of the current selected node allows
performing insertNodeBefore() and insertNodeAfter()
operations and false otherwise. |
boolean |
canMoveDown()
Returns true if the current selected node can swap position
with its following sibling (see moveNodeDown()) and
false otherwise. |
boolean |
canMoveUp()
Returns true if the current selected node can swap position
with its preceding sibling (see moveNodeUp()) and
false otherwise. |
boolean |
canRemove()
Returns true if the current selected node can be removed
(see removeNode()) and false otherwise. |
static void |
cellEditorValueChanged(javax.swing.JComponent editor,
java.lang.Object event)
Method has to be called from some "valueChanged" event handler of the field editing component in order to notify FXBasicView of the event occurred. |
void |
docValidityStatusChanged(FXStatusEvent e)
Method implements respective method of the FXModelStatusListener
interface. |
FXModel |
getFXModel()
Method returns a reference to the current FXModel data model
object. |
FTree |
getTree()
Method returns a reference to the underlying com.fg.ftree.FTree component. |
boolean |
hasDocument()
Returns true when current FXModel contains an
XML document and false otherwise. |
void |
insertNodeAfter()
If canInsert() returns true, the method inserts
a new sibling node, following the current selected node, otherwise it
does nothing. |
void |
insertNodeBefore()
If canInsert() returns true, the method inserts
a new sibling node, preceding the current selected node, otherwise it
does nothing. |
boolean |
isDocChanged()
Returns true if current XML document has been changed by
the editor and false otherwise. |
boolean |
isDocValid()
Returns true if current XML document is valid and
false otherwise. |
boolean |
isReducedView()
Returns true when component is in the Viewer mode (aditional
structural elements such as XSD Groups folders and array folders are
not shown) and false when component is in Editor mode. |
void |
moveNodeDown()
If canMoveDown() returns true, the method swaps
positions of the current selected node and its following sibling,
otherwise it does nothing. |
void |
moveNodeUp()
If canMoveUp() returns true, the method swaps
positions of the current selected node and its preceding sibling,
otherwise it does nothing. |
void |
newDocumentLoaded(FXStatusEvent e)
Method implements respective method of the FXModelStatusListener
interface. |
void |
removeAllExternalDialogs()
Method removes all the registered external dialogs. |
void |
removeExternalDialog(java.lang.String id)
Method removes an external dialog which was registered under the specified id. |
void |
removeNode()
If canRemove() returns true, the method removes
the current selected node, otherwise it does nothing. |
void |
removeViewStatusListener(FXViewStatusListener l)
Removes an FXChangeListener listener. |
void |
setBackground(java.awt.Color color)
Sets a new background color. |
void |
setFXModel(FXModel newModel)
Method sets an instance of FXModel data model. |
void |
setReducedView(boolean reduced)
Sets Viewer/Editor mode. |
void |
showErrorMessage(java.lang.String message)
Shows a message in the right-bottom text area. |
void |
showInfoMessage(java.lang.String message)
Shows a message in the left-bottom text area. |
void |
showInvalidNode()
Makes visible and selects a first invalid node next to the currently selected node. |
void |
showNSQualifiersDialog()
Creates and shows an instance of the NSQualifiersDialog,
which allows user to edit namespace qualifiers. |
void |
showSearchDialog()
Method shows a search dialog SearchDialog. |
static void |
stopCellEditing(javax.swing.JComponent editor)
Method has to be called from some "valueChanged" event handler of the field editing component in order to stop editing. |
boolean |
stopEditing()
Method stops cell editing and assignes edited value to the respective node. |
void |
updateUI()
|
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public FXBasicView(FXModel model)
model - an FXModel object.public FXBasicView()
FXDocumentModelImpl data model.
| Method Detail |
public void setFXModel(FXModel newModel)
FXModel data model.
newModel - a FXModel data model object.public void newDocumentLoaded(FXStatusEvent e)
FXModelStatusListener
interface. The method is called when new XML document is loaded.
newDocumentLoaded in interface FXModelStatusListenere - an FXStatusEvent instance.public void docValidityStatusChanged(FXStatusEvent e)
FXModelStatusListener
interface. The method is called document validity dtatus is changed.
docValidityStatusChanged in interface FXModelStatusListenere - an FXStatusEvent instance.public FXModel getFXModel()
FXModel data model
object.
FXModel data model
object.public FTree getTree()
public void updateUI()
public void addExternalDialog(java.lang.String id,
javax.swing.JDialog dialog)
id - a string identifier of the external dialog.dialog - a JDialog external field editor.public void removeExternalDialog(java.lang.String id)
id - a string identifier of the external dialog.public void removeAllExternalDialogs()
public void setBackground(java.awt.Color color)
color - new background colorpublic boolean isReducedView()
true when component is in the Viewer mode (aditional
structural elements such as XSD Groups folders and array folders are
not shown) and false when component is in Editor mode.
true when component is in Viewer mode and
false when component is in Editor mode.public void setReducedView(boolean reduced)
reduced - true sets component to the Viewer mode and
false - to the Editor mode.public boolean stopEditing()
true when node editing was actually stopped.public boolean cancelEditing()
true when node editing was actually canceled.public static void stopCellEditing(javax.swing.JComponent editor)
editor - a field editor, which implements IFieldEditor interfacepublic static void cancelCellEditing(javax.swing.JComponent editor)
editor - a field editor, which implements IFieldEditor interface
public static void cellEditorValueChanged(javax.swing.JComponent editor,
java.lang.Object event)
editor - a field editor, which implements IFieldEditor interfaceevent - an original event objectpublic void showInfoMessage(java.lang.String message)
message - a message to showpublic void showErrorMessage(java.lang.String message)
message - a message to showpublic void addViewStatusListener(FXViewStatusListener l)
l - an FXChangeListener implementationpublic void removeViewStatusListener(FXViewStatusListener l)
l - an FXChangeListener implementationpublic boolean hasDocument()
true when current FXModel contains an
XML document and false otherwise.
true when current FXModel contains an
XML document and false otherwise.public boolean isDocChanged()
true if current XML document has been changed by
the editor and false otherwise.
true if current XML document has been changed by
the editor and false otherwise.public boolean isDocValid()
true if current XML document is valid and
false otherwise.
true if current XML document is valid and
false otherwise.public boolean canInsert()
true if the parent of the current selected node allows
performing insertNodeBefore() and insertNodeAfter()
operations and false otherwise.
true if the parent of the current selected node allows
performing insertNodeBefore() and insertNodeAfter()
operations and false otherwise.public boolean canRemove()
true if the current selected node can be removed
(see removeNode()) and false otherwise.
true if the current selected node can be removed
(see removeNode()) and false otherwise.public boolean canMoveUp()
true if the current selected node can swap position
with its preceding sibling (see moveNodeUp()) and
false otherwise.
true if the current selected node can swap position
with its preceding sibling (see moveNodeUp()) and
false otherwise.public boolean canMoveDown()
true if the current selected node can swap position
with its following sibling (see moveNodeDown()) and
false otherwise.
true if the current selected node can swap position
with its following sibling (see moveNodeDown()) and
false otherwise.public void insertNodeBefore()
canInsert() returns true, the method inserts
a new sibling node, preceding the current selected node, otherwise it
does nothing.
public void insertNodeAfter()
canInsert() returns true, the method inserts
a new sibling node, following the current selected node, otherwise it
does nothing.
public void removeNode()
canRemove() returns true, the method removes
the current selected node, otherwise it does nothing.
public void moveNodeUp()
canMoveUp() returns true, the method swaps
positions of the current selected node and its preceding sibling,
otherwise it does nothing.
public void moveNodeDown()
canMoveDown() returns true, the method swaps
positions of the current selected node and its following sibling,
otherwise it does nothing.
public void showNSQualifiersDialog()
NSQualifiersDialog,
which allows user to edit namespace qualifiers.
public void showInvalidNode()
public void showSearchDialog()
SearchDialog.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||