cz.vity.freerapid.swing
Class Swinger

java.lang.Object
  extended by cz.vity.freerapid.swing.Swinger

public class Swinger
extends Object

Pomocna trida pro caste volani nekterych metod. Nastavuje vychozi Look&Feel.

Author:
Vity

Field Summary
static String MESSAGE_BTN_CANCEL_CODE
           
static int RESULT_CANCEL
           
static int RESULT_NO
           
static int RESULT_OK
           
static int RESULT_YES
           
 
Method Summary
static void bringToFront(Frame frame, boolean activate)
           
static Action getAction(Object actionName)
           
static ActionMap getActionMap(Class aClass, Object actionsObject)
           
static ActionMap getActionMap(Object actionsObject)
           
static int getChoiceOKCancel(String messageCode, Object... args)
           
static int getChoiceYesNo(String message)
           
static int getChoiceYesNoCancel(String message)
           
static int getChoiceYesNoCancel(String messageCode, Object... args)
           
static ImageIcon getIconImage(org.jdesktop.application.ResourceMap map, String imagePropertyCode)
          Vrati obrazek podle key property v resourcu Nenajde-li se obrazek pod danym kodem, vypise WARNING pokud neni obrazek nalezen
static ImageIcon getIconImage(String imagePropertyCode)
          Vrati obrazek podle key property v resourcu Nenajde-li se obrazek pod danym kodem, vypise WARNING pokud neni obrazek nalezen
static String getMessageFromException(org.jdesktop.application.ResourceMap map, Throwable cause)
           
static org.jdesktop.application.ResourceMap getResourceMap()
           
static org.jdesktop.application.ResourceMap getResourceMap(Class className)
           
static org.jdesktop.application.ResourceMap getResourceMap(Class className, Class stopClass)
           
static int[] getSelectedRows(JTable table)
           
static JComponent getTitleComponent(String title)
           
static JComponent getTitleComponent2(String titleCode)
           
static void initActions(Object actionsObject, org.jdesktop.application.ApplicationContext context)
          Inicializuje akce v dane tride
static void inputFocus(JComboBox combo)
           
static void inputFocus(JComponent field)
           
static void minimize(JFrame frame)
           
static void showErrorDialog(Class clazz, String messageResource, Throwable e)
           
static void showErrorDialog(Class clazz, String messageResource, Throwable e, boolean showErrorReporter)
           
static void showErrorDialog(org.jdesktop.application.ResourceMap map, String messageResource, Throwable e)
           
static void showErrorDialog(String messageResource, Throwable e)
           
static void showErrorDialog(String messageResource, Throwable e, boolean showErrorReporter)
           
static void showErrorMessage(org.jdesktop.application.ResourceMap map, String message, Object... args)
           
static void showErrorMessage(org.jdesktop.application.ResourceMap map, Throwable cause)
           
static void showInformationDialog(String message)
           
static int showInputDialog(String title, Object inputObject, boolean cancelButton)
           
static void showMessage(org.jdesktop.application.ResourceMap map, String message, Object... args)
           
static int showOptionDialog(org.jdesktop.application.ResourceMap map, int messageType, String titleCode, String messageCode, String[] buttons, Object... args)
           
static TableColumn updateColumn(JTable table, String name, int columnId, int width)
           
