|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jvnet.lafwidget.LafWidgetSupport
public class LafWidgetSupport
LAF-specific support for widgets. Each LAF should override relevant functions
based on the internal implementation. Note that if
LafWidgetRepository.setLafSupport(LafWidgetSupport) is called with a
custom implementation, that implementation should not throw exceptions in any
function.
| Constructor Summary | |
|---|---|
LafWidgetSupport()
|
|
| Method Summary | |
|---|---|
javax.swing.Icon |
getArrowIcon(int orientation)
Returns the arrow icon (the icon used in combo box drop button, scroll bar buttons etc.). |
javax.swing.JComponent |
getComponentForHover(javax.swing.JInternalFrame.JDesktopIcon desktopIcon)
Returns the component for desktop icon hover (internal frame preview) functionality. |
javax.swing.Icon |
getLockIcon()
Returns the lock icon. |
int |
getLookupButtonSize()
Returns the size of the lookup button. |
int |
getLookupIconSize()
Returns the size of the lookup icon. |
javax.swing.Icon |
getNumberIcon(int number)
Returns the icon that matches the specified number. |
int |
getRolloverTabIndex(javax.swing.JTabbedPane tabbedPane)
Returns the index of the rollover tab in the specified tabbed pane. |
javax.swing.Icon |
getSearchIcon(int dimension,
java.awt.ComponentOrientation componentOrientation)
Returns the search icon that matches the specified parameters. |
java.awt.Insets |
getTabAreaInsets(javax.swing.JTabbedPane tabbedPane)
Returns the tab area insets for the specified tabbed pane.Is used in the TabOverviewDialogWidget widget. |
java.awt.Rectangle |
getTabRectangle(javax.swing.JTabbedPane tabbedPane,
int tabIndex)
Returns the tab rectangle for the specified tab in a tabbed pane.Is used in the TabHoverPreviewWidget widget. |
boolean |
hasLockIcon(java.awt.Component comp)
Checks whether the specified component should show a lock icon. |
void |
markButtonAsFlat(javax.swing.AbstractButton button)
Marks the specified button as flat. |
void |
paintPasswordStrengthMarker(java.awt.Graphics g,
int x,
int y,
int width,
int height,
LafConstants.PasswordStrength pStrength)
Paints password strength marker. |
void |
setTabAreaInsets(javax.swing.JTabbedPane tabbedPane,
java.awt.Insets tabAreaInsets)
Sets the tab area insets for the specified tabbed pane. |
boolean |
toInstallExtraElements(java.awt.Component comp)
Returns indication whether additional functionality should be installed on the specified component. |
boolean |
toInstallMenuSearch(javax.swing.JMenuBar menuBar)
Returns indication whether the menu search functionality should be installed on the specified menu bar. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LafWidgetSupport()
| Method Detail |
|---|
public javax.swing.JComponent getComponentForHover(javax.swing.JInternalFrame.JDesktopIcon desktopIcon)
DesktopIconHoverPreviewWidget
widget.
desktopIcon - Desktop icon.
public boolean toInstallMenuSearch(javax.swing.JMenuBar menuBar)
MenuSearchWidget widget.
menuBar - Menu bar.
true if the menu search functionality should be
installed on the specified menu bar, false
otherwise.public boolean toInstallExtraElements(java.awt.Component comp)
comp - Component.
true if additional functionality should be installed
on the specified component, false otherwise.
public javax.swing.Icon getSearchIcon(int dimension,
java.awt.ComponentOrientation componentOrientation)
MenuSearchWidget widget.
dimension - Search icon dimension.componentOrientation - The orientation for the search icon. Should be considered in
the implementation code for proper RTL support.
public javax.swing.Icon getNumberIcon(int number)
MenuSearchWidget to set icons on menu search results. See
default implementation in LafWidgetUtilities.getHexaMarker(int)
that returns binary-based icons for numbers from 0 to 15. Is used in the
MenuSearchWidget widget.
number - Number.
public void markButtonAsFlat(javax.swing.AbstractButton button)
flat. A flat button doesn't
show its background unless selected, armed, pressed or (possibly) hovered
over. Some LAFs have flat buttons on toolbars. Is used in
MenuSearchWidget and TabOverviewDialogWidget widgets.
button - Button to mark as flat.public int getRolloverTabIndex(javax.swing.JTabbedPane tabbedPane)
TabHoverPreviewWidget widget.
tabbedPane - Tabbed pane.
java.lang.UnsupportedOperationException - In the base implementation.
public void setTabAreaInsets(javax.swing.JTabbedPane tabbedPane,
java.awt.Insets tabAreaInsets)
TabOverviewDialogWidget widget.
tabbedPane - Tabbed pane.tabAreaInsets - Tab area insets.
java.lang.UnsupportedOperationException - In the base implementation.public java.awt.Insets getTabAreaInsets(javax.swing.JTabbedPane tabbedPane)
TabOverviewDialogWidget widget.
tabbedPane - Tabbed pane.
public java.awt.Rectangle getTabRectangle(javax.swing.JTabbedPane tabbedPane,
int tabIndex)
TabHoverPreviewWidget widget.
tabbedPane - Tabbed pane.tabIndex - Index of a tab.
java.lang.UnsupportedOperationException - In the base implementation.
public void paintPasswordStrengthMarker(java.awt.Graphics g,
int x,
int y,
int width,
int height,
LafConstants.PasswordStrength pStrength)
PasswordStrengthCheckerWidget widget. The default implementation
uses orange color for LafConstants.PasswordStrength#WEAK
passwords, yellow color for LafConstants.PasswordStrength#MEDIUM
passwords and green color for
LafConstants.PasswordStrength#STRONG passwords.
g - Graphics context.x - X coordinate for the marker.y - Y coordinate for the marker.width - Marker width.height - Marker height.pStrength - Password strength.public boolean hasLockIcon(java.awt.Component comp)
LafWidget#COMBO_BOX_USE_MODEL_ONLY.
LockBorderWidget widget.
comp - Component.
true if the specified component should show a lock
icon, false otherwise.public javax.swing.Icon getLockIcon()
LockBorderWidget widget.
public javax.swing.Icon getArrowIcon(int orientation)
orientation - One of SwingConstants.NORTH or
SwingConstants.SOUTH.
public int getLookupIconSize()
public int getLookupButtonSize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||