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)Hides javax. Creates a new UI object for the given component. |
| private int | |
| public SynthContext | getContext(JComponent c)
Implements javax. Returns the Context for the specified component. |
| private SynthContext | |
| protected void | installDefaults()
Overrides javax. Initializes list properties such as font, foreground, and background, and adds the CellRendererPane. |
| protected void | installListeners()
Overrides javax. Creates and installs the listeners for the JList, its model, and its selectionModel. |
| public void | paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
Implements javax. Paints the border. |
| public void | propertyChange(PropertyChangeEvent e)
Implements java. This method gets called when a bound property is changed. |
| protected void | uninstallDefaults()
Overrides javax. Sets the list properties that have not been explicitly overridden to
|
| protected void | uninstallListeners()
Overrides javax. Removes the listeners from the JList, its model, and its selectionModel. |
| public void | update(Graphics
the g, JComponent Graphics object used for paintingthe component being painted c)Overrides javax. Notifies this UI delegate to repaint the specified component. |
| 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<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus)
Overrides javax. Implements javax. Return a component that has been configured to display the specified value. |
| public String | |
| public void | |
| public void |
| 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.
| |