jmarkov.gui
Class GuiUtils

java.lang.Object
  extended by jmarkov.gui.GuiUtils

public class GuiUtils
extends java.lang.Object

GUI utilities for actions

Author:
Germán Riaño. Universidad de los Andes.

Constructor Summary
GuiUtils()
           
 
Method Summary
static void changeLook(java.lang.String lnfName, java.awt.Window win)
          Changes the current look and feel for the given Window.
static void createActionTable(javax.swing.text.JTextComponent textComponent)
          The following two methods allow us to find an action provided by the editor kit by its name.
static javax.swing.JLabel fancyLabel(java.lang.String title, java.lang.String text)
          Creates a fancy Label with border ans title around.
static javax.swing.Action getActionByName(java.lang.String name)
          Returns the Action object with this name
static javax.swing.JButton getButton(javax.swing.Action a)
          Aux method: deletes text from a button if icon is available
static void setTabEnabled(javax.swing.JComponent comp, boolean enabl)
          Utility Function to enable/disable the tab associated with this component
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GuiUtils

public GuiUtils()
Method Detail

changeLook

public static void changeLook(java.lang.String lnfName,
                              java.awt.Window win)
Changes the current look and feel for the given Window.

Parameters:
lnfName - Look/And/Feel name
win - Window

setTabEnabled

public static void setTabEnabled(javax.swing.JComponent comp,
                                 boolean enabl)
Utility Function to enable/disable the tab associated with this component

Parameters:
comp - The component
enabl - True or false.

createActionTable

public static void createActionTable(javax.swing.text.JTextComponent textComponent)
The following two methods allow us to find an action provided by the editor kit by its name.

Parameters:
textComponent -

fancyLabel

public static javax.swing.JLabel fancyLabel(java.lang.String title,
                                            java.lang.String text)
Creates a fancy Label with border ans title around.

Parameters:
title -
text -
Returns:
The Label

getActionByName

public static javax.swing.Action getActionByName(java.lang.String name)
Returns the Action object with this name

Parameters:
name -
Returns:
Action object.

getButton

public static javax.swing.JButton getButton(javax.swing.Action a)
Aux method: deletes text from a button if icon is available

Parameters:
a - Action
Returns:
Button object