info.joseluismartin.gui
Class ApplicationContextGuiFactory

java.lang.Object
  extended by info.joseluismartin.gui.ApplicationContextGuiFactory
All Implemented Interfaces:
GuiFactory, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class ApplicationContextGuiFactory
extends Object
implements GuiFactory, org.springframework.context.ApplicationContextAware

GuiFactory that use ApplicationContext to create and configure widgets.

Author:
Jose Luis Martin - (jlm@joseluismartin.info)

Field Summary
protected  org.springframework.context.ApplicationContext context
          application context reference
 
Constructor Summary
ApplicationContextGuiFactory()
           
 
Method Summary
static Border createTitledBorder(String name)
          Deprecated. use FormUtils.createTitledBorder instead.
 org.springframework.context.ApplicationContext getApplicationContext()
           
 JComponent getComponent(String name)
          Get a JComponent reference of named widget
 JDialog getDialog(String name)
          Gets a JDialog reference of named widget
static JFrame getJFrame()
           
 Object getObject(String name)
          Gets a Object reference of named widget
 Object getObject(String name, Object[] args)
           
 JPanel getPanel(String name)
          Get a JPanel reference of named widget.
 View<?> getView(String name)
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
          
static void setPlasticLookAndFeel()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected org.springframework.context.ApplicationContext context
application context reference

Constructor Detail

ApplicationContextGuiFactory

public ApplicationContextGuiFactory()
Method Detail

getComponent

public JComponent getComponent(String name)
Get a JComponent reference of named widget

Specified by:
getComponent in interface GuiFactory
Parameters:
name - the name of component
Returns:
the component or null if not exist or not a JComponent

getDialog

public JDialog getDialog(String name)
Gets a JDialog reference of named widget

Specified by:
getDialog in interface GuiFactory
Parameters:
name - the name of component
Returns:
the component or null if not exist or not is a JDialog

getObject

public Object getObject(String name)
Gets a Object reference of named widget

Specified by:
getObject in interface GuiFactory
Parameters:
name - the name of component
Returns:
the component or null if not exist.

getPanel

public JPanel getPanel(String name)
Get a JPanel reference of named widget.

Specified by:
getPanel in interface GuiFactory
Parameters:
name - the name of component
Returns:
the component or null if not exist or not a JPanel

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException

Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException

getApplicationContext

public org.springframework.context.ApplicationContext getApplicationContext()

getView

public View<?> getView(String name)
Specified by:
getView in interface GuiFactory

getObject

public Object getObject(String name,
                        Object[] args)
Specified by:
getObject in interface GuiFactory

getJFrame

public static JFrame getJFrame()

setPlasticLookAndFeel

public static void setPlasticLookAndFeel()

createTitledBorder

@Deprecated
public static Border createTitledBorder(String name)
Deprecated. use FormUtils.createTitledBorder instead.

Parameters:
name - title string
Returns:
a new titled border


Copyright © 2013 JDAL. All Rights Reserved.