de.kleopatra.view.factory
Class SwingUIFactory

java.lang.Object
  extended byde.kleopatra.view.factory.SwingUIFactory
All Implemented Interfaces:
UIFactory

public class SwingUIFactory
extends java.lang.Object
implements UIFactory

Implementation of UIFactory for Swing toolkit.

Version:
$Revision: 1.1.1.1 $ - $Date: 2004/05/05 10:02:18 $
Author:
(C) Jeanette Winzenburg, Berlin

Constructor Summary
SwingUIFactory()
           
 
Method Summary
protected  java.awt.Component createAndCustomizeComponent(java.lang.Object componentID, java.lang.Object componentType)
           
 java.awt.Component createComponent(java.lang.Object componentID, java.lang.Object componentType)
          returns the most appropriate Component based on componentID and componentType.
protected  ComponentTypeMap createComponentTypeMap()
           
 java.awt.Container createDefaultContainer(java.lang.Object componentID)
          POST: result !
protected  java.util.List createList()
           
protected  java.util.Map createMap()
           
protected  PresentationManager createPresentationManager()
           
protected  java.awt.Component createScroller(java.awt.Component component, java.lang.Object componentID)
           
protected  java.lang.Object createScrollID(java.lang.Object componentID)
           
protected  java.awt.Component customizeComponent(java.awt.Component comp, java.lang.Object componentID, java.lang.Object componentType)
           
 java.lang.Object getComponentID(java.awt.Component comp)
          tries to extract the componentID from a given comp.
 ComponentTypeMap getComponentTypeMap()
          returns the currently used ComponentTypeMap.
protected  java.lang.Object getDefaultContainerType()
           
protected  java.lang.Object getFallBackComponentType()
           
 PresentationManager getPresentationManager()
           
protected  java.lang.Object getScrollPaneType()
           
protected  java.lang.Object guessAbstractButtonID(javax.swing.AbstractButton comp)
           
protected  java.lang.Object guessComponentID(javax.swing.JComponent comp)
           
protected  java.lang.Object guessDefaultComponentID(java.awt.Component comp)
          fall back to see at least something if presentationManager is not active.
protected  void installDefaultComponentTypes()
           
 void setComponentTypeMap(ComponentTypeMap componentTypeMap)
          sets map used to map between generic componentType <--> component class in the context of this toolkit.
protected  boolean shouldScroll(java.lang.Object componentType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingUIFactory

public SwingUIFactory()
Method Detail

createComponent

public java.awt.Component createComponent(java.lang.Object componentID,
                                          java.lang.Object componentType)
Description copied from interface: UIFactory
returns the most appropriate Component based on componentID and componentType. it's up to the factory to decide which is appropriate. POST: result != null.

Specified by:
createComponent in interface UIFactory

setComponentTypeMap

public void setComponentTypeMap(ComponentTypeMap componentTypeMap)
Description copied from interface: UIFactory
sets map used to map between generic componentType <--> component class in the context of this toolkit. PRE: componentTypes != null

Specified by:
setComponentTypeMap in interface UIFactory

getComponentTypeMap

public ComponentTypeMap getComponentTypeMap()
Description copied from interface: UIFactory
returns the currently used ComponentTypeMap. Clients can use it to add type <--> class mappings at any time.

Specified by:
getComponentTypeMap in interface UIFactory

createDefaultContainer

public java.awt.Container createDefaultContainer(java.lang.Object componentID)
Description copied from interface: UIFactory
POST: result != null.

Specified by:
createDefaultContainer in interface UIFactory

getPresentationManager

public PresentationManager getPresentationManager()
Specified by:
getPresentationManager in interface UIFactory

createPresentationManager

protected PresentationManager createPresentationManager()

getComponentID

public java.lang.Object getComponentID(java.awt.Component comp)
tries to extract the componentID from a given comp. result may be null. PRE: comp != null

Specified by:
getComponentID in interface UIFactory

createAndCustomizeComponent

protected java.awt.Component createAndCustomizeComponent(java.lang.Object componentID,
                                                         java.lang.Object componentType)

guessComponentID

protected java.lang.Object guessComponentID(javax.swing.JComponent comp)

customizeComponent

protected java.awt.Component customizeComponent(java.awt.Component comp,
                                                java.lang.Object componentID,
                                                java.lang.Object componentType)

createScroller

protected java.awt.Component createScroller(java.awt.Component component,
                                            java.lang.Object componentID)

shouldScroll

protected boolean shouldScroll(java.lang.Object componentType)

guessAbstractButtonID

protected java.lang.Object guessAbstractButtonID(javax.swing.AbstractButton comp)

guessDefaultComponentID

protected java.lang.Object guessDefaultComponentID(java.awt.Component comp)
fall back to see at least something if presentationManager is not active. or exist comps with same names. useful in reading given containers (only?)


createScrollID

protected java.lang.Object createScrollID(java.lang.Object componentID)

installDefaultComponentTypes

protected void installDefaultComponentTypes()

getFallBackComponentType

protected java.lang.Object getFallBackComponentType()

getDefaultContainerType

protected java.lang.Object getDefaultContainerType()

getScrollPaneType

protected java.lang.Object getScrollPaneType()

createComponentTypeMap

protected ComponentTypeMap createComponentTypeMap()

createMap

protected java.util.Map createMap()

createList

protected java.util.List createList()


Copyright © 2003, 2004 SwingEmpire Jeanette Winzenburg. All Rights Reserved.