Java Doc for SubstanceSizeUtils.java in  » Swing-Library » substance-look-feel » org » jvnet » substance » utils » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Swing Library » substance look feel » org.jvnet.substance.utils 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jvnet.substance.utils.SubstanceSizeUtils

SubstanceSizeUtils
public class SubstanceSizeUtils (Code)
This class is responsible for computing DPI-aware insets, stroke widths, paddings, icon sizes etc.
author:
   Kirill Grouchnikov




Method Summary
public static  floatgetAdjustedSize(int fontSize, float baseSize, int forEachBase, float toAdjustBy)
     Gets the adjusted size.
public static  intgetAdjustedSize(int fontSize, int baseSize, int forEachBase, int toAdjustBy, boolean toRoundAsEven)
     Gets the adjusted size.
public static  intgetArrowIconHeight(int fontSize)
     Returns the height of arrow icons under the specified font size.
Parameters:
  fontSize - Font size.
public static  intgetArrowIconWidth(int fontSize)
     Returns the width of arrow icons under the specified font size.
Parameters:
  fontSize - Font size.
public static  floatgetArrowStrokeWidth(int fontSize)
     Returns the stroke width of arrow icons under the specified font size.
Parameters:
  fontSize - Font size.
public static  intgetBigDragBumpDiameter(int fontSize)
     Returns the diameter of a big drag bump dot under the specified font size.
Parameters:
  fontSize - Font size.
public static  floatgetBorderStrokeWidth(int fontSize)
     Returns the stroke width of borders under the specified font size.
Parameters:
  fontSize - Font size.
public static  BordergetCheckBoxBorder(int fontSize)
     Returns the border for check boxes under the specified font size.
Parameters:
  fontSize - Font size.
public static  intgetCheckBoxMarkSize(int fontSize)
     Returns the check mark size for check boxes under the specified font size.
Parameters:
  fontSize - Font size.
public static  floatgetClassicButtonCornerRadius(int fontSize)
     Returns the corner radius for ClassicButtonShaper under the specified font size.
Parameters:
  fontSize - Font size.
public static  InsetsgetComboBorderInsets(int fontSize)
     Returns the combo box border insets under the specified font size.
Parameters:
  fontSize - Font size.
public static  InsetsgetComboTextBorderInsets(int fontSize)
     Returns the combo box text border insets under the specified font size.
Parameters:
  fontSize - Font size.
public static  intgetComponentFontSize(Component c)
     Computes the font size for the specified component.
public static  intgetControlFontSize()
     Gets the current control font size.
public static  InsetsgetDefaultBorderInsets(int fontSize)
     Returns the default border insets under the specified font size.
Parameters:
  fontSize - Font size.
public static  floatgetDoubleArrowStrokeWidth(int fontSize)
     Returns the stroke width of double arrow icons under the specified font size.
Parameters:
  fontSize - Font size.
public static  intgetDragBumpDiameter(int fontSize)
     Returns the diameter of a drag bump dot under the specified font size.
Parameters:
  fontSize - Font size.
public static  intgetExtraPadding(int fontSize)
     Returns the extra padding amount under the specified font size.
Parameters:
  fontSize - Font size.
public static  floatgetFocusStrokeWidth(int fontSize)
     Returns the stroke width of focus rings under the specified font size.
Parameters:
  fontSize - Font size.
public static  InsetsgetListCellRendererInsets(int fontSize)
     Returns the list cell renderer insets under the specified font size.
Parameters:
  fontSize - Font size.
public static  intgetMenuCheckMarkSize(int fontSize)
     Returns the check mark size of check box menu items and radio button menu items under the specified font size.
Parameters:
  fontSize - Font size.
public static  intgetMenuItemMargin(int fontSize)
     Returns the margin for menu items under the specified font size.
Parameters:
  fontSize - Font size.
public static  intgetMenuTextIconGap(int fontSize)
     Returns the gap between text and icon in menu items under the specified font size.
Parameters:
  fontSize - Font size.
