com.fg.xmleditor
Class FXView

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended bycom.fg.xmleditor.FXBasicView
                  extended bycom.fg.xmleditor.FXView
All Implemented Interfaces:
java.util.EventListener, FXModelStatusListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class FXView
extends FXBasicView

FXView Swing component inherits all the basic XML viewer/editor functionality from the FXBasicView and extends it with a simple tool-bar. A data model object for the FXView component has to implement FXModel interface.

Version:
2.0
Author:
Felix Golubov
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Field Summary
static java.lang.String EAST
          EAST = BorderLayout.EAST
static java.lang.String NORTH
          NORTH = BorderLayout.NORTH
static java.lang.String SOUTH
          SOUTH = BorderLayout.SOUTH
static java.lang.String WEST
          WEST = BorderLayout.WEST
 
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
FXView()
          Creates a new instance of the FXView component with default FXDocumentModelImpl model and a tool-bar located on NORTH.
FXView(FXModel model, java.lang.String toolBarLocation)
          Creates a new instance of the FXView component.
 
Method Summary
 void docValidityStatusChanged(FXStatusEvent e)
          Method implements respective method of the FXModelStatusListener interface.
 void newDocumentLoaded(FXStatusEvent e)
          Method implements respective method of the FXModelStatusListener interface.
 void setReducedView(boolean reduced)
          Sets Viewer/Editor mode.
 
Methods inherited from class com.fg.xmleditor.FXBasicView
addExternalDialog, addViewStatusListener, cancelCellEditing, cancelEditing, canInsert, canMoveDown, canMoveUp, canRemove, cellEditorValueChanged, getFXModel, getTree, hasDocument, insertNodeAfter, insertNodeBefore, isDocChanged, isDocValid, isReducedView, moveNodeDown, moveNodeUp, removeAllExternalDialogs, removeExternalDialog, removeNode, removeViewStatusListener, setBackground, setFXModel, showErrorMessage, showInfoMessage, showInvalidNode, showNSQualifiersDialog, showSearchDialog, stopCellEditing, stopEditing, 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
 

Field Detail

NORTH

public static final java.lang.String NORTH
NORTH = BorderLayout.NORTH

See Also:
Constant Field Values

SOUTH

public static final java.lang.String SOUTH
SOUTH = BorderLayout.SOUTH

See Also:
Constant Field Values

EAST

public static final java.lang.String EAST
EAST = BorderLayout.EAST

See Also:
Constant Field Values

WEST

public static final java.lang.String WEST
WEST = BorderLayout.WEST

See Also:
Constant Field Values
Constructor Detail

FXView

public FXView(FXModel model,
              java.lang.String toolBarLocation)
Creates a new instance of the FXView component.

Parameters:
model - a FXModel object.
toolBarLocation - specifies location of the tool-bar. (Allowed values: NORTH, SOUTH, EAST, WEST)

FXView

public FXView()
Creates a new instance of the FXView component with default FXDocumentModelImpl model and a tool-bar located on NORTH.

Method Detail

setReducedView

public void setReducedView(boolean reduced)
Description copied from class: FXBasicView
Sets Viewer/Editor mode. In the Viewer mode the view is reduced (aditional structural elements such as XSD Groups folders and array folders are not shown).

Overrides:
setReducedView in class FXBasicView
Parameters:
reduced - true sets component to the Viewer mode and false - to the Editor mode.

newDocumentLoaded

public void newDocumentLoaded(FXStatusEvent e)
Description copied from class: FXBasicView
Method implements respective method of the FXModelStatusListener interface. The method is called when new XML document is loaded.

Specified by:
newDocumentLoaded in interface FXModelStatusListener
Overrides:
newDocumentLoaded in class FXBasicView
Parameters:
e - an FXStatusEvent instance.

docValidityStatusChanged

public void docValidityStatusChanged(FXStatusEvent e)
Description copied from class: FXBasicView
Method implements respective method of the FXModelStatusListener interface. The method is called document validity dtatus is changed.

Specified by:
docValidityStatusChanged in interface FXModelStatusListener
Overrides:
docValidityStatusChanged in class FXBasicView
Parameters:
e - an FXStatusEvent instance.