org.oddjob.arooa.design.view
Class ViewHelper

java.lang.Object
  extended by org.oddjob.arooa.design.view.ViewHelper

public class ViewHelper
extends Object

Utility methods for Swing Views.


Constructor Summary
ViewHelper()
           
 
Method Summary
static Component createDetailButton(Form def)
          Create a standard detail button for a DesignDefinition.
static Window getWindowForComponent(Component parentComponent)
          Utility method to get the parent window for a component.
static String padLabel(String title)
          Pad the lable of a field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewHelper

public ViewHelper()
Method Detail

createDetailButton

public static Component createDetailButton(Form def)
Create a standard detail button for a DesignDefinition.

Parameters:
def - The DesignDefinition.
Returns:
A button.

padLabel

public static String padLabel(String title)
Pad the lable of a field.

Parameters:
title - The text.
Returns:
Padded text.

getWindowForComponent

public static Window getWindowForComponent(Component parentComponent)
                                    throws HeadlessException
Utility method to get the parent window for a component. Required for dialogs.

Parameters:
parentComponent - The component who's window were finding.
Returns:
The wondow.
Throws:
HeadlessException - If the component has no window.