|
Java DTV API 1.3 18-Nov-2009 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.dtv.lwuit.plaf.LookAndFeel
com.sun.dtv.lwuit.plaf.DefaultLookAndFeel
public class DefaultLookAndFeel
Used to render the default look of LWUIT.
| Constructor Summary | |
|---|---|
DefaultLookAndFeel()
Creates a new instance of DefaultLookAndFeel. |
|
| 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. |
void |
drawButton(Graphics g,
Button b)
Invoked for drawing a button widget. |
void |
drawCheckBox(Graphics g,
CheckBox cb)
Invoked for drawing a checkbox widget. |
void |
drawComboBox(Graphics g,
ComboBox cb)
Invoked for drawing a combo box widget. |
void |
drawLabel(Graphics g,
Label l)
Invoked for drawing a label widget. |
void |
drawList(Graphics g,
List l)
Invoked for drawing a list widget. |
void |
drawMonthView(Graphics g,
Calendar cal,
Component mv)
Invoked for drawing a month view widget. |
void |
drawRadioButton(Graphics g,
RadioButton rb)
Invoked for drawing the radio button widget. |
void |
drawTabbedPane(Graphics g,
TabbedPane tp)
Invoked for drawing the Tab Pane widget. |
void |
drawTabbedPaneContentPane(TabbedPane tp,
Graphics g,
Rectangle rect,
Dimension cellsPreferredSize,
int numOfTabs,
int selectedTabIndex,
Dimension tabsSize,
int cellOffsetX,
int cellOffsetY)
Draws and return the TabbedPane content pane painter. |
void |
drawTextArea(Graphics g,
TextArea ta)
Invoked for drawing the text area widget. |
void |
drawTextField(Graphics g,
TextField ta)
Draws the text field without its cursor which is drawn in a separate method. |
void |
drawTextFieldCursor(Graphics g,
TextField ta)
Draws the cursor of the text field, blinking is handled simply by avoiding a call to this method. |
long |
findDayAt(int x,
int y,
Calendar cal,
Component mv)
Returns the day of the month in the month view at the given relative component X/Y offsets. |
void |
focusGained(Component cmp)
Invoked when component gains focus. |
void |
focusLost(Component cmp)
Invoked when component loses focus. |
Dimension |
getButtonPreferredSize(Button b)
Returns the preferred size for the button. |
Dimension |
getCheckBoxPreferredSize(CheckBox cb)
Returns the preferred size for the checkbox. |
Dimension |
getComboBoxPreferredSize(ComboBox cb)
Returns the preferred size for the combo box. |
Dimension |
getLabelPreferredSize(Label l)
Returns the preferred size for the label. |
Dimension |
getListPreferredSize(List l)
Returns the preferred size for the list. |
Dimension |
getMonthViewPreferredSize(Component mv)
Returns the preferred size for the month view component. |
Dimension |
getRadioButtonPreferredSize(RadioButton rb)
Returns the preferred size for the radio button. |
Component |
getTabbedPaneCell(TabbedPane tp,
String text,
Image icon,
boolean isSelected,
boolean cellHasFocus,
Style cellStyle,
Style tabbedPaneStyle,
int cellOffsetX,
int cellOffsetY,
Dimension cellsPreferredSize,
Dimension contentPaneSize)
Draws and return the TabbedPane cell component (renderer) according to each tab orientation, the borders are getting draws. |
Dimension |
getTextAreaPreferredSize(TextArea ta)
Returns the preferred size for the text area. |
Dimension |
getTextFieldPreferredSize(TextField ta)
Returns the preferred size for the text field. |
long |
getTickerSpeed()
Gets the ticker speed. |
void |
setCheckBoxImages(Image checked,
Image unchecked)
Sets images for checkbox checked/unchecked modes. |
void |
setComboBoxImage(Image picker)
Sets image for the combo box drop down drawing. |
void |
setRadioButtonImages(Image selected,
Image unselected)
Sets images for radio button selected/unselected modes. |
void |
setTickerSpeed(long tickerSpeed)
Sets the ticker speed. |
void |
setTickWhenFocused(boolean tickWhenFocused)
This method allows to set all Labels, Buttons, CheckBoxes, RadioButtons to start ticking when the text is too long. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultLookAndFeel()
| Method Detail |
|---|
public void bind(Component cmp)
bind in class LookAndFeelcmp - component instance that may be customized by the look and feelpublic long getTickerSpeed()
setTickerSpeed(long)public void setTickerSpeed(long tickerSpeed)
tickerSpeed - the speed in millisecondsgetTickerSpeed()public void setTickWhenFocused(boolean tickWhenFocused)
tickWhenFocused - boolean indicating whether those components
should start ticking if necessary
public void setCheckBoxImages(Image checked,
Image unchecked)
checked - the image to draw in order to represent a checked checkboxunchecked - the image to draw in order to represent an uncheck checkboxpublic void setComboBoxImage(Image picker)
picker - picker image
public void setRadioButtonImages(Image selected,
Image unselected)
selected - the image to draw in order to represent a selected radio buttonunselected - the image to draw in order to represent an unselected radio button
public void drawButton(Graphics g,
Button b)
drawButton in class LookAndFeelg - the Graphics objectb - the button
public void drawCheckBox(Graphics g,
CheckBox cb)
drawCheckBox in class LookAndFeelg - the Graphics objectcb - the check box
public void drawLabel(Graphics g,
Label l)
drawLabel in class LookAndFeelg - the Graphics objectl - the label
public void drawRadioButton(Graphics g,
RadioButton rb)
drawRadioButton in class LookAndFeelg - the Graphics objectrb - the radio button
public void drawComboBox(Graphics g,
ComboBox cb)
drawComboBox in class LookAndFeelg - the Graphics objectcb - the combo box
public void drawList(Graphics g,
List l)
drawList in class LookAndFeelg - the Graphics objectl - the list
public void drawMonthView(Graphics g,
Calendar cal,
Component mv)
drawMonthView in class LookAndFeelg - the Graphics objectcal - the calendarmv - the month view component
public void drawTextArea(Graphics g,
TextArea ta)
drawTextArea in class LookAndFeelg - the Graphics objectta - the text areapublic Dimension getButtonPreferredSize(Button b)
getButtonPreferredSize in class LookAndFeelb - the button
public Dimension getCheckBoxPreferredSize(CheckBox cb)
getCheckBoxPreferredSize in class LookAndFeelcb - the checkbox
public Dimension getLabelPreferredSize(Label l)
getLabelPreferredSize in class LookAndFeell - the label
public Dimension getListPreferredSize(List l)
getListPreferredSize in class LookAndFeell - the list
public Dimension getMonthViewPreferredSize(Component mv)
getMonthViewPreferredSize in class LookAndFeelmv - the month view component
public Dimension getRadioButtonPreferredSize(RadioButton rb)
getRadioButtonPreferredSize in class LookAndFeelrb - the radio button
public Dimension getTextAreaPreferredSize(TextArea ta)
getTextAreaPreferredSize in class LookAndFeelta - the text area
public long findDayAt(int x,
int y,
Calendar cal,
Component mv)
findDayAt in class LookAndFeelx - x coordinate of offsety - y coordinate of offsetcal - the calendarmv - the month view component
public Dimension getComboBoxPreferredSize(ComboBox cb)
getComboBoxPreferredSize in class LookAndFeelcb - the combo box
public void drawTabbedPane(Graphics g,
TabbedPane tp)
drawTabbedPane in class LookAndFeelg - the Graphics objecttp - the tabbed pane
public Component getTabbedPaneCell(TabbedPane tp,
String text,
Image icon,
boolean isSelected,
boolean cellHasFocus,
Style cellStyle,
Style tabbedPaneStyle,
int cellOffsetX,
int cellOffsetY,
Dimension cellsPreferredSize,
Dimension contentPaneSize)
getTabbedPaneCell in class LookAndFeeltp - the TabbedPanetext - the cell texticon - the cell icon imageisSelected - is the cell is the selected onecellHasFocus - is the cell has focuscellStyle - the cell Style objecttabbedPaneStyle - the TabbedPane Style objectcellOffsetX - the offset when the cell is on TOP or BOTTOM orientationcellOffsetY - the offset when the cell is on LEFT or RIGHT orientationcellsPreferredSize - the total cells PreferredSizecontentPaneSize - the contentPaneSize
public void drawTabbedPaneContentPane(TabbedPane tp,
Graphics g,
Rectangle rect,
Dimension cellsPreferredSize,
int numOfTabs,
int selectedTabIndex,
Dimension tabsSize,
int cellOffsetX,
int cellOffsetY)
drawTabbedPaneContentPane in class LookAndFeeltp - the TabbedPaneg - the content pane graphicsrect - the content pane painting rectangle areacellsPreferredSize - the total cells PreferredSizenumOfTabs - number of tabsselectedTabIndex - the selected tab indextabsSize - the tabs sizecellOffsetX - the offset when the cell is on TOP or BOTTOM orientationcellOffsetY - the offset when the cell is on LEFT or RIGHT orientation
public void drawTextField(Graphics g,
TextField ta)
drawTextField in class LookAndFeelg - the Graphics objectta - the text fieldpublic Dimension getTextFieldPreferredSize(TextField ta)
getTextFieldPreferredSize in class LookAndFeelta - the text field
public void drawTextFieldCursor(Graphics g,
TextField ta)
drawTextFieldCursor in class LookAndFeelg - the Graphics objectta - the text fieldpublic void focusGained(Component cmp)
focusGained in interface FocusListenercmp - the component that gains focuspublic void focusLost(Component cmp)
focusLost in interface FocusListenercmp - the component that lost focus
|
Java DTV API 1.3 18-Nov-2009 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||