Class Toolkit

java.lang.Object
convex.gui.utils.Toolkit

public class Toolkit extends Object
  • 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

      public static Font DEFAULT_FONT
    • BIG_FONT

      public static Font BIG_FONT
    • MONO_FONT

      public static Font MONO_FONT
    • BIG_MONO_FONT

      public static Font BIG_MONO_FONT
    • SMALL_MONO_FONT

      public static Font SMALL_MONO_FONT
    • BUTTON_FONT

      public static Font BUTTON_FONT
    • SYMBOL_FONT_SIZE

      public static final float SYMBOL_FONT_SIZE
    • SYMBOL_FONT

      public static Font SYMBOL_FONT
    • SYMBOL_COLOUR

      public static final Color SYMBOL_COLOUR
    • WARNING_COLOUR

      public static final Color WARNING_COLOUR
    • BUTTON_FG

      public static final Color BUTTON_FG
    • LOCKED_ICON

      public static final ImageIcon LOCKED_ICON
    • UNLOCKED_ICON

      public static final ImageIcon UNLOCKED_ICON
    • WARNING

      public static final ImageIcon WARNING
    • CAKE

      public static final ImageIcon CAKE
    • CONVEX

      public static final ImageIcon CONVEX
    • COG

      public static final ImageIcon COG
    • REPL_ICON

      public static final ImageIcon REPL_ICON
    • TESTNET_ICON

      public static final ImageIcon TESTNET_ICON
    • WWW_ICON

      public static final ImageIcon WWW_ICON
    • HACKER_ICON

      public static final ImageIcon HACKER_ICON
    • TERMINAL_ICON

      public static final ImageIcon TERMINAL_ICON
    • ECOSYSTEM_ICON

      public static final ImageIcon ECOSYSTEM_ICON
    • WALLET_ICON

      public static final ImageIcon WALLET_ICON
    • DLFS_ICON

      public static final ImageIcon DLFS_ICON
  • Constructor Details

    • Toolkit

      public Toolkit()
  • Method Details

    • setupForApple

      protected static void setupForApple()
    • installFlatLaf

      protected static LookAndFeel installFlatLaf()
    • scaledIcon

      public static ImageIcon scaledIcon(int size, String resourcePath)
    • smoothResize

      public static BufferedImage smoothResize(BufferedImage src, int w, int h)
      Scale an image with interpolation / AA for nicer effects
      Parameters:
      src - Source image
      w - Width of new image
      h - Height of new image
      Returns:
      A new, resized image
    • pixelResize

      public static BufferedImage pixelResize(BufferedImage src, int w, int h)
    • createDocumentListener

      public static DocumentListener createDocumentListener(Runnable a)
    • init

      public static void init()
    • getImage

      public static Image getImage(URL resourceURL)
    • getDefaultToolkit

      public static Toolkit getDefaultToolkit()
    • launchBrowser

      public static void launchBrowser(String url)
    • showMainFrame

      public static void showMainFrame(JComponent comp)
    • relinquishFocus

      public static void relinquishFocus(Component c)
      Relinquish focus from a component
      Parameters:
      c - Component to remove focus from
    • makeMenu

      public static JMenuItem makeMenu(String name, Runnable op)
    • makeAction

      public static AbstractAction makeAction(String name, Runnable op)
    • addPopupMenu

      public static void addPopupMenu(JComponent comp, JPopupMenu popupMenu)
      Adds a popup menu to a component, including necessary mouse listeners
      Parameters:
      popupMenu - Op up menu component
    • createDialogBorder

      public static Border createDialogBorder()
    • createEmptyBorder

      public static Border createEmptyBorder(int x)
    • makeHelp

      public static JComponent makeHelp(String helpText)
    • makeNote

      public static JComponent makeNote(String title, String note)
    • makeNote

      public static JComponent makeNote(String note)
    • copyToClipboard

      public static void copyToClipboard(String string)
    • withTitledBorder

      public static JComponent withTitledBorder(String title, JComponent comp)
    • scrollToBottom

      public static <E> void scrollToBottom(JScrollPane scrollPane)