com.japisoft.xmlpad
Interface UIAccessibility


public interface UIAccessibility

Facilities for accessing inner components of the XMLContainer

Version:
1.0
Author:
(c) 2004 JAPISoft / http://www.japisoft.com
See Also:
XMLContainer

Method Summary
 void dispose()
          This is only for inner usage, it mustn't be called by the user
 javax.swing.JPopupMenu getCurrentTreePopup()
           
 XMLEditor getEditor()
           
 ElementView getElementView()
           
 ErrorView getErrorView()
           
 javax.swing.JSplitPane getSecondarySplitPane()
           
 javax.swing.JSplitPane getSplitPane()
           
 javax.swing.JToolBar getToolBar()
           
 javax.swing.JTree getTree()
           
 javax.swing.JToolBar getTreeToolBar()
           
 boolean isPopupAvailable()
           
 boolean isToolBarAvailable()
           
 boolean isToolBarVisible()
           
 boolean isTreeAvailable()
           
 boolean isTreePopupAvailable()
           
 boolean isTreeToolBarAvailable()
           
 boolean isTreeVisible()
           
 void setElementView(ElementView view)
          Set a view fo visualizing an XML element under the tree. if view is null no view will be available
 void setErrorView(ErrorView view)
          Define a new error view panel.
 void setInitialElementViewDividerLocation(double location)
          Reset the initial divider location between the tree and the element view.
 void setInitialTreeTextDividerLocation(double location)
          Reset the initial divider location between tree and text.
 void setPopupAvailable(boolean popupAvailable)
          Create a default popup.
 void setToolBarAvailable(boolean toolBarAvailable)
          Create a default toolbar.
 void setToolBarVisible(boolean toolbarVisible)
          Show or hide the default toolbar.
 void setTreeAvailable(boolean treeAvailable)
          Decide to have a left tree with the XML document content or not.
 void setTreeDelegate(javax.swing.JTree treeDelegate)
          This is a way to share a tree which is outside the XMLContainer.
 void setTreePopupAvailable(boolean treePopupAvailable)
          Reset the tree popup.
 void setTreeToolBarAvailable(boolean treeToolBarAvailable)
          Decide to have a toolbar at the top of the tree or not.
 void setTreeVisible(boolean treeVisible)
          Show or hide the location tree.
 

Method Detail

getEditor

public XMLEditor getEditor()
Returns:
the current XMLEditor. Note that depending the splitting state of the XMLContainer this is not always the same instance

setTreeVisible

public void setTreeVisible(boolean treeVisible)
Show or hide the location tree. This method has no effect if no tree is available => XMLPadProperties.setProperty("tree", "false" )

Parameters:
treeVisible - Show or hide the current location tree

isTreeVisible

public boolean isTreeVisible()
Returns:
true if there's a current location tree and the splitpane bar is not closed

setTreeAvailable

public void setTreeAvailable(boolean treeAvailable)
Decide to have a left tree with the XML document content or not. By default true


isTreeAvailable

public boolean isTreeAvailable()
Returns:
true if the tree is available

setTreeToolBarAvailable

public void setTreeToolBarAvailable(boolean treeToolBarAvailable)
Decide to have a toolbar at the top of the tree or not. By default false


isTreeToolBarAvailable

public boolean isTreeToolBarAvailable()
Returns:
true if the tree is available

getTree

public javax.swing.JTree getTree()
Returns:
the current XML tree view

setTreeDelegate

public void setTreeDelegate(javax.swing.JTree treeDelegate)
This is a way to share a tree which is outside the XMLContainer. This is only useful if the setTreeAvailable( false ) method is called


getCurrentTreePopup

public javax.swing.JPopupMenu getCurrentTreePopup()
Returns:
the current tree menu popup

getToolBar

public javax.swing.JToolBar getToolBar()
Returns:
the main toolbar

getTreeToolBar

public javax.swing.JToolBar getTreeToolBar()
Returns:
the tree toolBar or null

setToolBarVisible

public void setToolBarVisible(boolean toolbarVisible)
Show or hide the default toolbar. This method has no effect if the default toolbar is not available. Note that this method is only for dynamic usage, it has no effect before the visibility of the XMLContainer. If you wish no toolbar, you must call setToolBarAvailable( false )


isToolBarVisible

public boolean isToolBarVisible()
Returns:
the toolbar state

setToolBarAvailable

public void setToolBarAvailable(boolean toolBarAvailable)
Create a default toolbar. By default true. If user has an external toolbar, this property must be set to false. It is possible to control the visibility by calling setToolBarVisible( ... )


isToolBarAvailable

public boolean isToolBarAvailable()
Returns:
true if a default toolbar is available

setPopupAvailable

public void setPopupAvailable(boolean popupAvailable)
Create a default popup. By default true


isPopupAvailable

public boolean isPopupAvailable()
Returns:
true if a default popup is available

setTreePopupAvailable

public void setTreePopupAvailable(boolean treePopupAvailable)
Reset the tree popup. By default to true. This code has no effect if no tree is used.


isTreePopupAvailable

public boolean isTreePopupAvailable()
Returns:
true if a tree exists and if the tree popup is available

getSplitPane

public javax.swing.JSplitPane getSplitPane()
Returns:
the main splitpane dividing the tree and the source. It may be null depending on the moment you call it

getSecondarySplitPane

public javax.swing.JSplitPane getSecondarySplitPane()
Returns:
the secondary splitpane dividing the tree and the element view. It may be null depending on the moment you call it

setInitialTreeTextDividerLocation

public void setInitialTreeTextDividerLocation(double location)
Reset the initial divider location between tree and text. This value is between 0 to 1

Parameters:
location - Location between 0 and 1 / 0.5 means at the middle

setInitialElementViewDividerLocation

public void setInitialElementViewDividerLocation(double location)
Reset the initial divider location between the tree and the element view. This value is between 0 to 1

Parameters:
location - Location between 0 and 1 / 0.5 means at the middle

setErrorView

public void setErrorView(ErrorView view)
Define a new error view panel. It must be called before showing the first error


getErrorView

public ErrorView getErrorView()
Returns:
the current error view panel

setElementView

public void setElementView(ElementView view)
Set a view fo visualizing an XML element under the tree. if view is null no view will be available


getElementView

public ElementView getElementView()
Returns:
the current view for visualizing an element

dispose

public void dispose()
This is only for inner usage, it mustn't be called by the user



Copyright © 2006 JAPISoft. All Rights Reserved.