javax.swing.JList
.
Modifier and Type | Class and Description |
---|---|
private class | SynthListUI.
The |
Modifier and Type | Field and Description |
---|---|
private SynthStyle | |
private boolean | |
private boolean |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public static ComponentUI | Returns: the UI objectcomponent to create UI object for list)
Creates a new UI object for the given component.
|
private int | |
public SynthContext | getContext(JComponent
Component requesting SynthContext. c)Implements javax. |
private SynthContext | |
protected void | installDefaults()
Overrides javax. |
protected void | installListeners()
Overrides javax. |
public void | paintBorder(SynthContext
a component context context, Graphics Graphics to paint onthe X coordinate x, int the Y coordinate y, int width of the border w, int height of the border h)Implements javax. |
public void | propertyChange(PropertyChangeEvent
A PropertyChangeEvent object describing the event source
and the property that has changed. e)Implements java. |
protected void | uninstallDefaults()
Overrides javax. null .
|
protected void | uninstallListeners()
Overrides javax. |
public void | update(Graphics
the g, JComponent Graphics object used for paintingthe component being painted c)Overrides javax. |
private void |
style | back to summary |
---|---|
private SynthStyle style |
useListColors | back to summary |
---|---|
private boolean useListColors |
useUIBorder | back to summary |
---|---|
private boolean useUIBorder |
SynthListUI | back to summary |
---|---|
public SynthListUI() Constructs a |
createUI | back to summary |
---|---|
public static ComponentUI createUI(JComponent list) Hides javax. Creates a new UI object for the given component.
|
getComponentState | back to summary |
---|---|
private int getComponentState(JComponent c) |
getContext | back to summary |
---|---|
public SynthContext getContext(JComponent c) Implements javax. Doc from javax. Returns the Context for the specified component.
|
getContext | back to summary |
---|---|
private SynthContext getContext(JComponent c, int state) |
installDefaults | back to summary |
---|---|
protected void installDefaults() Overrides javax. Doc from javax. Initializes list properties such as font, foreground, and background, and adds the CellRendererPane. The font, foreground, and background properties are only set if their current value is either null or a UIResource, other properties are set if the current value is null.
|
installListeners | back to summary |
---|---|
protected void installListeners() Overrides javax. Doc from javax. Creates and installs the listeners for the JList, its model, and its selectionModel. This method is called at installUI() time.
|
paintBorder | back to summary |
---|---|
public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h) Implements javax. Doc from javax. Paints the border.
|
propertyChange | back to summary |
---|---|
public void propertyChange(PropertyChangeEvent e) Implements java. Doc from java. This method gets called when a bound property is changed.
|
uninstallDefaults | back to summary |
---|---|
protected void uninstallDefaults() Overrides javax. Doc from javax. Sets the list properties that have not been explicitly overridden to
|
uninstallListeners | back to summary |
---|---|
protected void uninstallListeners() Overrides javax. Doc from javax. Removes the listeners from the JList, its model, and its selectionModel. All of the listener fields, are reset to null here. This method is called at uninstallUI() time, it should be kept in sync with installListeners.
|
update | back to summary |
---|---|
public void update(Graphics g, JComponent c) Overrides javax. Notifies this UI delegate to repaint the specified component.
This method paints the component background, then calls
the In general, this method does not need to be overridden by subclasses.
All Look and Feel rendering code should reside in the
|
updateStyle | back to summary |
---|---|
private void updateStyle(JComponent c) |
DefaultListCellRenderer
installed by the UI.
Access | Constructor and Description |
---|---|
private |
Modifier and Type | Method and Description |
---|---|
public Component | getListCellRendererComponent(JList<?>
The JList we're painting. list, Object The value returned by list.getModel().getElementAt(index). value, int The cells index. index, boolean True if the specified cell was selected. isSelected, boolean True if the specified cell has the focus. cellHasFocus)Overrides javax. Implements javax. |
public String | |
public void | paint(Graphics
the g)Graphics context in which to paintOverrides javax. |
public void | setBorder(Border
the border to be rendered for this component b)Overrides javax. |
SynthListCellRenderer | back to summary |
---|---|
private SynthListCellRenderer() |
getListCellRendererComponent | back to summary |
---|---|
public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) Overrides javax. Implements javax. Doc from javax. Return a component that has been configured to display the specified
value. That component's
|
getName | back to summary |
---|---|
public String getName() Overrides java. Doc from java. Gets the name of the component. |
paint | back to summary |
---|---|
public void paint(Graphics g) Overrides javax. Doc from javax. Invoked by Swing to draw components.
Applications should not invoke
This method actually delegates the work of painting to three
protected methods: |
setBorder | back to summary |
---|---|
public void setBorder(Border b) Overrides javax. Doc from javax. Sets the border of this component. The
Although technically you can set the border on any object
that inherits from This is a bound property. |