Package org.jrd.frontend.utility
Class ImageButtonFactory
- java.lang.Object
-
- org.jrd.frontend.utility.ImageButtonFactory
-
public final class ImageButtonFactory extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static javax.swing.ImageIcon
attachIcon
static java.lang.String
DETACH_RESOURCE
private static javax.swing.ImageIcon
detachIcon
private static short[]
INVERT_TABLE
private static short[]
KEEP_TABLE
private static boolean
WOULD_FONT_BE_BLACK
-
Constructor Summary
Constructors Modifier Constructor Description private
ImageButtonFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static javax.swing.JButton
createAddButton()
private static javax.swing.JButton
createButton(java.lang.String iconResourceName, java.lang.String backupButtonText, java.lang.String toolTipText)
private static javax.swing.JButton
createButton(javax.swing.ImageIcon icon)
static javax.swing.JButton
createCompileButton()
static javax.swing.JButton
createCompileUploadButton()
static javax.swing.JButton
createDetachButton()
static javax.swing.JButton
createDetachButton(java.lang.String backup, java.lang.String tooltip)
static javax.swing.JButton
createEditButton(java.lang.String tooltip)
static javax.swing.JButton
createInitButton()
static javax.swing.JButton
createOverwriteButton()
static javax.swing.JButton
createRedoButton()
static javax.swing.JButton
createRefreshButton(java.lang.String tooltip)
static javax.swing.JButton
createRemoveButton()
static javax.swing.JButton
createTrashButton()
static javax.swing.JButton
createUndoButton()
static void
flipDetachButton(javax.swing.JButton button, boolean shouldAttach, java.lang.String backupText)
static javax.swing.ImageIcon
getAttachIcon()
static javax.swing.ImageIcon
getDetachIcon()
private static java.awt.image.BufferedImage
invertImage(java.awt.image.BufferedImage src)
private static javax.swing.ImageIcon
loadResourceIcon(java.lang.String resourceName)
-
-
-
Field Detail
-
WOULD_FONT_BE_BLACK
private static final boolean WOULD_FONT_BE_BLACK
-
INVERT_TABLE
private static final short[] INVERT_TABLE
-
KEEP_TABLE
private static final short[] KEEP_TABLE
-
attachIcon
private static javax.swing.ImageIcon attachIcon
-
detachIcon
private static javax.swing.ImageIcon detachIcon
-
DETACH_RESOURCE
public static final java.lang.String DETACH_RESOURCE
- See Also:
- Constant Field Values
-
-
Method Detail
-
loadResourceIcon
private static javax.swing.ImageIcon loadResourceIcon(java.lang.String resourceName) throws java.io.IOException
- Throws:
java.io.IOException
-
createButton
private static javax.swing.JButton createButton(javax.swing.ImageIcon icon)
-
createButton
private static javax.swing.JButton createButton(java.lang.String iconResourceName, java.lang.String backupButtonText, java.lang.String toolTipText)
-
invertImage
private static java.awt.image.BufferedImage invertImage(java.awt.image.BufferedImage src) throws java.io.IOException
- Throws:
java.io.IOException
-
createUndoButton
public static javax.swing.JButton createUndoButton()
-
createRedoButton
public static javax.swing.JButton createRedoButton()
-
createCompileButton
public static javax.swing.JButton createCompileButton()
-
createCompileUploadButton
public static javax.swing.JButton createCompileUploadButton()
-
createOverwriteButton
public static javax.swing.JButton createOverwriteButton()
-
createInitButton
public static javax.swing.JButton createInitButton()
-
createAddButton
public static javax.swing.JButton createAddButton()
-
createRemoveButton
public static javax.swing.JButton createRemoveButton()
-
createRefreshButton
public static javax.swing.JButton createRefreshButton(java.lang.String tooltip)
-
createEditButton
public static javax.swing.JButton createEditButton(java.lang.String tooltip)
-
createTrashButton
public static javax.swing.JButton createTrashButton()
-
createDetachButton
public static javax.swing.JButton createDetachButton()
-
createDetachButton
public static javax.swing.JButton createDetachButton(java.lang.String backup, java.lang.String tooltip)
-
getAttachIcon
public static javax.swing.ImageIcon getAttachIcon() throws java.io.IOException
- Throws:
java.io.IOException
-
getDetachIcon
public static javax.swing.ImageIcon getDetachIcon() throws java.io.IOException
- Throws:
java.io.IOException
-
flipDetachButton
public static void flipDetachButton(javax.swing.JButton button, boolean shouldAttach, java.lang.String backupText)
-
-