Java Code Examples for javax.swing.UIManager#getDimension()
The following examples show how to use
javax.swing.UIManager#getDimension() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Test6524757.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private static Object convert(Locale locale, String key) { if (key.endsWith("Text")) { // NON-NLS: suffix for text message return UIManager.getString(key, locale); } if (key.endsWith("Size")) { // NON-NLS: suffix for dimension return UIManager.getDimension(key, locale); } if (key.endsWith("Color")) { // NON-NLS: suffix for color return UIManager.getColor(key, locale); } int value = SwingUtilities2.getUIDefaultsInt(key, locale, -1); return Integer.valueOf(value); }
Example 2
Source File: Test6524757.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
private static Object convert(Locale locale, String key) { if (key.endsWith("Text")) { // NON-NLS: suffix for text message return UIManager.getString(key, locale); } if (key.endsWith("Size")) { // NON-NLS: suffix for dimension return UIManager.getDimension(key, locale); } if (key.endsWith("Color")) { // NON-NLS: suffix for color return UIManager.getColor(key, locale); } int value = SwingUtilities2.getUIDefaultsInt(key, locale, -1); return Integer.valueOf(value); }
Example 3
Source File: Test6524757.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private static Object convert(Locale locale, String key) { if (key.endsWith("Text")) { // NON-NLS: suffix for text message return UIManager.getString(key, locale); } if (key.endsWith("Size")) { // NON-NLS: suffix for dimension return UIManager.getDimension(key, locale); } if (key.endsWith("Color")) { // NON-NLS: suffix for color return UIManager.getColor(key, locale); } int value = SwingUtilities2.getUIDefaultsInt(key, locale, -1); return Integer.valueOf(value); }
Example 4
Source File: Test6524757.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private static Object convert(Locale locale, String key) { if (key.endsWith("Text")) { // NON-NLS: suffix for text message return UIManager.getString(key, locale); } if (key.endsWith("Size")) { // NON-NLS: suffix for dimension return UIManager.getDimension(key, locale); } if (key.endsWith("Color")) { // NON-NLS: suffix for color return UIManager.getColor(key, locale); } int value = SwingUtilities2.getUIDefaultsInt(key, locale, -1); return Integer.valueOf(value); }
Example 5
Source File: Test6524757.java From hottub with GNU General Public License v2.0 | 5 votes |
private static Object convert(Locale locale, String key) { if (key.endsWith("Text")) { // NON-NLS: suffix for text message return UIManager.getString(key, locale); } if (key.endsWith("Size")) { // NON-NLS: suffix for dimension return UIManager.getDimension(key, locale); } if (key.endsWith("Color")) { // NON-NLS: suffix for color return UIManager.getColor(key, locale); } int value = SwingUtilities2.getUIDefaultsInt(key, locale, -1); return Integer.valueOf(value); }
Example 6
Source File: Test6524757.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
private static Object convert(Locale locale, String key) { if (key.endsWith("Text")) { // NON-NLS: suffix for text message return UIManager.getString(key, locale); } if (key.endsWith("Size")) { // NON-NLS: suffix for dimension return UIManager.getDimension(key, locale); } if (key.endsWith("Color")) { // NON-NLS: suffix for color return UIManager.getColor(key, locale); } int value = SwingUtilities2.getUIDefaultsInt(key, locale, -1); return Integer.valueOf(value); }
Example 7
Source File: Test6524757.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
private static Object convert(Locale locale, String key) { if (key.endsWith("Text")) { // NON-NLS: suffix for text message return UIManager.getString(key, locale); } if (key.endsWith("Size")) { // NON-NLS: suffix for dimension return UIManager.getDimension(key, locale); } if (key.endsWith("Color")) { // NON-NLS: suffix for color return UIManager.getColor(key, locale); } int value = SwingUtilities2.getUIDefaultsInt(key, locale, -1); return Integer.valueOf(value); }
Example 8
Source File: Test6524757.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private static Object convert(Locale locale, String key) { if (key.endsWith("Text")) { // NON-NLS: suffix for text message return UIManager.getString(key, locale); } if (key.endsWith("Size")) { // NON-NLS: suffix for dimension return UIManager.getDimension(key, locale); } if (key.endsWith("Color")) { // NON-NLS: suffix for color return UIManager.getColor(key, locale); } int value = SwingUtilities2.getUIDefaultsInt(key, locale, -1); return Integer.valueOf(value); }
Example 9
Source File: Test6524757.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private static Object convert(Locale locale, String key) { if (key.endsWith("Text")) { // NON-NLS: suffix for text message return UIManager.getString(key, locale); } if (key.endsWith("Size")) { // NON-NLS: suffix for dimension return UIManager.getDimension(key, locale); } if (key.endsWith("Color")) { // NON-NLS: suffix for color return UIManager.getColor(key, locale); } int value = SwingUtilities2.getUIDefaultsInt(key, locale, -1); return Integer.valueOf(value); }
Example 10
Source File: FlatMenuItemRenderer.java From FlatLaf with Apache License 2.0 | 5 votes |
protected FlatMenuItemRenderer( JMenuItem menuItem, Icon checkIcon, Icon arrowIcon, Font acceleratorFont, String acceleratorDelimiter ) { this.menuItem = menuItem; this.checkIcon = checkIcon; this.arrowIcon = arrowIcon; this.acceleratorFont = acceleratorFont; this.acceleratorDelimiter = acceleratorDelimiter; Dimension minimumIconSize = UIManager.getDimension( "MenuItem.minimumIconSize" ); this.minimumIconSize = (minimumIconSize != null) ? minimumIconSize : new Dimension( 16, 16 ); }
Example 11
Source File: BESpinnerUI.java From beautyeye with Apache License 2.0 | 5 votes |
protected Component createNextButton() { // if (NLXPStyle.getXP() != null) { JButton xpButton = new GlyphButton(spinner, Type.up); Dimension size = UIManager.getDimension("Spinner.arrowButtonSize"); xpButton.setPreferredSize(size); xpButton.setRequestFocusEnabled(false); installNextButtonListeners(xpButton); return xpButton; } // return super.createNextButton(); }
Example 12
Source File: Test6524757.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
private static Object convert(Locale locale, String key) { if (key.endsWith("Text")) { // NON-NLS: suffix for text message return UIManager.getString(key, locale); } if (key.endsWith("Size")) { // NON-NLS: suffix for dimension return UIManager.getDimension(key, locale); } if (key.endsWith("Color")) { // NON-NLS: suffix for color return UIManager.getColor(key, locale); } int value = SwingUtilities2.getUIDefaultsInt(key, locale, -1); return Integer.valueOf(value); }
Example 13
Source File: BESpinnerUI.java From beautyeye with Apache License 2.0 | 5 votes |
protected Component createPreviousButton() { // if (NLXPStyle.getXP() != null) { JButton xpButton = new GlyphButton(spinner, Type.down); Dimension size = UIManager.getDimension("Spinner.arrowButtonSize"); xpButton.setPreferredSize(size); xpButton.setRequestFocusEnabled(false); installPreviousButtonListeners(xpButton); return xpButton; } // return super.createPreviousButton(); }
Example 14
Source File: FlatDesktopIconUI.java From FlatLaf with Apache License 2.0 | 5 votes |
@Override protected void installDefaults() { super.installDefaults(); LookAndFeel.installColors( desktopIcon, "DesktopIcon.background", "DesktopIcon.foreground" ); iconSize = UIManager.getDimension( "DesktopIcon.iconSize" ); closeSize = UIManager.getDimension( "DesktopIcon.closeSize" ); }
Example 15
Source File: Test6524757.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
private static Object convert(Locale locale, String key) { if (key.endsWith("Text")) { // NON-NLS: suffix for text message return UIManager.getString(key, locale); } if (key.endsWith("Size")) { // NON-NLS: suffix for dimension return UIManager.getDimension(key, locale); } if (key.endsWith("Color")) { // NON-NLS: suffix for color return UIManager.getColor(key, locale); } int value = SwingUtilities2.getUIDefaultsInt(key, locale, -1); return Integer.valueOf(value); }
Example 16
Source File: FlatProgressBarUI.java From FlatLaf with Apache License 2.0 | 5 votes |
@Override protected void installDefaults() { super.installDefaults(); LookAndFeel.installProperty( progressBar, "opaque", false ); arc = UIManager.getInt( "ProgressBar.arc" ); horizontalSize = UIManager.getDimension( "ProgressBar.horizontalSize" ); verticalSize = UIManager.getDimension( "ProgressBar.verticalSize" ); }
Example 17
Source File: SheetTable.java From netbeans with Apache License 2.0 | 4 votes |
/** Creates a new instance of SheetTable */ public SheetTable() { super(new SheetTableModel(), new SheetColumnModel(), new DefaultListSelectionModel()); setPropertySetModel(new PropertySetModelImpl()); //Set a default row height setRowHeight(16); //Show grid lines if no alternating color defined setShowGrid(PropUtils.noAltBg()); setShowVerticalLines(PropUtils.noAltBg()); setShowHorizontalLines(PropUtils.noAltBg()); setAutoResizeMode(JTable.AUTO_RESIZE_NEXT_COLUMN); if (!PropUtils.noAltBg()) { setIntercellSpacing(new Dimension(0, 0)); } else { Dimension intercellSpacing = UIManager.getDimension("PropSheet.intercellSpacing"); if (intercellSpacing != null) { setIntercellSpacing(intercellSpacing); } } setGridColor(PropUtils.getSetRendererColor()); Color c = UIManager.getColor("PropSheet.selectionBackground"); //NOI18N if (c != null) { setSelectionBackground(c); } c = UIManager.getColor("PropSheet.selectionForeground"); //NOI18N if (c != null) { setSelectionForeground(c); } getAccessibleContext().setAccessibleName(NbBundle.getMessage(SheetTable.class, "ACSN_SHEET_TABLE")); //NOI18N getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(SheetTable.class, "ACSD_SHEET_TABLE")); //NOI18N setTransferHandler(new SheetTableTransferHandler()); Color col = UIManager.getColor("netbeans.ps.background"); //NOI18N if (col != null) { setBackground(col); } setFocusTraversalPolicy(new STPolicy()); instanceCount++; }
Example 18
Source File: FlatWindowAbstractIcon.java From FlatLaf with Apache License 2.0 | 4 votes |
public FlatWindowAbstractIcon() { this( UIManager.getDimension( "TitlePane.buttonSize" ), UIManager.getColor( "TitlePane.buttonHoverBackground" ), UIManager.getColor( "TitlePane.buttonPressedBackground" ) ); }
Example 19
Source File: FlatInternalFrameCloseIcon.java From FlatLaf with Apache License 2.0 | 4 votes |
public FlatInternalFrameCloseIcon() { super( UIManager.getDimension( "InternalFrame.buttonSize" ), UIManager.getColor( "InternalFrame.closeHoverBackground" ), UIManager.getColor( "InternalFrame.closePressedBackground" ) ); }
Example 20
Source File: FlatInternalFrameAbstractIcon.java From FlatLaf with Apache License 2.0 | 4 votes |
public FlatInternalFrameAbstractIcon() { this( UIManager.getDimension( "InternalFrame.buttonSize" ), UIManager.getColor( "InternalFrame.buttonHoverBackground" ), UIManager.getColor( "InternalFrame.buttonPressedBackground" ) ); }