public static  intgetMinButtonHeight(int fontSize)
     Returns the minimum button height under the specified font size.
Parameters:
  fontSize - Font size.
public static  intgetMinButtonWidth(int fontSize)
     Returns the maximum button height under the specified font size.
Parameters:
  fontSize - Font size.
public static  intgetPasswordDotDiameter(int fontSize)
     Returns the password dot diameter for password fields under the specified font size.
Parameters:
  fontSize - Font size.
public static  intgetPasswordDotGap(int fontSize)
     Returns the password dot gap for password fields under the specified font size.
Parameters:
  fontSize - Font size.
public static  doublegetPointsToPixelsRatio()
    
public static  BordergetRadioButtonBorder(int fontSize)
     Returns the border for radio buttons under the specified font size.
Parameters:
  fontSize - Font size.
public static  intgetRadioButtonMarkSize(int fontSize)
     Returns the check mark size for radio buttons under the specified font size.
Parameters:
  fontSize - Font size.
public static  intgetScrollBarWidth(int fontSize)
     Returns the width of scroll bars under the specified font size.
Parameters:
  fontSize - Font size.
public static  intgetSliderIconSize(int fontSize)
     Returns the slider thumb icon size under the specified font size.
Parameters:
  fontSize - Font size.
public static  intgetSliderTickSize(int fontSize)
     Returns the slider tick size under the specified font size.
Parameters:
  fontSize - Font size.
public static  intgetSliderTrackSize(int fontSize)
     Returns the slider track size under the specified font size.
Parameters:
  fontSize - Font size.
public static  InsetsgetSpinnerArrowButtonInsets(int fontSize)
     Returns the spinner arrow button insets under the specified font size.
Parameters:
  fontSize - Font size.
public static  InsetsgetSpinnerBorderInsets(int fontSize)
     Returns the spinner border insets under the specified font size.
Parameters:
  fontSize - Font size.
public static  intgetSpinnerButtonWidth(int fontSize)
     Returns the spinner button width under the specified font size.
Parameters:
  fontSize - Font size.
public static  InsetsgetSpinnerTextBorderInsets(int fontSize)
     Returns the spinner text border insets under the specified font size.
Parameters:
  fontSize - Font size.
public static  floatgetTabCloseButtonStrokeWidth(int fontSize)
     Returns the stroke width of tab close buttons under the specified size.
Parameters:
  fontSize - Font size.
public static  intgetTabCloseIconSize(int fontSize)
     Returns the icon size of tab close buttons under the specified size.
Parameters:
  fontSize - Font size.
public static  InsetsgetTabbedPaneContentInsets(int fontSize)
     Returns the tabbed pane content insets under the specified size.
public static  InsetsgetTableCellRendererInsets(int fontSize)
     Returns the table cell renderer insets under the specified font size.
Parameters:
  fontSize - Font size.
public static  InsetsgetTextBorderInsets(int fontSize)
     Returns the text border insets under the specified font size.
Parameters:
  fontSize - Font size.
public static  intgetTitlePaneIconSize()
     Returns the icon size of title pane buttons under the specified size.
Parameters:
  fontSize - Font size.
public static  intgetToolBarDragInset(int fontSize)
     Returns the tool bar drag inset under the specified font size.
Parameters:
  fontSize - Font size.
public static  InsetsgetToolBarInsets(int fontSize)
     Returns the tool bar insets under the specified font size.
Parameters:
  fontSize - Font size.
public static  intgetTreeIconSize(int fontSize)
     Returns the icon size of tree expand / collapse icons under the specified size.
Parameters:
  fontSize - Font size.
public static  voidresetPointsToPixelsRatio(FontPolicy fontPolicy)
    
public static  voidsetControlFontSize(int size)
     Sets the new value for the control font size.



Method Detail
getAdjustedSize
public static float getAdjustedSize(int fontSize, float baseSize, int forEachBase, float toAdjustBy)(Code)
Gets the adjusted size. The basic functionality of this method is as follows:
  • The baseSize parameter specifies the base value
  • The forEachBase and toAdjustBy specify how to adjust the resulting value based on the passed fontSize.
