Package convex.gui.utils
Class Toolkit
java.lang.Object
convex.gui.utils.Toolkit
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final double
static Font
static Font
static final Color
static Font
static final ImageIcon
static final ImageIcon
static final ImageIcon
static Font
static final float
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final int
static final int
static final int
static final ImageIcon
static final int
static Font
static final ImageIcon
static final float
static final int
static Font
static final Color
static Font
static final float
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final ImageIcon
static final Color
static final ImageIcon
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addPopupMenu
(JComponent comp, JPopupMenu popupMenu) Adds a popup menu to a component, including necessary mouse listenersstatic void
copyToClipboard
(String string) static Border
static DocumentListener
static Border
createEmptyBorder
(int x) static Toolkit
static Image
static void
init()
protected static LookAndFeel
static void
launchBrowser
(String url) static AbstractAction
makeAction
(String name, Runnable op) static JComponent
static JMenuItem
static JComponent
static JComponent
static Icon
menuIcon
(int codePoint) static BufferedImage
pixelResize
(BufferedImage src, int w, int h) static void
Relinquish focus from a componentstatic ImageIcon
scaledIcon
(int size, String resourcePath) static <E> void
scrollToBottom
(JScrollPane scrollPane) protected static void
static void
showMainFrame
(JComponent comp) static BufferedImage
smoothResize
(BufferedImage src, int w, int h) Scale an image with interpolation / AA for nicer effectsstatic JComponent
withTitledBorder
(String title, JComponent comp)
-
Field Details
-
BASE_SCALE
public static final double BASE_SCALE- See Also:
-
SCALE
public static final float SCALE -
ICON_SIZE
public static final int ICON_SIZE -
IDENTICON_SIZE
public static final int IDENTICON_SIZE -
IDENTICON_SIZE_LARGE
public static final int IDENTICON_SIZE_LARGE -
SMALL_ICON_SIZE
public static final int SMALL_ICON_SIZE -
MAIN_ICON_SIZE
public static final int MAIN_ICON_SIZE -
DEFAULT_FONT_SIZE
public static final float DEFAULT_FONT_SIZE -
DEFAULT_FONT
-
BIG_FONT
-
MONO_FONT
-
BIG_MONO_FONT
-
SMALL_MONO_FONT
-
BUTTON_FONT
-
SYMBOL_FONT_SIZE
public static final float SYMBOL_FONT_SIZE -
SYMBOL_FONT
-
SYMBOL_COLOUR
-
WARNING_COLOUR
-
BUTTON_FG
-
LOCKED_ICON
-
UNLOCKED_ICON
-
WARNING
-
CAKE
-
CONVEX
-
COG
-
REPL_ICON
-
TESTNET_ICON
-
WWW_ICON
-
HACKER_ICON
-
TERMINAL_ICON
-
ECOSYSTEM_ICON
-
WALLET_ICON
-
DLFS_ICON
-
-
Constructor Details
-
Toolkit
public Toolkit()
-
-
Method Details
-
setupForApple
protected static void setupForApple() -
installFlatLaf
-
scaledIcon
-
smoothResize
Scale an image with interpolation / AA for nicer effects- Parameters:
src
- Source imagew
- Width of new imageh
- Height of new image- Returns:
- A new, resized image
-
pixelResize
-
createDocumentListener
-
init
public static void init() -
getImage
-
getDefaultToolkit
-
launchBrowser
-
showMainFrame
-
relinquishFocus
Relinquish focus from a component- Parameters:
c
- Component to remove focus from
-
makeMenu
-
makeAction
-
addPopupMenu
Adds a popup menu to a component, including necessary mouse listeners- Parameters:
popupMenu
- Op up menu component
-
createDialogBorder
-
createEmptyBorder
-
makeHelp
-
makeNote
-
makeNote
-
copyToClipboard
-
withTitledBorder
-
scrollToBottom
-