br.usp.iterador.gui.util
Class GuiFactory

java.lang.Object
  extended by br.usp.iterador.gui.util.GuiFactory

public class GuiFactory
extends java.lang.Object

GUI Factory.

Author:
Guilherme Silveira

Constructor Summary
GuiFactory()
           
 
Method Summary
 javax.swing.JPanel createBorderedPanel(java.lang.String title)
           
 CloseButton createCloseButton()
           
 javax.swing.JScrollPane createPane(java.awt.Component c)
          Returns a new scroll pane
 javax.swing.JTable createTable(javax.swing.table.TableModel model)
          Creates a table with specific table model
static
<T extends javax.swing.JComponent>
T
decorate(T c)
           
 javax.swing.JButton getButton(javax.swing.Icon icon)
          Creates a jbutton based on an image
 javax.swing.JButton getButton(java.lang.String msg)
          I18n button.
 javax.swing.JButton getButton(java.lang.String title, java.awt.event.ActionListener listener)
           
 javax.swing.JLabel getLabel(java.lang.String msg)
          Creates an internationalized label.
 javax.swing.JLabel getLabel(java.lang.String msg, int position)
          Creates an internationalized label.
 java.awt.event.ActionListener getLogicListener(java.lang.String logic, Controller controller)
           
 javax.swing.JMenu getMenu(java.lang.String title)
          Returns a i18n menu.
 javax.swing.JMenuItem getMenuItem(java.lang.String title, java.awt.event.ActionListener listener)
          Returns a I18N menu with the selected listener.
 javax.swing.JMenuItem getMenuItem(java.lang.String title, java.lang.Class<?> type, Controller controller)
          Creates a menu item to instantiate a class.
 javax.swing.JMenuItem getMenuItem(java.lang.String title, java.lang.String cmd, Controller controller)
           
 javax.swing.JPanel getPanel(java.awt.Component... components)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GuiFactory

public GuiFactory()
Method Detail

getPanel

public javax.swing.JPanel getPanel(java.awt.Component... components)

getLabel

public javax.swing.JLabel getLabel(java.lang.String msg)
Creates an internationalized label.


getLabel

public javax.swing.JLabel getLabel(java.lang.String msg,
                                   int position)
Creates an internationalized label.


getButton

public javax.swing.JButton getButton(java.lang.String msg)
I18n button.


decorate

public static <T extends javax.swing.JComponent> T decorate(T c)

createTable

public javax.swing.JTable createTable(javax.swing.table.TableModel model)
Creates a table with specific table model


createPane

public javax.swing.JScrollPane createPane(java.awt.Component c)
Returns a new scroll pane

Parameters:
c - the data
Returns:
the pane

getMenu

public javax.swing.JMenu getMenu(java.lang.String title)
Returns a i18n menu.


getMenuItem

public javax.swing.JMenuItem getMenuItem(java.lang.String title,
                                         java.awt.event.ActionListener listener)
Returns a I18N menu with the selected listener.


getButton

public javax.swing.JButton getButton(java.lang.String title,
                                     java.awt.event.ActionListener listener)

getButton

public javax.swing.JButton getButton(javax.swing.Icon icon)
Creates a jbutton based on an image


getMenuItem

public javax.swing.JMenuItem getMenuItem(java.lang.String title,
                                         java.lang.Class<?> type,
                                         Controller controller)
Creates a menu item to instantiate a class.


getMenuItem

public javax.swing.JMenuItem getMenuItem(java.lang.String title,
                                         java.lang.String cmd,
                                         Controller controller)

createBorderedPanel

public javax.swing.JPanel createBorderedPanel(java.lang.String title)

getLogicListener

public java.awt.event.ActionListener getLogicListener(java.lang.String logic,
                                                      Controller controller)

createCloseButton

public CloseButton createCloseButton()


Copyright 2004-2004-2006 IME - USP. All Rights Reserved.