Package convex.gui.utils
Class Toolkit
java.lang.Object
convex.gui.utils.Toolkit
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic 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 ImageIcon
static final int
static Font
static final ImageIcon
static final float
static final int
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 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
closeIfFirstFrame
(JFrame frame) static void
copyToClipboard
(String string) static Border
static DocumentListener
static Border
createEmptyBorder
(int x) static Toolkit
static Image
static float
static void
init()
protected static LookAndFeel
static void
launchBrowser
(String url) static AbstractAction
makeAction
(String name, Runnable op) static JMenuItem
static JTextArea
static JTextArea
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 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
-
SCALE
public static final float SCALE -
ICON_SIZE
public static final int ICON_SIZE -
IDENTICON_SIZE
public static final int IDENTICON_SIZE -
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- See Also:
-
DEFAULT_FONT
-
MONO_FONT
-
BUTTON_FONT
-
SYMBOL_FONT_SIZE
public static final float SYMBOL_FONT_SIZE- See Also:
-
SYMBOL_FONT
-
SYMBOL_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
-
installFlatLaf
-
getUIScale
public static float getUIScale() -
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
-
closeIfFirstFrame
-
makeMenu
-
makeAction
-
addPopupMenu
Adds a popup menu to a component, including necessary mouse listeners- Parameters:
jPopupMenu
-
-
createDialogBorder
-
createEmptyBorder
-
makeNote
-
makeNote
-
copyToClipboard
-
withTitledBorder
-