public class DefaultLookAndFeel
- Object
- LookAndFeel
- DefaultLookAndFeel
ImplementsFocusListener
Constructors
public DefaultLookAndFeel(UIManager manager) | Creates a new instance of DefaultLookAndFeel |
Methods
Inherited methods
From LookAndFeel
uninstall, drawVerticalScroll, drawHorizontalScroll, setFG, getVerticalScrollWidth, getHorizontalScrollHeight, getDefaultFormTransitionIn, setDefaultFormTransitionIn, getDefaultFormTransitionOut, setDefaultFormTransitionOut, getDefaultMenuTransitionIn, setDefaultMenuTransitionIn, getDefaultMenuTransitionOut, setDefaultMenuTransitionOut, getDefaultDialogTransitionIn, setDefaultDialogTransitionIn, getDefaultDialogTransitionOut, setDefaultDialogTransitionOut, getDefaultFormTintColor, setDefaultFormTintColor, getDisableColor, setDisableColor, isDefaultSmoothScrolling, setDefaultSmoothScrolling, getDefaultSmoothScrollingSpeed, setDefaultSmoothScrollingSpeed, isReverseSoftButtons, setReverseSoftButtons, getMenuBarClass, setMenuBarClass, getMenuRenderer, setMenuRenderer, setMenuIcons, getMenuIcons, getTickerSpeed, setTickerSpeed, isTouchMenus, setTouchMenus, isRTL, setRTL, getTactileTouchDuration, setTactileTouchDuration, isDefaultEndsWith3Points, setDefaultEndsWith3Points, isDefaultTensileDrag, setDefaultTensileDrag, isFocusScrolling, setFocusScrolling, isFadeScrollEdge, setFadeScrollEdge, isFadeScrollBar, setFadeScrollBar, getFadeScrollEdgeLength, setFadeScrollEdgeLength, getTextFieldCursorColor, setTextFieldCursorColor, isDefaultSnapToGrid, setDefaultSnapToGrid, isDefaultAlwaysTensile, setDefaultAlwaysTensile, isDefaultTensileHighlight, paintTensileHighlight, getFadeScrollBarSpeed, setFadeScrollBarSpeed, isScrollVisible, isInteractiveScroll, isBackgroundImageDetermineSize, setBackgroundImageDetermineSize
Constructor details
DefaultLookAndFeel
public DefaultLookAndFeel(UIManager manager)Method details
reverseAlignForBidi
public static int reverseAlignForBidi(Component c, int align)bind
public void bind(Component cmp)Parameters
cmpComponent- component instance that may be customized by the look and feel
isTickWhenFocused
public boolean isTickWhenFocused()Returns
setTickWhenFocused
public void setTickWhenFocused(boolean tickWhenFocused)setCheckBoxImages
public void setCheckBoxImages(Image checkedX, Image uncheckedX)Parameters
checkedXImage- the image to draw in order to represent a checked checkbox
uncheckedXImage- the image to draw in order to represent an uncheck checkbox
setCheckBoxImages
public void setCheckBoxImages(Image checkedX, Image uncheckedX, Image disabledChecked, Image disabledUnchecked)Parameters
checkedXImage- the image to draw in order to represent a checked checkbox
uncheckedXImage- the image to draw in order to represent an uncheck checkbox
disabledCheckedImage- same as checked for the disabled state
disabledUncheckedImage- same as unchecked for the disabled state
setCheckBoxFocusImages
public void setCheckBoxFocusImages(Image checkedX, Image uncheckedX, Image disabledChecked, Image disabledUnchecked)Parameters
checkedXImage- the image to draw in order to represent a checked checkbox
uncheckedXImage- the image to draw in order to represent an uncheck checkbox
disabledCheckedImage- same as checked for the disabled state
disabledUncheckedImage- same as unchecked for the disabled state
setComboBoxImage
public void setComboBoxImage(Image picker)Parameters
pickerImage- picker image
setRadioButtonImages
public void setRadioButtonImages(Image selected, Image unselected)Parameters
selectedImage- the image to draw in order to represent a selected radio button
unselectedImage- the image to draw in order to represent an unselected radio button
setRadioButtonImages
public void setRadioButtonImages(Image selected, Image unselected, Image disabledSelected, Image disabledUnselected)Parameters
selectedImage- the image to draw in order to represent a selected radio button
unselectedImage- the image to draw in order to represent an unselected radio button
disabledSelectedImage- same as selected for the disabled state
disabledUnselectedImage- same as unselected for the disabled state
setRadioButtonFocusImages
public void setRadioButtonFocusImages(Image selected, Image unselected, Image disabledSelected, Image disabledUnselected)Parameters
selectedImage- the image to draw in order to represent a selected radio button
unselectedImage- the image to draw in order to represent an unselected radio button
disabledSelectedImage- same as selected for the disabled state
disabledUnselectedImage- same as unselected for the disabled state
setPasswordChar
public void setPasswordChar(char c)getRadioButtonImages
public Image[] getRadioButtonImages()Returns
getRadioButtonFocusImages
public Image[] getRadioButtonFocusImages()Returns
getCheckBoxImages
public Image[] getCheckBoxImages()Returns
getCheckBoxFocusImages
public Image[] getCheckBoxFocusImages()Returns
drawButton
public void drawButton(Graphics g, Button b)Parameters
gGraphics- graphics context
bButton- component to draw
drawCheckBox
public void drawCheckBox(Graphics g, Button cb)Parameters
gGraphics- graphics context
cbButton- component to draw
drawLabel
public void drawLabel(Graphics g, Label l)Parameters
gGraphics- graphics context
lLabel- component to draw
calculateLabelSpan
public TextSelection.Span calculateLabelSpan(TextSelection sel, Label l)Parameters
selTextSelection- TextSelection instance
lLabel- Label
Returns
See also
drawRadioButton
public void drawRadioButton(Graphics g, Button rb)Parameters
gGraphics- graphics context
rbButton- component to draw
drawComboBox
public void drawComboBox(Graphics g, List cb)Parameters
gGraphics- graphics context
cbList- component to draw
drawList
public void drawList(Graphics g, List l)Parameters
gGraphics- graphics context
lList- component to draw
calculateTextAreaSpan
public TextSelection.Spans calculateTextAreaSpan(TextSelection sel, TextArea ta)Parameters
selTextSelection- The current TextSelection instance.
taTextArea- The TextArea to calculate spans for.
Returns
drawTextArea
public void drawTextArea(Graphics g, TextArea ta)Parameters
gGraphics- graphics context
taTextArea- component to draw
getButtonPreferredSize
public Dimension getButtonPreferredSize(Button b)Parameters
bButton- component whose size should be calculated
Returns
getCheckBoxPreferredSize
public Dimension getCheckBoxPreferredSize(Button cb)Parameters
cbButton- component whose size should be calculated
Returns
getLabelPreferredSize
public Dimension getLabelPreferredSize(Label l)Parameters
lLabel- component whose size should be calculated
Returns
getListPreferredSize
public Dimension getListPreferredSize(List l)Parameters
lList- component whose size should be calculated
Returns
getRadioButtonPreferredSize
public Dimension getRadioButtonPreferredSize(Button rb)Parameters
rbButton- component whose size should be calculated
Returns
getTextAreaSize
public Dimension getTextAreaSize(TextArea ta, boolean pref)Parameters
taTextArea- component whose size should be calculated
prefboolean- indicates whether preferred or scroll size should be returned
Returns
drawLabelText
protected int drawLabelText(Graphics g, Label l, String text, int x, int y, int textSpaceW)Parameters
gGraphics- graphics context
lLabel- label component
textString- the text for the label
xint- position for the label
yint- position for the label
textSpaceWint- the width available for the component
Returns
getComboBoxPreferredSize
public Dimension getComboBoxPreferredSize(List cb)Parameters
cbList- component whose size should be calculated
Returns
getTextFieldString
protected String getTextFieldString(TextArea ta)calculateTextFieldSpan
public TextSelection.Spans calculateTextFieldSpan(TextSelection sel, TextArea ta)Parameters
selTextSelection- The current TextSelection instance.
taTextArea- The textfield to calculate spans for.
Returns
drawTextField
public void drawTextField(Graphics g, TextArea ta)Parameters
gGraphics- graphics context
taTextArea- component to draw
getTextFieldPreferredSize
public Dimension getTextFieldPreferredSize(TextArea ta)Parameters
taTextArea- component whose size should be calculated
Returns
drawTextFieldCursor
public void drawTextFieldCursor(Graphics g, TextArea ta)Parameters
gGraphics- graphics context
taTextArea- component to draw
drawPullToRefresh
public void drawPullToRefresh(Graphics g, Component cmp, boolean taskExecuted)Parameters
gGraphics- graphics context
cmpComponent- the Component which we draw the pull to refresh beneath it
taskExecutedboolean- an indication if the refresh task is currently running
drawModernPullToRefresh
public void drawModernPullToRefresh(Graphics g, Component cmp, boolean taskExecuted)getPullToRefreshHeight
public int getPullToRefreshHeight()focusGained
public void focusGained(Component cmp)Parameters
cmpComponent- the component that gains focus
focusLost
public void focusLost(Component cmp)Parameters
cmpComponent- the component that lost focus
refreshTheme
public void refreshTheme(boolean b)Parameters
bboolean- indicates that the theme is set and not added
calculateSpanForLabelText
public TextSelection.Span calculateSpanForLabelText(TextSelection sel, Label l, String text, int x, int y, int textSpaceW)