static TableColumn updateColumn(JTable table, String name, int columnId, int minWidth, int width, TableCellRenderer renderer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MESSAGE_BTN_CANCEL_CODE

public static final String MESSAGE_BTN_CANCEL_CODE
See Also:
Constant Field Values

RESULT_NO

public static final int RESULT_NO
See Also:
Constant Field Values

RESULT_YES

public static final int RESULT_YES
See Also:
Constant Field Values

RESULT_CANCEL

public static final int RESULT_CANCEL
See Also:
Constant Field Values

RESULT_OK

public static final int RESULT_OK
See Also:
Constant Field Values
Method Detail

initActions

public static void initActions(Object actionsObject,
                               org.jdesktop.application.ApplicationContext context)
Inicializuje akce v dane tride

Parameters:
actionsObject - trida s akcemi
context - context aplikace

showInformationDialog

public static void showInformationDialog(String message)

getChoiceYesNoCancel

public static int getChoiceYesNoCancel(String message)

getChoiceYesNoCancel

public static int getChoiceYesNoCancel(String messageCode,
                                       Object... args)

getChoiceOKCancel

public static int getChoiceOKCancel(String messageCode,
                                    Object... args)

getIconImage

public static ImageIcon getIconImage(String imagePropertyCode)
Vrati obrazek podle key property v resourcu Nenajde-li se obrazek pod danym kodem, vypise WARNING pokud neni obrazek nalezen

Parameters:
imagePropertyCode - kod obrazku
Returns:
obrazek

getIconImage

public static ImageIcon getIconImage(org.jdesktop.application.ResourceMap map,
                                     String imagePropertyCode)
Vrati obrazek podle key property v resourcu Nenajde-li se obrazek pod danym kodem, vypise WARNING pokud neni obrazek nalezen

Parameters:
map - resourcemapa
imagePropertyCode - kod obrazku
Returns:
obrazek

getResourceMap

public static org.jdesktop.application.ResourceMap getResourceMap()

getResourceMap

public static org.jdesktop.application.ResourceMap getResourceMap(Class className)

getResourceMap

public static org.jdesktop.application.ResourceMap getResourceMap(Class className,
                                                                  Class stopClass)

getAction

public static Action getAction(Object actionName)

getActionMap

public static ActionMap getActionMap(Class aClass,
                                     Object actionsObject)

getActionMap

public static ActionMap getActionMap(Object actionsObject)

showErrorMessage

public static void showErrorMessage(org.jdesktop.application.ResourceMap map,
                                    String message,
                                    Object... args)

showErrorMessage

public static void showErrorMessage(org.jdesktop.application.ResourceMap map,
                                    Throwable cause)

showOptionDialog

public static int showOptionDialog(org.jdesktop.application.ResourceMap map,
                                   int messageType,
                                   String titleCode,
                                   String messageCode,
                                   String[] buttons,
                                   Object... args)

showInputDialog

public static int showInputDialog(String title,
                                  Object inputObject,
                                  boolean cancelButton)

bringToFront

public static void bringToFront(Frame frame,
                                boolean activate)

showMessage

public static void showMessage(org.jdesktop.application.ResourceMap map,
                               String message,
                               Object... args)

inputFocus

public static void inputFocus(JComboBox combo)

inputFocus

public static void inputFocus(JComponent field)

updateColumn

public static TableColumn updateColumn(JTable table,
                                       String name,
                                       int columnId,
                                       int minWidth,
                                       int width,
                                       TableCellRenderer renderer)

updateColumn

public static TableColumn updateColumn(JTable table,
                                       String name,
                                       int columnId,
                                       int width)

showErrorDialog

public static void showErrorDialog(Class clazz,
                                   String messageResource,
                                   Throwable e,
                                   boolean showErrorReporter)

showErrorDialog

public static void showErrorDialog(Class clazz,
                                   String messageResource,
                                   Throwable e)

showErrorDialog

public static void showErrorDialog(String messageResource,
                                   Throwable e,
                                   boolean showErrorReporter)

showErrorDialog

public static void showErrorDialog(String messageResource,
                                   Throwable e)

showErrorDialog

public static void showErrorDialog(org.jdesktop.application.ResourceMap map,
                                   String messageResource,
                                   Throwable e)

getTitleComponent

public static JComponent getTitleComponent(String title)

getTitleComponent2

public static JComponent getTitleComponent2(String titleCode)

getChoiceYesNo

public static int getChoiceYesNo(String message)

minimize

public static void minimize(JFrame frame)

getSelectedRows

public static int[] getSelectedRows(JTable table)

getMessageFromException

public static String getMessageFromException(org.jdesktop.application.ResourceMap map,
                                             Throwable cause)