com.japisoft.xmlpad
Class ComponentFactory

java.lang.Object
  extended bycom.japisoft.xmlpad.ComponentFactory

public class ComponentFactory
extends java.lang.Object

Here a factory for default swing elements used by the XMLContainer. User can use it by creating a sub-class of the ComponentFactory class and call the setFactory for overriding the default behavior, this it is possible to replace any component used inside JXMLPad by your own.

Version:
1.2
Author:
(c) 2003 JAPISOFT / http://wwww.japisoft.com
See Also:
XMLContainer

Constructor Summary
protected ComponentFactory()
           
 
Method Summary
 ErrorView getDefaultErrorView()
           
static ComponentFactory getFactory()
           
 ElementView getNewElementView(XMLContainer container)
           
 javax.swing.JSplitPane getNewHorizontalSplitPane()
          create an horizontal oriented splitpane
 javax.swing.JPanel getNewPanel()
          create a panel for editor and tree
 javax.swing.JPopupMenu getNewPopupMenu()
          create a default popupMenu
 javax.swing.JScrollPane getNewScrollPane()
          create a scrollpane for editor or tree
 TitledPanelHelper getNewTitledPanelHelper()
           
 javax.swing.JToolBar getNewToolBar()
          create a default toolBar
 javax.swing.JTree getNewTree()
          create a default tee
 javax.swing.JSplitPane getNewVerticalSplitPane()
          create a vertical oriented splitpane
 XMLEditor getNewXMLEditor(EditorContext context)
          create a default XMLEditor
 IView getUIContainer(XMLContainer container)
           
static void setFactory(ComponentFactory factory)
          Override the default factory by a subclass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentFactory

protected ComponentFactory()
Method Detail

getFactory

public static ComponentFactory getFactory()
Returns:
the current factory

setFactory

public static void setFactory(ComponentFactory factory)
Override the default factory by a subclass


getNewScrollPane

public javax.swing.JScrollPane getNewScrollPane()
create a scrollpane for editor or tree


getNewPanel

public javax.swing.JPanel getNewPanel()
create a panel for editor and tree


getNewVerticalSplitPane

public javax.swing.JSplitPane getNewVerticalSplitPane()
create a vertical oriented splitpane


getNewHorizontalSplitPane

public javax.swing.JSplitPane getNewHorizontalSplitPane()
create an horizontal oriented splitpane


getNewTree

public javax.swing.JTree getNewTree()
create a default tee


getNewToolBar

public javax.swing.JToolBar getNewToolBar()
create a default toolBar


getNewXMLEditor

public XMLEditor getNewXMLEditor(EditorContext context)
create a default XMLEditor


getNewPopupMenu

public javax.swing.JPopupMenu getNewPopupMenu()
create a default popupMenu


getNewElementView

public ElementView getNewElementView(XMLContainer container)
Returns:
a new table element view

getNewTitledPanelHelper

public TitledPanelHelper getNewTitledPanelHelper()
Returns:
a component for showing the helper's title

getUIContainer

public IView getUIContainer(XMLContainer container)
Returns:
a view for this container

getDefaultErrorView

public ErrorView getDefaultErrorView()
Returns:
the default error view used by the XML container


Copyright © 2006 JAPISoft. All Rights Reserved.