Skip to main content


com.sun.lwuit.plaf
Class LookAndFeel

java.lang.Object
  
extended by com.sun.lwuit.plaf.LookAndFeel
Direct Known Subclasses:
DefaultLookAndFeel

public abstract class LookAndFeel
extends java.lang.Object

Allows a UI developer to completely customize the look of the application by overriding drawing/sizing methods appropriately.


Constructor Summary
LookAndFeel()
           
 
Method Summary
 void bind(Component cmp)
          Every component binds itself to the look and feel thus allowing the look and feel to customize the component.
abstract  void drawButton(Graphics g, Button b)
          Invoked for drawing a button widget
abstract  void drawCheckBox(Graphics g, Button cb)
          Invoked for drawing a checkbox widget
abstract  void drawComboBox(Graphics g, List cb)
          Invoked for drawing a combo box widget
 void drawHorizontalScroll(Graphics g, Component c, float offsetRatio, float blockSizeRatio)
          Draws a horizontal scroll bar in the given component
abstract  void drawLabel(Graphics g, Label l)
          Invoked for drawing a label widget
abstract  void drawList(Graphics g, List l)
          Invoked for drawing a list widget
abstract  void drawRadioButton(Graphics g, Button rb)
          Invoked for drawing the radio button widget
abstract  void drawTabbedPane(Graphics g, TabbedPane tp)
          Deprecated.  
abstract  void drawTabbedPaneContentPane(TabbedPane tp, Graphics g, Rectangle rect, Dimension cellsPreferredSize, int numOfTabs, int selectedTabIndex, Dimension tabsSize, int cellOffsetX, int cellOffsetY)
          Deprecated.  
abstract  void drawTextArea(Graphics g, TextArea ta)
          Draw the given text area
abstract  void drawTextField(Graphics g, TextArea ta)
          Draws the text field without its cursor which is drawn in a separate method input mode indication can also be drawn using this method.
abstract  void drawTextFieldCursor(Graphics g, TextArea ta)
          Draws the cursor of the text field, blinking is handled simply by avoiding a call to this method.
 void drawVerticalScroll(Graphics g, Component c, float offsetRatio, float blockSizeRatio)
          Draws a vertical scroll bar in the given component
abstract  Dimension getButtonPreferredSize(Button b)
          Calculate the preferred size of the component
abstract  Dimension getCheckBoxPreferredSize(Button cb)
          Calculate the preferred size of the component
abstract  Dimension getComboBoxPreferredSize(List box)
          Calculate the preferred size of the component
 Transition getDefaultDialogTransitionIn()
          Allows us to define a default animation that will draw the transition for entering a dialog
 Transition getDefaultDialogTransitionOut()
          Allows us to define a default animation that will draw the transition for exiting a dialog
 int getDefaultFormTintColor()
          Tint color is set when a form is partially covered be it by a menu or by a dialog.
 Transition getDefaultFormTransitionIn()
          Allows us to define a default animation that will draw the transition for entering a form
 Transition getDefaultFormTransitionOut()
          Allows us to define a default animation that will draw the transition for exiting a form
 Transition getDefaultMenuTransitionIn()
          Allows us to define a default animation that will draw the transition for entering a Menu
 Transition getDefaultMenuTransitionOut()
          Allows us to define a default animation that will draw the transition for exiting a Menu
 int getDefaultSmoothScrollingSpeed()
          Indicates the default speed for smooth scrolling
 int getDisableColor()
          This color is used to paint disable mode text color.
 int getFadeScrollEdgeLength()
          Indicates the width/height of the fading edge to indicate scrolling
 int getHorizontalScrollHeight()
          Returns the default height of a horizontal scroll bar
abstract  Dimension getLabelPreferredSize(Label l)
          Calculate the preferred size of the component
abstract  Dimension getListPreferredSize(List l)
          Calculate the preferred size of the component
 java.lang.Class getMenuBarClass()
          This method returns the MenuBar class.
 Image[] getMenuIcons()
          Simple getter for the menu icons
 ListCellRenderer getMenuRenderer()
          Returns the Menu default renderer
abstract  Dimension getRadioButtonPreferredSize(Button rb)
          Calculate the preferred size of the component