For example, if you want base value to be 1.2 pixels, and have it grow by 0.1 pixel for every additional pixel in the font size, call this method with the following values:
  • baseSize = 1.2
  • forEachBase = 1
  • toAdjustBy = 0.1

Parameters:
  fontSize - Font size.
Parameters:
  baseSize - The base value.
Parameters:
  forEachBase - Base units for computing the adjustment.
Parameters:
  toAdjustBy - Adjustment amount for computing the adjustment. Adjusted size.



getAdjustedSize
public static int getAdjustedSize(int fontSize, int baseSize, int forEachBase, int toAdjustBy, boolean toRoundAsEven)(Code)
Gets the adjusted size. The basic functionality of this method is as follows:
  • The baseSize parameter specifies the base value
  • The forEachBase and toAdjustBy specify how to adjust the resulting value based on the passed fontSize.
For example, if you want base value to be 4 pixels, and have it grow by 1 pixel for every 3 additional pixels in the font size, call this method with the following values:
  • baseSize = 4
  • forEachBase = 3
  • toAdjustBy = 1

Parameters:
  fontSize - Font size.
Parameters:
  baseSize - The base value.
Parameters:
  forEachBase - Base units for computing the adjustment.
Parameters:
  toAdjustBy - Adjustment amount for computing the adjustment.
Parameters:
  toRoundAsEven - If true, the final value will be rounded downto the closest even value. Adjusted size.



getArrowIconHeight
public static int getArrowIconHeight(int fontSize)(Code)
Returns the height of arrow icons under the specified font size.
Parameters:
  fontSize - Font size. Height of arrow icons under the specified font size.



getArrowIconWidth
public static int getArrowIconWidth(int fontSize)(Code)
Returns the width of arrow icons under the specified font size.
Parameters:
  fontSize - Font size. Width of arrow icons under the specified font size.



getArrowStrokeWidth
public static float getArrowStrokeWidth(int fontSize)(Code)
Returns the stroke width of arrow icons under the specified font size.
Parameters:
  fontSize - Font size. Stroke width of arrow icons under the specified font size.



getBigDragBumpDiameter
public static int getBigDragBumpDiameter(int fontSize)(Code)
Returns the diameter of a big drag bump dot under the specified font size.
Parameters:
  fontSize - Font size. Diameter of a big drag bump dot under the specified font size.



getBorderStrokeWidth
public static float getBorderStrokeWidth(int fontSize)(Code)
Returns the stroke width of borders under the specified font size.
Parameters:
  fontSize - Font size. Stroke width of borders under the specified font size.



getCheckBoxBorder
public static Border getCheckBoxBorder(int fontSize)(Code)
Returns the border for check boxes under the specified font size.
Parameters:
  fontSize - Font size. Border for check boxes under the specified font size.



getCheckBoxMarkSize
public static int getCheckBoxMarkSize(int fontSize)(Code)
Returns the check mark size for check boxes under the specified font size.
Parameters:
  fontSize - Font size. Check mark size for check boxes under the specified font size.



getClassicButtonCornerRadius
public static float getClassicButtonCornerRadius(int fontSize)(Code)
Returns the corner radius for ClassicButtonShaper under the specified font size.
Parameters:
  fontSize - Font size. Corner radius for ClassicButtonShaper under the specifiedfont size.



getComboBorderInsets
public static Insets getComboBorderInsets(int fontSize)(Code)
Returns the combo box border insets under the specified font size.
Parameters:
  fontSize - Font size. Combo box border insets under the specified font size.



getComboTextBorderInsets
public static Insets getComboTextBorderInsets(int fontSize)(Code)
Returns the combo box text border insets under the specified font size.
Parameters:
  fontSize - Font size. Combo box text border insets under the specified font size.



getComponentFontSize
public static int getComponentFontSize(Component c)(Code)
Computes the font size for the specified component. If the component is null or doesn't have font set ( Component.getFont returns null), this method returns the default control font size from SubstanceSizeUtils.getControlFontSize() .
Parameters:
  c - Component. Font size for the specified component



