public class PlatformUIUtils extends Object
| 构造器和说明 |
|---|
PlatformUIUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
centerWindow(JFrame frame) |
static JPanel |
createDialogButtonPanel(JButton[] jbPositives,
boolean resizable)
Create a dialog button panel with the order and alignment dependant on
the platform.
|
static JPanel |
createDialogButtonPanel(JButton[] jbPositives,
JButton jbNegative,
boolean resizable)
Create a dialog button panel with the order and alignment dependant on
the platform.
|
static JPanel |
createDialogButtonPanel(JButton[] jbPositives,
JButton jbNegative,
JButton[] jbOthers,
boolean resizable,
String insets)
Create a dialog button panel with the order and alignment dependent on
the platform.
|
static JPanel |
createDialogButtonPanel(JButton jbPositive,
boolean resizable)
Create a dialog button panel with the order and alignment dependant on
the platform.
|
static JPanel |
createDialogButtonPanel(JButton jbPositive,
JButton jbNegative)
Create a dialog button panel with the order and alignment dependent on
the platform.
|
static JPanel |
createDialogButtonPanel(JButton jbPositive,
JButton jbNegative,
boolean resizable)
Create a dialog button panel with the order and alignment dependant on
the platform.
|
static JPanel |
createDialogButtonPanel(JButton jbPositive,
JButton jbNegative,
JButton[] jbOther,
boolean resizable)
Create a dialog button panel with the order and alignment dependant on
the platform.
|
static JPanel |
createDialogButtonPanel(JButton jbPositive,
JButton jbNegative,
JButton jbOther,
boolean resizable)
Create a dialog button panel with the order and alignment dependant on
the platform.
|
static JScrollPane |
createScrollPane(Component view,
int vsbPolicy,
int hsbPolicy)
Create a scroll pane whose scroll bar policy conforms with the current
platform. i.e. on Mac OS lf if a scroll bar's policy states that it may
be shown as needed it should instead always be shown.
|
static javafx.embed.swing.JFXPanel |
createWebBrowserEngine(JFrame frame,
String url,
JLabel statusText,
JTextField newurlText,
JProgressBar jProgressBar)
Create the web browser using JAVAFx api issue with the exit thread:
http://stackoverflow.com/questions/19212569/javafx-runlater-runnable-not-called
|
static void |
MaximizeWindow(JFrame frame) |
static void |
openEmail(String receiver,
String subject,
String body)
Open a url in browser
|
static void |
openUrl(String url)
Open a url in browser
|
static void |
quitWindow(JFrame frame) |
static void |
setMnemonic(AbstractButton button,
int underlinechar)
Set mnemonic on button in a platform dependant manner.
|
static void |
setMnemonic(AbstractButton button,
int underlinechar,
int index)
Set mnemonic on button in a platform dependant manner.
|
public static void quitWindow(JFrame frame)
public static void MaximizeWindow(JFrame frame)
public static void centerWindow(JFrame frame)
public static void openEmail(String receiver, String subject, String body)
receiver - The receiver email addresssubject - The email subjectbody - The email body contentpublic static void openUrl(String url)
url - the url need to openpublic static javafx.embed.swing.JFXPanel createWebBrowserEngine(JFrame frame, String url, JLabel statusText, JTextField newurlText, JProgressBar jProgressBar)
frame - the frame uiurl - the new opened url pagestatusText - the status bar text need to shownewurlText - the navigate url changedjProgressBar - the progressbar number will be showedpublic static void setMnemonic(AbstractButton button, int underlinechar)
button - Buttonunderlinechar - Index of string to underlinepublic static void setMnemonic(AbstractButton button, int underlinechar, int index)
button - Buttonunderlinechar - Mnemonicindex - Index of string to underlinepublic static JScrollPane createScrollPane(Component view, int vsbPolicy, int hsbPolicy)
view - Component to viewvsbPolicy - Vertical scroll bar policyhsbPolicy - Horizontal scroll bar policypublic static JPanel createDialogButtonPanel(JButton jbPositive, boolean resizable)
jbPositive - Positive buttonresizable - Is the dialog resizable?public static JPanel createDialogButtonPanel(JButton[] jbPositives, boolean resizable)
jbPositives - Positive buttonsresizable - Is the dialog resizable?public static JPanel createDialogButtonPanel(JButton jbPositive, JButton jbNegative, boolean resizable)
jbPositive - Positive buttonjbNegative - Negative buttonresizable - Is the dialog resizable?public static JPanel createDialogButtonPanel(JButton[] jbPositives, JButton jbNegative, boolean resizable)
jbPositives - Positive buttonsjbNegative - Negative buttonresizable - Is the dialog resizable?public static JPanel createDialogButtonPanel(JButton jbPositive, JButton jbNegative, JButton jbOther, boolean resizable)
jbPositive - Positive buttonjbNegative - Negative buttonjbOther - Other buttonresizable - Is the dialog resizable?public static JPanel createDialogButtonPanel(JButton jbPositive, JButton jbNegative, JButton[] jbOther, boolean resizable)
jbPositive - Positive buttonjbNegative - Negative buttonjbOther - Other buttonresizable - Is the dialog resizable?public static JPanel createDialogButtonPanel(JButton[] jbPositives, JButton jbNegative, JButton[] jbOthers, boolean resizable, String insets)
jbPositives - Positive buttonsjbNegative - Negative buttonjbOthers - Other buttonsresizable - Is the dialog resizable?insets - Insets for panel (MiGLayout constraint)public static JPanel createDialogButtonPanel(JButton jbPositive, JButton jbNegative)
jbPositive - Positive buttonjbNegative - Negative buttonCopyright © 2016 Alter Hu. All rights reserved.