abstract  Component getTabbedPaneCell(TabbedPane tp, java.lang.String text, Image icon, boolean isSelected, boolean cellHasFocus, Style cellStyle, Style cellSelectedStyle, Style tabbedPaneStyle, int cellOffsetX, int cellOffsetY, Dimension cellsPreferredSize, Dimension contentPaneSize)
          Deprecated.  
 int getTactileTouchDuration()
          Allows defining a tactile touch device that vibrates when the user presses a component that should respond with tactile feedback on a touch device (e.g.
abstract  Dimension getTextAreaSize(TextArea ta, boolean pref)
          Calculate the preferred size of the component
 int getTextFieldCursorColor()
          The color of the text field cursor
abstract  Dimension getTextFieldPreferredSize(TextArea ta)
          Calculate the preferred size of the component
 long getTickerSpeed()
          Gets the ticker speed
 int getVerticalScrollWidth()
          Returns the default width of a vertical scroll bar
 boolean isDefaultAlwaysTensile()
          Enable the tensile drag to work even when a component doesn't have a scroll showable (scrollable flag still needs to be set to true)
 boolean isDefaultEndsWith3Points()
          Indicates whether labels should end with 3 points by default
 boolean isDefaultSmoothScrolling()
          Indicates whether lists and containers should have smooth scrolling by default
 boolean isDefaultSnapToGrid()
          Indicates whether scrolling this component should jump to a specific location in a grid
 boolean isDefaultTensileDrag()
          Indicates whether tensile drag should be active by default
 boolean isDefaultTensileHighlight()
          Indicates whether tensile highlight should be active by default
 boolean isFadeScrollBar()
          Indicates whether the scrollbar should fade when unused
 boolean isFadeScrollEdge()
          Indicates whether the edge of a scrollable area should fade out
 boolean isFocusScrolling()
          Indicates whether lists and containers should scroll only via focus and thus "jump" when moving to a larger component as was the case in older versions of LWUIT.
 boolean isReverseSoftButtons()
          Indicates whether softbuttons should be reversed from their default orientation
 boolean isRTL()
          Use this to check if the LookAndFeel is in RTL mode
 boolean isTouchMenus()
          Deprecated. use Display.getCommandBehavior() == Display.COMMAND_BEHAVIOR_TOUCH_MENU
 void paintTensileHighlight(Graphics g, boolean top, int opacity)
          Paints the tensile hightlight image
 void refreshTheme()
          This method is a callback to the LookAndFeel when a theme is being changed in the UIManager
 void setDefaultAlwaysTensile(boolean defaultAlwaysTensile)
          Enable the tensile drag to work even when a component doesn't have a scroll showable (scrollable flag still needs to be set to true)
 void setDefaultDialogTransitionIn(Transition defaultDialogTransitionIn)
          Allows us to define a default animation that will draw the transition for entering a dialog
 void setDefaultDialogTransitionOut(Transition defaultDialogTransitionOut)
          Allows us to define a default animation that will draw the transition for exiting a dialog
 void setDefaultEndsWith3Points(boolean defaultEndsWith3Points)
          Indicates whether labels should end with 3 points by default
 void setDefaultFormTintColor(int defaultFormTintColor)
          Tint color is set when a form is partially covered be it by a menu or by a dialog.
 void setDefaultFormTransitionIn(Transition defaultFormTransitionIn)
          Allows us to define a default animation that will draw the transition for entering a form
 void setDefaultFormTransitionOut(Transition defaultFormTransitionOut)
          Allows us to define a default animation that will draw the transition for exiting a form
 void setDefaultMenuTransitionIn(Transition defaultMenuTransitionIn)
          Allows us to define a default animation that will draw the transition for entering a Menu
 void setDefaultMenuTransitionOut(Transition defaultMenuTransitionOut)
          Allows us to define a default animation that will draw the transition for exiting a Menu
 void setDefaultSmoothScrolling(boolean defaultSmoothScrolling)
          Indicates whether lists and containers should have smooth scrolling by default
 void setDefaultSmoothScrollingSpeed(int defaultSmoothScrollingSpeed)
          Indicates the default speed for smooth scrolling
 void setDefaultSnapToGrid(boolean defaultSnapToGrid)
          Indicates whether scrolling this component should jump to a specific location in a grid
 void setDefaultTensileDrag(boolean defaultTensileDrag)
          Indicates whether tensile drag should be active by default
 void setDisableColor(int disableColor)
          Simple setter to disable color
 void setFadeScrollBar(boolean fadeScrollBar)
          Indicates whether the scrollbar should fade when unused
 void setFadeScrollEdge(boolean fadeScrollEdge)
          Indicates whether the edge of a scrollable area should fade out
 void setFadeScrollEdgeLength(int fadeScrollEdgeLength)
          Indicates the width/height of the fading edge to indicate scrolling
 void setFG(Graphics g, Component c)
          Sets the foreground color and font for a generic component, reuse-able by most component drawing code
 void setFocusScrolling(boolean focusScrolling)
          Indicates whether lists and containers should scroll only via focus and thus "jump" when moving to a larger component as was the case in older versions of LWUIT.
 void setMenuBarClass(java.lang.Class menuBar)
          Simple setter for the MenuBar Class
 void setMenuIcons(Image select, Image cancel, Image menu)
          Sets globally the Menu icons
 void setMenuRenderer(ListCellRenderer menuRenderer)
          Sets the Menu default renderer
 void setReverseSoftButtons(boolean reverseSoftButtons)
          Indicates whether softbuttons should be reversed from their default orientation
 void setRTL(boolean rtl)
          Sets this LookAndFeel to operate in right-to-left mode.
 void setTactileTouchDuration(int tactileTouchDuration)
          Allows defining a tactile touch device that vibrates when the user presses a component that should respond with tactile feedback on a touch device (e.g.
 void setTextFieldCursorColor(int textFieldCursorColor)
          The color of the text field cursor
 void setTickerSpeed(long tickerSpeed)
          Sets the ticker speed
 void setTouchMenus(boolean touchMenus)
          Deprecated. use Display.setCommandBehavior(Display.COMMAND_BEHAVIOR_TOUCH_MENU)
 void uninstall()
          Invoked when a look and feel is removed, allows a look and feel to release resources related to binding components.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LookAndFeel

public LookAndFeel()
Method Detail

bind

public void bind(Component cmp)
Every component binds itself to the look and feel thus allowing the look and feel to customize the component. Binding occurs at the end of the constructor when the component is in a valid state and ready to be used. Notice that a component might be bound twice or more and it is the responsibility of the LookAndFeel to protect against that.

Parameters:
cmp - component instance that may be customized by the look and feel

uninstall

public void uninstall()
Invoked when a look and feel is removed, allows a look and feel to release resources related to binding components.

See Also:
bind(Component)

drawButton

public abstract void drawButton(Graphics g,
                                Button b)
Invoked for drawing a button widget

Parameters:
g - graphics context
b - component to draw

drawCheckBox

public abstract void drawCheckBox(Graphics g,
                                  Button cb)
Invoked for drawing a checkbox widget

Parameters:
g - graphics context
cb - component to draw

drawComboBox

public abstract void drawComboBox(Graphics g,
                                  List cb)
Invoked for drawing a combo box widget

Parameters:
g - graphics context
cb - component to draw

drawLabel

public abstract void drawLabel(Graphics g,
                               Label l)
Invoked for drawing a label widget

Parameters:
g - graphics context
l - component to draw

drawList

public abstract void drawList(Graphics g,
                              List l)
Invoked for drawing a list widget

Parameters:
g - graphics context
l - component to draw

drawRadioButton

public abstract void drawRadioButton(Graphics g,
                                     Button rb)
Invoked for drawing the radio button widget

Parameters:
g - graphics context
rb - component to draw

drawTextArea

public abstract void drawTextArea(Graphics g,
                                  TextArea ta)
Draw the given text area

Parameters:
g - graphics context
ta - component to draw

drawTextField

public abstract void drawTextField(Graphics g,
                                   TextArea ta)
Draws the text field without its cursor which is drawn in a separate method input mode indication can also be drawn using this method.

Parameters:
g - graphics context
ta - component to draw

drawTextFieldCursor

public abstract void drawTextFieldCursor(Graphics g,
                                         TextArea ta)
Draws the cursor of the text field, blinking is handled simply by avoiding a call to this method.

Parameters:
g - graphics context
ta - component to draw

drawTabbedPane

public abstract void drawTabbedPane(Graphics g,
                                    TabbedPane tp)
Deprecated. 

Invoked for drawing the Tab Pane widget

Parameters:
g - graphics context
tp - component to draw

getButtonPreferredSize

public abstract Dimension getButtonPreferredSize(Button b)
Calculate the preferred size of the component

Parameters:
b - component whose size should be calculated
Returns:
the preferred size for the button

getCheckBoxPreferredSize

public abstract Dimension getCheckBoxPreferredSize(Button cb)
Calculate the preferred size of the component

Parameters:
cb - component whose size should be calculated
Returns:
the preferred size for the component

getLabelPreferredSize

public abstract Dimension getLabelPreferredSize(Label l)
Calculate the preferred size of the component

Parameters:
l - component whose size should be calculated
Returns:
the preferred size for the component

getListPreferredSize

public abstract Dimension getListPreferredSize(List l)
Calculate the preferred size of the component

Parameters:
l - component whose size should be calculated
Returns:
the preferred size for the component

getRadioButtonPreferredSize

public abstract Dimension getRadioButtonPreferredSize(Button rb)
Calculate the preferred size of the component

Parameters:
rb - component whose size should be calculated
Returns:
the preferred size for the component

getTextAreaSize

public abstract Dimension getTextAreaSize(TextArea ta,
                                          boolean pref)
Calculate the preferred size of the component

Parameters:
ta - component whose size should be calculated
pref - indicates whether preferred or scroll size should be returned
Returns:
the preferred size for the component

getTextFieldPreferredSize

public abstract Dimension getTextFieldPreferredSize(TextArea ta)
Calculate the preferred size of the component

Parameters:
ta - component whose size should be calculated
Returns:
the preferred size for the component

getComboBoxPreferredSize

public abstract Dimension getComboBoxPreferredSize(List box)
Calculate the preferred size of the component

Parameters:
box - component whose size should be calculated
Returns:
the preferred size for the component

drawVerticalScroll

public void drawVerticalScroll(Graphics g,
                               Component c,
                               float offsetRatio,
                               float blockSizeRatio)
Draws a vertical scroll bar in the given component

Parameters:
g - graphics context
c - component to draw on
offsetRatio - ratio of the scroll bar from 0 to 1
blockSizeRatio - block size for the scroll from 0 to 1

drawHorizontalScroll

public void drawHorizontalScroll(Graphics g,
                                 Component c,
                                 float offsetRatio,
                                 float blockSizeRatio)
Draws a horizontal scroll bar in the given component

Parameters:
g - graphics context
c - component to draw on
offsetRatio - ratio of the scroll bar from 0 to 1
blockSizeRatio - block size for the scroll from 0 to 1

setFG

public void setFG(Graphics g,
                  Component c)
Sets the foreground color and font for a generic component, reuse-able by most component drawing code

Parameters:
g - graphics context
c - component from which fg styles should be set

getVerticalScrollWidth

public int getVerticalScrollWidth()
Returns the default width of a vertical scroll bar

Returns:
default width of a vertical scroll bar

getHorizontalScrollHeight

public int getHorizontalScrollHeight()
Returns the default height of a horizontal scroll bar

Returns:
default height of a horizontal scroll bar

getTabbedPaneCell

public abstract Component getTabbedPaneCell(TabbedPane tp,
                                            java.lang.String text,
                                            Image icon,
                                            boolean isSelected,
                                            boolean cellHasFocus,
                                            Style cellStyle,
                                            Style cellSelectedStyle,
                                            Style tabbedPaneStyle,
                                            int cellOffsetX,
                                            int cellOffsetY,
                                            Dimension cellsPreferredSize,
                                            Dimension contentPaneSize)
Deprecated. 

Draws and return the TabbedPane cell component (renderer) according to each tab orientation, the borders are getting draws

Parameters:
tp - the TabbedPane
text - the cell text
icon - the cell icon image
isSelected - is the cell is the selected one
cellHasFocus - is the cell has focus
cellStyle - the cell Style object
cellSelectedStyle - the selected style for the cell object
tabbedPaneStyle - the TabbedPane Style object
cellOffsetX - the offset when the cell is on TOP or BOTTOM orientation
cellOffsetY - the offset when the cell is on LEFT or RIGHT orientation
cellsPreferredSize - the total cells PreferredSize
contentPaneSize - the contentPaneSize
Returns:
A TabbedPane cell component

drawTabbedPaneContentPane

public abstract void drawTabbedPaneContentPane(TabbedPane tp,
                                               Graphics g,
                                               Rectangle rect,
                                               Dimension cellsPreferredSize,
                                               int numOfTabs,
                                               int selectedTabIndex,
                                               Dimension tabsSize,
                                               int cellOffsetX,
                                               int cellOffsetY)
Deprecated. 

Draws and return the TabbedPane contentpane painter

Parameters:
tp - the TabbedPane
g - the content pane graphics
rect - the content pane painting rectangle area
cellsPreferredSize - the total cells PreferredSize
numOfTabs - number of tabs
selectedTabIndex - the selected tab index
tabsSize - the tabs size
cellOffsetX - the offset when the cell is on TOP or BOTTOM orientation
cellOffsetY - the offset when the cell is on LEFT or RIGHT orientation

getDefaultFormTransitionIn

public Transition getDefaultFormTransitionIn()
Allows us to define a default animation that will draw the transition for entering a form

Returns:
default transition

setDefaultFormTransitionIn

public void setDefaultFormTransitionIn(Transition defaultFormTransitionIn)
Allows us to define a default animation that will draw the transition for entering a form

Parameters:
defaultFormTransitionIn - the default transition

getDefaultFormTransitionOut

public Transition getDefaultFormTransitionOut()
Allows us to define a default animation that will draw the transition for exiting a form

Returns:
default transition

setDefaultFormTransitionOut

public void setDefaultFormTransitionOut(Transition defaultFormTransitionOut)
Allows us to define a default animation that will draw the transition for exiting a form

Parameters:
defaultFormTransitionOut - the default transition

getDefaultMenuTransitionIn

public Transition getDefaultMenuTransitionIn()
Allows us to define a default animation that will draw the transition for entering a Menu

Returns:
default transition

setDefaultMenuTransitionIn

public void setDefaultMenuTransitionIn(Transition defaultMenuTransitionIn)
Allows us to define a default animation that will draw the transition for entering a Menu

Parameters:
defaultMenuTransitionIn - the default transition

getDefaultMenuTransitionOut

public Transition getDefaultMenuTransitionOut()
Allows us to define a default animation that will draw the transition for exiting a Menu

Returns:
default transition

setDefaultMenuTransitionOut

public void setDefaultMenuTransitionOut(Transition defaultMenuTransitionOut)
Allows us to define a default animation that will draw the transition for exiting a Menu

Parameters:
defaultMenuTransitionOut - the default transition

getDefaultDialogTransitionIn

public Transition getDefaultDialogTransitionIn()
Allows us to define a default animation that will draw the transition for entering a dialog

Returns:
default transition

setDefaultDialogTransitionIn

public void setDefaultDialogTransitionIn(Transition defaultDialogTransitionIn)
Allows us to define a default animation that will draw the transition for entering a dialog

Parameters:
defaultDialogTransitionIn - the default transition

getDefaultDialogTransitionOut

public Transition getDefaultDialogTransitionOut()
Allows us to define a default animation that will draw the transition for exiting a dialog

Returns:
default transition

setDefaultDialogTransitionOut

public void setDefaultDialogTransitionOut(Transition defaultDialogTransitionOut)
Allows us to define a default animation that will draw the transition for exiting a dialog

Parameters:
defaultDialogTransitionOut - the default transition

getDefaultFormTintColor

public int getDefaultFormTintColor()
Tint color is set when a form is partially covered be it by a menu or by a dialog. A look and feel can override this default value.

Returns:
default tint color

setDefaultFormTintColor

public void setDefaultFormTintColor(int defaultFormTintColor)
Tint color is set when a form is partially covered be it by a menu or by a dialog. A look and feel can override this default value.

Parameters:
defaultFormTintColor - the default tint color

getDisableColor

public int getDisableColor()
This color is used to paint disable mode text color.

Returns:
the color value

setDisableColor

public void setDisableColor(int disableColor)
Simple setter to disable color

Parameters:
disableColor - the disable color value

isDefaultSmoothScrolling

public boolean isDefaultSmoothScrolling()
Indicates whether lists and containers should have smooth scrolling by default

Returns:
true if smooth scrolling should be on by default

setDefaultSmoothScrolling

public void setDefaultSmoothScrolling(boolean defaultSmoothScrolling)
Indicates whether lists and containers should have smooth scrolling by default

Parameters:
defaultSmoothScrolling - true if smooth scrolling should be on by default

getDefaultSmoothScrollingSpeed

public int getDefaultSmoothScrollingSpeed()
Indicates the default speed for smooth scrolling

Returns:
speed for smooth scrollin

setDefaultSmoothScrollingSpeed

public void setDefaultSmoothScrollingSpeed(int defaultSmoothScrollingSpeed)
Indicates the default speed for smooth scrolling

Parameters:
defaultSmoothScrollingSpeed - speed for smooth scrollin

isReverseSoftButtons

public boolean isReverseSoftButtons()
Indicates whether softbuttons should be reversed from their default orientation

Returns:
true if softbuttons should be reversed

setReverseSoftButtons

public void setReverseSoftButtons(boolean reverseSoftButtons)
Indicates whether softbuttons should be reversed from their default orientation

Parameters:
reverseSoftButtons - true if softbuttons should be reversed

getMenuBarClass

public java.lang.Class getMenuBarClass()
This method returns the MenuBar class.

Returns:
the MenuBar class.

setMenuBarClass

public void setMenuBarClass(java.lang.Class menuBar)
Simple setter for the MenuBar Class

Parameters:
menuBar -

getMenuRenderer

public ListCellRenderer getMenuRenderer()
Returns the Menu default renderer

Returns:
default renderer for the menu

setMenuRenderer

public void setMenuRenderer(ListCellRenderer menuRenderer)
Sets the Menu default renderer

Parameters:
menuRenderer - default renderer for the menu

setMenuIcons

public void setMenuIcons(Image select,
                         Image cancel,
                         Image menu)
Sets globally the Menu icons

Parameters:
select - select icon
cancel - cancel icon
menu - menu icon

getMenuIcons

public Image[] getMenuIcons()
Simple getter for the menu icons

Returns:
an Image array at size of 3, where the first is the select image the second is the cancel image and the last is the menu image.

getTickerSpeed

public long getTickerSpeed()
Gets the ticker speed

Returns:
ticker speed in milliseconds

setTickerSpeed

public void setTickerSpeed(long tickerSpeed)
Sets the ticker speed

Parameters:
tickerSpeed - the speed in milliseconds

refreshTheme

public void refreshTheme()
This method is a callback to the LookAndFeel when a theme is being changed in the UIManager


isTouchMenus

public boolean isTouchMenus()
Deprecated. use Display.getCommandBehavior() == Display.COMMAND_BEHAVIOR_TOUCH_MENU

Indicates whether the menu UI should target a touch based device or a standard cell phone

Returns:
true for touch menus

setTouchMenus

public void setTouchMenus(boolean touchMenus)
Deprecated. use Display.setCommandBehavior(Display.COMMAND_BEHAVIOR_TOUCH_MENU)

Indicates whether the menu UI should target a touch based device or a standard cell phone

Parameters:
touchMenus - true to enable touch menus false to disable

setRTL

public void setRTL(boolean rtl)
Sets this LookAndFeel to operate in right-to-left mode.

Parameters:
rtl - - true if right-to-left, false if left-to-right

isRTL

public boolean isRTL()
Use this to check if the LookAndFeel is in RTL mode

Returns:
true if the LookAndFeel is in right-to-left mode, false otherwise

getTactileTouchDuration

public int getTactileTouchDuration()
Allows defining a tactile touch device that vibrates when the user presses a component that should respond with tactile feedback on a touch device (e.g. vibrate). Setting this to 0 disables tactile feedback completely

Returns:
the tactileTouchDuration

setTactileTouchDuration

public void setTactileTouchDuration(int tactileTouchDuration)
Allows defining a tactile touch device that vibrates when the user presses a component that should respond with tactile feedback on a touch device (e.g. vibrate). Setting this to 0 disables tactile feedback completely

Parameters:
tactileTouchDuration - the duration of vibration

isDefaultEndsWith3Points

public boolean isDefaultEndsWith3Points()
Indicates whether labels should end with 3 points by default

Returns:
whether labels should end with 3 points by default

setDefaultEndsWith3Points

public void setDefaultEndsWith3Points(boolean defaultEndsWith3Points)
Indicates whether labels should end with 3 points by default

Parameters:
defaultEndsWith3Points - True to indicates that labels should end with 3 points by default

isDefaultTensileDrag

public boolean isDefaultTensileDrag()
Indicates whether tensile drag should be active by default

Returns:
whether tensile drag should be active by default

setDefaultTensileDrag

public void setDefaultTensileDrag(boolean defaultTensileDrag)
Indicates whether tensile drag should be active by default

Parameters:
defaultTensileDrag - true if tensile drag should be active by default

isFocusScrolling

public boolean isFocusScrolling()
Indicates whether lists and containers should scroll only via focus and thus "jump" when moving to a larger component as was the case in older versions of LWUIT.

Returns:
true if focus scrolling is enabled

setFocusScrolling

public void setFocusScrolling(boolean focusScrolling)
Indicates whether lists and containers should scroll only via focus and thus "jump" when moving to a larger component as was the case in older versions of LWUIT.

Parameters:
focusScrolling - true to enable focus scrolling

isFadeScrollEdge

public boolean isFadeScrollEdge()
Indicates whether the edge of a scrollable area should fade out

Returns:
the fadeScrollEdge

setFadeScrollEdge

public void setFadeScrollEdge(boolean fadeScrollEdge)
Indicates whether the edge of a scrollable area should fade out

Parameters:
fadeScrollEdge - the fadeScrollEdge to set

isFadeScrollBar

public boolean isFadeScrollBar()
Indicates whether the scrollbar should fade when unused

Returns:
the fadeScrollBar

setFadeScrollBar

public void setFadeScrollBar(boolean fadeScrollBar)
Indicates whether the scrollbar should fade when unused

Parameters:
fadeScrollBar - the fadeScrollBar to set

getFadeScrollEdgeLength

public int getFadeScrollEdgeLength()
Indicates the width/height of the fading edge to indicate scrolling

Returns:
the fadeScrollEdgeLength

setFadeScrollEdgeLength

public void setFadeScrollEdgeLength(int fadeScrollEdgeLength)
Indicates the width/height of the fading edge to indicate scrolling

Parameters:
fadeScrollEdgeLength - the fadeScrollEdgeLength to set

getTextFieldCursorColor

public int getTextFieldCursorColor()
The color of the text field cursor

Returns:
the textFieldCursorColor

setTextFieldCursorColor

public void setTextFieldCursorColor(int textFieldCursorColor)
The color of the text field cursor

Parameters:
textFieldCursorColor - the textFieldCursorColor to set

isDefaultSnapToGrid

public boolean isDefaultSnapToGrid()
Indicates whether scrolling this component should jump to a specific location in a grid

Returns:
the defaultSnapToGrid

setDefaultSnapToGrid

public void setDefaultSnapToGrid(boolean defaultSnapToGrid)
Indicates whether scrolling this component should jump to a specific location in a grid

Parameters:
defaultSnapToGrid - the defaultSnapToGrid to set

isDefaultAlwaysTensile

public boolean isDefaultAlwaysTensile()
Enable the tensile drag to work even when a component doesn't have a scroll showable (scrollable flag still needs to be set to true)

Returns:
the defaultAlwaysTensile

setDefaultAlwaysTensile

public void setDefaultAlwaysTensile(boolean defaultAlwaysTensile)
Enable the tensile drag to work even when a component doesn't have a scroll showable (scrollable flag still needs to be set to true)

Parameters:
defaultAlwaysTensile - the defaultAlwaysTensile to set

isDefaultTensileHighlight

public boolean isDefaultTensileHighlight()
Indicates whether tensile highlight should be active by default

Returns:
the defaultTensileHighlight

paintTensileHighlight

public void paintTensileHighlight(Graphics g,
                                  boolean top,
                                  int opacity)
Paints the tensile hightlight image

Parameters:
g - graphics destination for the tensile highlight image
top - destination of the tensile highlight image
opacity - the opacity of the image


Copyright 2011 Oracle Corporation. All rights reserved. Use is subject to license terms.
 
 
Close
loading
Please Confirm
Close