getControlFontSize
public static int getControlFontSize()(Code)
Gets the current control font size. Control font size.



getDefaultBorderInsets
public static Insets getDefaultBorderInsets(int fontSize)(Code)
Returns the default border insets under the specified font size.
Parameters:
  fontSize - Font size. Default border insets under the specified font size.



getDoubleArrowStrokeWidth
public static float getDoubleArrowStrokeWidth(int fontSize)(Code)
Returns the stroke width of double arrow icons under the specified font size.
Parameters:
  fontSize - Font size. Stroke width of double arrow icons under the specified font size.



getDragBumpDiameter
public static int getDragBumpDiameter(int fontSize)(Code)
Returns the diameter of a drag bump dot under the specified font size.
Parameters:
  fontSize - Font size. Diameter of a drag bump dot under the specified font size.



getExtraPadding
public static int getExtraPadding(int fontSize)(Code)
Returns the extra padding amount under the specified font size.
Parameters:
  fontSize - Font size. Extra padding amount under the specified font size.



getFocusStrokeWidth
public static float getFocusStrokeWidth(int fontSize)(Code)
Returns the stroke width of focus rings under the specified font size.
Parameters:
  fontSize - Font size. Stroke width of focus rings under the specified font size.



getListCellRendererInsets
public static Insets getListCellRendererInsets(int fontSize)(Code)
Returns the list cell renderer insets under the specified font size.
Parameters:
  fontSize - Font size. List cell renderer insets under the specified font size.



getMenuCheckMarkSize
public static int getMenuCheckMarkSize(int fontSize)(Code)
Returns the check mark size of check box menu items and radio button menu items under the specified font size.
Parameters:
  fontSize - Font size. Check mark size of check box menu items and radio button menuitems under the specified font size.



getMenuItemMargin
public static int getMenuItemMargin(int fontSize)(Code)
Returns the margin for menu items under the specified font size.
Parameters:
  fontSize - Font size. Margin for menu items under the specified font size.



getMenuTextIconGap
public static int getMenuTextIconGap(int fontSize)(Code)
Returns the gap between text and icon in menu items under the specified font size.
Parameters:
  fontSize - Font size. Gap between text and icon in menu items under the specified fontsize.



getMinButtonHeight
public static int getMinButtonHeight(int fontSize)(Code)
Returns the minimum button height under the specified font size.
Parameters:
  fontSize - Font size. Minimum button height under the specified font size.



getMinButtonWidth
public static int getMinButtonWidth(int fontSize)(Code)
Returns the maximum button height under the specified font size.
Parameters:
  fontSize - Font size. Maximum button height under the specified font size.



getPasswordDotDiameter
public static int getPasswordDotDiameter(int fontSize)(Code)
Returns the password dot diameter for password fields under the specified font size.
Parameters:
  fontSize - Font size. Password dot diameter for password fields under the specifiedfont size.



getPasswordDotGap
public static int getPasswordDotGap(int fontSize)(Code)
Returns the password dot gap for password fields under the specified font size.
Parameters:
  fontSize - Font size. Password dot gap for password fields under the specified fontsize.



getPointsToPixelsRatio
public static double getPointsToPixelsRatio()(Code)



getRadioButtonBorder
public static Border getRadioButtonBorder(int fontSize)(Code)
Returns the border for radio buttons under the specified font size.
Parameters:
  fontSize - Font size. Border for radio buttons under the specified font size.



getRadioButtonMarkSize
public static int getRadioButtonMarkSize(int fontSize)(Code)
Returns the check mark size for radio buttons under the specified font size.
Parameters:
  fontSize - Font size. Check mark size for radio buttons under the specified font size.



getScrollBarWidth
public static int getScrollBarWidth(int fontSize)(Code)
Returns the width of scroll bars under the specified font size.
Parameters:
  fontSize - Font size. Width of scroll bars under the specified font size.



