public class UITools extends Object
ui
.
In scripts this would be a simple way of opening a info popup:
ui.informationMessage("Hello World!") ui.informationMessage(ui.frame, "Hello World!") // longer version, equivalent
Modifier and Type | Class | Description |
---|---|---|
static class |
UITools.InsertEolAction |
Modifier and Type | Field | Description |
---|---|---|
static float |
FONT_SCALE_FACTOR |
|
static String |
MAIN_FREEPLANE_FRAME |
|
static Dimension |
MAX_BUTTON_DIMENSION |
|
static String |
MENU_ITEM_FONT_SIZE_PROPERTY |
|
static String |
SCROLLBAR_INCREMENT |
Constructor | Description |
---|---|
UITools() |
Modifier and Type | Method | Description |
---|---|---|
static void |
addEscapeActionToDialog(JDialog dialog) |
|
static void |
addEscapeActionToDialog(JDialog dialog,
Action action) |
|
static void |
addKeyActionToDialog(JDialog dialog,
Action action,
String keyStroke,
String actionId) |
|
static void |
addScrollbarIncrementPropertyListener(JScrollPane scrollPane) |
|
static void |
addTitledBorder(JComponent c,
String title,
float size) |
|
static void |
backOtherWindows() |
|
static void |
convertPointFromAncestor(Component ancestor,
Point p,
Component c) |
|
static void |
convertPointToAncestor(Component from,
Point p,
Component destination) |
|
static void |
convertPointToAncestor(Component source,
Point point,
Class<?> ancestorClass) |
|
static void |
convertRectangleToAncestor(Component from,
Rectangle r,
Component destination) |
|
static JDialog |
createCancelDialog(Component component,
String titel,
String text) |
|
static JButton |
createHtmlLinkStyleButton(URI uri,
String title) |
|
static BasicStroke |
createStroke(float width,
int[] dash,
int join) |
|
static void |
errorMessage(Object message) |
|
static void |
executeWhenNodeHasFocus(Runnable runnable) |
|
static void |
focusOn(JComponent component) |
|
static Rectangle |
getAvailableScreenBounds(Component frame) |
|
static int |
getComponentIndex(Component component) |
|
static Frame |
getCurrentFrame() |
|
static Component |
getCurrentRootComponent() |
|
static Frame |
getFrame() |
|
static KeyStroke |
getKeyStroke(String keyStrokeDescription) |
returns a KeyStroke if possible and null otherwise.
|
static Component |
getMenuComponent() |
|
static Rectangle |
getScreenBounds(GraphicsConfiguration graphicsConfiguration) |
|
static Color |
getTextColorForBackground(Color color) |
|
static float |
getUIFontSize(double scalingFactor) |
|
static Rectangle |
getValidFrameBounds(Component frame,
int win_x,
int win_y,
int win_width,
int win_height) |
|
static void |
informationMessage(Component frame,
String message) |
|
static void |
informationMessage(Component frame,
String message,
String title) |
|
static void |
informationMessage(Component frame,
String text,
String string,
int type) |
|
static void |
informationMessage(String message) |
|
static Font |
invertScale(Font font) |
|
static boolean |
isEditingText() |
|
static String |
keyStrokeToString(KeyStroke keyStroke) |
formats a KeyStroke in a ledgible way, e.g.
|
static void |
repaintAll(Container root) |
|
static Font |
scale(Font font) |
|
static Font |
scaleFontInt(Font font,
double additionalFactor) |
|
static void |
setBounds(Component frame,
int win_x,
int win_y,
int win_width,
int win_height) |
|
static void |
setDialogLocationRelativeTo(JDialog dialog,
Component c) |
|
static void |
setDialogLocationRelativeTo(JDialog dialog,
org.freeplane.features.map.NodeModel node) |
|
static void |
setDialogLocationUnder(JDialog dialog,
org.freeplane.features.map.NodeModel node) |
|
static void |
setScrollbarIncrement(JScrollPane scrollPane) |
|
static void |
showAttributeEmptyStringErrorMessage() |
Shows the error message "attributes_adding_empty_attribute_error"
|
static int |
showConfirmDialog(org.freeplane.features.map.NodeModel node,
Object message,
String title,
int optionType) |
|
static int |
showConfirmDialog(org.freeplane.features.map.NodeModel node,
Object message,
String title,
int optionType,
int messageType) |
|
static void |
showFrame() |
|
static String |
showInputDialog(org.freeplane.features.map.NodeModel node,
String message,
String initialValue) |
|
static String |
showInputDialog(org.freeplane.features.map.NodeModel node,
String text,
String title,
int type) |
|
static void |
showMessage(String message,
int messageType) |
|
static float[] |
toFloats(int[] dash) |
public static final String MENU_ITEM_FONT_SIZE_PROPERTY
public static final String MAIN_FREEPLANE_FRAME
public static final String SCROLLBAR_INCREMENT
public static final Dimension MAX_BUTTON_DIMENSION
public static final float FONT_SCALE_FACTOR
public static void addEscapeActionToDialog(JDialog dialog)
public static void addKeyActionToDialog(JDialog dialog, Action action, String keyStroke, String actionId)
public static void convertPointFromAncestor(Component ancestor, Point p, Component c)
public static void convertPointToAncestor(Component source, Point point, Class<?> ancestorClass)
public static void convertRectangleToAncestor(Component from, Rectangle r, Component destination)
public static void convertPointToAncestor(Component from, Point p, Component destination)
public static void errorMessage(Object message)
public static Component getCurrentRootComponent()
public static Frame getCurrentFrame()
public static Frame getFrame()
public static Component getMenuComponent()
public static KeyStroke getKeyStroke(String keyStrokeDescription)
public static String keyStrokeToString(KeyStroke keyStroke)
public static void informationMessage(String message)
public static void informationMessage(Component frame, String message, String title)
public static void informationMessage(Component frame, String text, String string, int type)
public static void setBounds(Component frame, int win_x, int win_y, int win_width, int win_height)
public static Rectangle getValidFrameBounds(Component frame, int win_x, int win_y, int win_width, int win_height)
public static Rectangle getScreenBounds(GraphicsConfiguration graphicsConfiguration)
public static void setDialogLocationRelativeTo(JDialog dialog, Component c)
public static void setDialogLocationRelativeTo(JDialog dialog, org.freeplane.features.map.NodeModel node)
public static void setDialogLocationUnder(JDialog dialog, org.freeplane.features.map.NodeModel node)
public static void showAttributeEmptyStringErrorMessage()
public static void showMessage(String message, int messageType)
public static int showConfirmDialog(org.freeplane.features.map.NodeModel node, Object message, String title, int optionType, int messageType)
public static int showConfirmDialog(org.freeplane.features.map.NodeModel node, Object message, String title, int optionType)
public static String showInputDialog(org.freeplane.features.map.NodeModel node, String message, String initialValue)
public static String showInputDialog(org.freeplane.features.map.NodeModel node, String text, String title, int type)
public static void setScrollbarIncrement(JScrollPane scrollPane)
public static void addScrollbarIncrementPropertyListener(JScrollPane scrollPane)
public static void focusOn(JComponent component)
public static BasicStroke createStroke(float width, int[] dash, int join)
public static float[] toFloats(int[] dash)
public static void repaintAll(Container root)
public static JDialog createCancelDialog(Component component, String titel, String text)
public static void addTitledBorder(JComponent c, String title, float size)
public static void backOtherWindows()
public static final int getComponentIndex(Component component)
public static void showFrame()
public static boolean isEditingText()
public static void executeWhenNodeHasFocus(Runnable runnable)
public static float getUIFontSize(double scalingFactor)