p3j.gui.panels
Class PropertiesShowPanelFactory

java.lang.Object
  extended by p3j.gui.panels.PropertiesShowPanelFactory

public class PropertiesShowPanelFactory
extends Object

Panel to conveniently display the properties of a PPPM entity. Created: August 25, 2008

Author:
Christina Bohk, Roland Ewald

Constructor Summary
PropertiesShowPanelFactory()
          Simple constructor.
PropertiesShowPanelFactory(int keyWidth)
          The key width.
PropertiesShowPanelFactory(int keyWidth, List<JButton> buttons, int numOfGeneralButtons)
          Default constructor.
PropertiesShowPanelFactory(JButton button)
          Constructor for a single button.
PropertiesShowPanelFactory(List<JButton> buttons)
          Constructor with only one kind of buttons.
PropertiesShowPanelFactory(List<JButton> buttons, int numOfGeneralButtons)
          Default constructor.
 
Method Summary
 void app(String label, Component component)
          Add label and component.
 void app(String label, Component component, int rowSpan)
          Add label and component that spans multiple rows.
 void app(String label, Component component, int rowSpan, String rowHeight)
          Add label and component that spans multiple rows.
 void app(String label, Object object)
          Add label and information as a string.
 void appPreview(JComponent component)
          Add preview to properties panel.
 JPanel constructPanel()
          Constructs overall panel.
 void sep(String separator)
          Wrapper for adding a separator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesShowPanelFactory

public PropertiesShowPanelFactory(int keyWidth)
The key width.

Parameters:
keyWidth - the width of the key column

PropertiesShowPanelFactory

public PropertiesShowPanelFactory()
Simple constructor. No buttons are added.


PropertiesShowPanelFactory

public PropertiesShowPanelFactory(List<JButton> buttons)
Constructor with only one kind of buttons.

Parameters:
buttons - list of buttons

PropertiesShowPanelFactory

public PropertiesShowPanelFactory(JButton button)
Constructor for a single button.

Parameters:
button - the button

PropertiesShowPanelFactory

public PropertiesShowPanelFactory(int keyWidth,
                                  List<JButton> buttons,
                                  int numOfGeneralButtons)
Default constructor.

Parameters:
keyWidth - the width of the column containing the keys
buttons - the list of buttons to be displayed
numOfGeneralButtons - of general buttons (will be displayed separately), has to be in [0, size of buttons list]

PropertiesShowPanelFactory

public PropertiesShowPanelFactory(List<JButton> buttons,
                                  int numOfGeneralButtons)
Default constructor.

Parameters:
buttons - the list of buttons to be displayed
numOfGeneralButtons - of general buttons (will be displayed separately), has to be in [0, size of buttons list]
Method Detail

sep

public void sep(String separator)
Wrapper for adding a separator.

Parameters:
separator - name of the separator

app

public void app(String label,
                Component component)
Add label and component.

Parameters:
label - the label to be added
component - the associated (input) component

app

public void app(String label,
                Object object)
Add label and information as a string.

Parameters:
label - the label
object - the associated information, Object.toString() will be used

app

public void app(String label,
                Component component,
                int rowSpan)
Add label and component that spans multiple rows. Default row height is 40 dlu.

Parameters:
label - the label
component - the associated component
rowSpan - the number of rows to be spanned (>=1)

app

public void app(String label,
                Component component,
                int rowSpan,
                String rowHeight)
Add label and component that spans multiple rows.

Parameters:
label - the label
component - the associated component
rowSpan - the number of rows to be spanned (>=1)
rowHeight - the row height

constructPanel

public JPanel constructPanel()
Constructs overall panel.

Returns:
the desired panel

appPreview

public void appPreview(JComponent component)
Add preview to properties panel.

Parameters:
component - the component containing the preview


Copyright © 2012. All Rights Reserved.