getSliderIconSize
public static int getSliderIconSize(int fontSize)(Code)
Returns the slider thumb icon size under the specified font size.
Parameters:
  fontSize - Font size. Slider thumb icon size under the specified font size.



getSliderTickSize
public static int getSliderTickSize(int fontSize)(Code)
Returns the slider tick size under the specified font size.
Parameters:
  fontSize - Font size. Slider tick size under the specified font size.



getSliderTrackSize
public static int getSliderTrackSize(int fontSize)(Code)
Returns the slider track size under the specified font size.
Parameters:
  fontSize - Font size. Slider track size under the specified font size.



getSpinnerArrowButtonInsets
public static Insets getSpinnerArrowButtonInsets(int fontSize)(Code)
Returns the spinner arrow button insets under the specified font size.
Parameters:
  fontSize - Font size. Spinner arrow button insets under the specified font size.



getSpinnerBorderInsets
public static Insets getSpinnerBorderInsets(int fontSize)(Code)
Returns the spinner border insets under the specified font size.
Parameters:
  fontSize - Font size. Spinner border insets under the specified font size.



getSpinnerButtonWidth
public static int getSpinnerButtonWidth(int fontSize)(Code)
Returns the spinner button width under the specified font size.
Parameters:
  fontSize - Font size. Spinner button width under the specified font size.



getSpinnerTextBorderInsets
public static Insets getSpinnerTextBorderInsets(int fontSize)(Code)
Returns the spinner text border insets under the specified font size.
Parameters:
  fontSize - Font size. Spinner text border insets under the specified font size.



getTabCloseButtonStrokeWidth
public static float getTabCloseButtonStrokeWidth(int fontSize)(Code)
Returns the stroke width of tab close buttons under the specified size.
Parameters:
  fontSize - Font size. Stroke width of tab close buttons under the specified size.



getTabCloseIconSize
public static int getTabCloseIconSize(int fontSize)(Code)
Returns the icon size of tab close buttons under the specified size.
Parameters:
  fontSize - Font size. Icon size of tab close buttons under the specified size.



getTabbedPaneContentInsets
public static Insets getTabbedPaneContentInsets(int fontSize)(Code)
Returns the tabbed pane content insets under the specified size. The SubstanceConstants.TabContentPaneBorderKind.SINGLE_FULL is assumed.
Parameters:
  fontSize - Font size. Tabbed pane content insets under the specified size.



getTableCellRendererInsets
public static Insets getTableCellRendererInsets(int fontSize)(Code)
Returns the table cell renderer insets under the specified font size.
Parameters:
  fontSize - Font size. Table cell renderer insets under the specified font size.



getTextBorderInsets
public static Insets getTextBorderInsets(int fontSize)(Code)
Returns the text border insets under the specified font size.
Parameters:
  fontSize - Font size. Text border insets under the specified font size.



getTitlePaneIconSize
public static int getTitlePaneIconSize()(Code)
Returns the icon size of title pane buttons under the specified size.
Parameters:
  fontSize - Font size. Icon size of title pane buttons under the specified size.



getToolBarDragInset
public static int getToolBarDragInset(int fontSize)(Code)
Returns the tool bar drag inset under the specified font size.
Parameters:
  fontSize - Font size. Tool bar drag inset under the specified font size.



getToolBarInsets
public static Insets getToolBarInsets(int fontSize)(Code)
Returns the tool bar insets under the specified font size.
Parameters:
  fontSize - Font size. Tool bar insets under the specified font size.



getTreeIconSize
public static int getTreeIconSize(int fontSize)(Code)
Returns the icon size of tree expand / collapse icons under the specified size.
Parameters:
  fontSize - Font size. Icon size of tree expand / collapse icons under the specifiedsize.



resetPointsToPixelsRatio
public static void resetPointsToPixelsRatio(FontPolicy fontPolicy)(Code)



setControlFontSize
public static void setControlFontSize(int size)(Code)
Sets the new value for the control font size.
Parameters:
  size - Control font size.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.