org.merlotxml.merlot
Class MerlotUtils
java.lang.Object
|
+--org.merlotxml.merlot.MerlotUtils
- public class MerlotUtils
- extends java.lang.Object
- implements MerlotConstants
Utilities for Merlot
- Version:
- $Id: MerlotUtils.java,v 1.3 2000/03/07 04:46:14 camk Exp $
- Author:
- Kelly A. Campbell
Fields inherited from interface org.merlotxml.merlot.MerlotConstants |
ACTION_MENU_ACCELERATOR,
ACTION_MENU_ICON,
ACTION_NAME,
ACTION_SHORT_DESCRIPTION,
ACTION_SMALL_ICON,
AFTER,
BEFORE,
ERR,
INTO,
UI,
XML |
Method Summary |
static void |
addActionToMenu(javax.swing.Action a,
javax.swing.MenuElement m)
add an action to a menu. |
static void |
addActionToToolBar(javax.swing.Action a,
javax.swing.JToolBar toolbar)
add an action to a toolbar. |
static void |
copyFile(java.io.File from,
java.io.File to)
copy a file to a different file |
static javax.swing.JButton |
createButtonFromAction(javax.swing.Action a)
|
static javax.swing.JPanel |
createMultiLineLabel(java.lang.String s,
int cols)
creates a wrapped mulit-line label from several labels |
static void |
loadActionResources(javax.swing.Action a,
java.lang.String bundle,
java.lang.String keyprefix)
loads up the resources for an action |
static java.lang.String |
wrapLines(java.lang.String s,
int cols)
Wraps lines at the given number of columns |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
MerlotUtils
public MerlotUtils()
addActionToToolBar
public static void addActionToToolBar(javax.swing.Action a,
javax.swing.JToolBar toolbar)
- add an action to a toolbar. Swing sucks
addActionToMenu
public static void addActionToMenu(javax.swing.Action a,
javax.swing.MenuElement m)
- add an action to a menu. Swing sucks
loadActionResources
public static void loadActionResources(javax.swing.Action a,
java.lang.String bundle,
java.lang.String keyprefix)
- loads up the resources for an action
copyFile
public static void copyFile(java.io.File from,
java.io.File to)
throws java.io.IOException
- copy a file to a different file
createButtonFromAction
public static javax.swing.JButton createButtonFromAction(javax.swing.Action a)
wrapLines
public static java.lang.String wrapLines(java.lang.String s,
int cols)
- Wraps lines at the given number of columns
createMultiLineLabel
public static javax.swing.JPanel createMultiLineLabel(java.lang.String s,
int cols)
- creates a wrapped mulit-line label from several labels