|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.text.JTextComponent
javax.swing.JTextArea
org.crosswire.common.swing.MapCellRenderer
public class MapCellRenderer
A MapCellRenderer that renders multiline text.
Distribution Licence: JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA The copyright to this program is held by it's authors. |
Licence
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JTextArea |
---|
JTextArea.AccessibleJTextArea |
Nested classes/interfaces inherited from class javax.swing.text.JTextComponent |
---|
JTextComponent.AccessibleJTextComponent, JTextComponent.KeyBinding |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
private static Border |
noFocusBorder
noFocusBorder is used to present the cell as with
the DefaultTableCellRenderer |
private static long |
serialVersionUID
Serialization ID |
private Color |
unselectedBackground
unselectedBackground is used to present the cell as with
the DefaultTableCellRenderer |
private Color |
unselectedForeground
We need a place to store the color the JTextArea should be returned to after its foreground and background colors have been set to the selection background color. |
Fields inherited from class javax.swing.text.JTextComponent |
---|
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
MapCellRenderer()
|
Method Summary | |
---|---|
Component |
getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
Returns the default table cell renderer. |
void |
setBackground(Color c)
Overrides JComponent.setBackground to assign
the unselected-background color to the specified color. |
void |
setForeground(Color c)
Overrides JComponent.setForeground to assign
the unselected-foreground color to the specified color. |
void |
updateUI()
Notification from the UIManager that the look and feel
[L&F] has changed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static Border noFocusBorder
noFocusBorder
is used to present the cell as with
the DefaultTableCellRenderer
private Color unselectedForeground
unselectedForeground
is used to present the cell as with
the DefaultTableCellRenderer
private Color unselectedBackground
unselectedBackground
is used to present the cell as with
the DefaultTableCellRenderer
private static final long serialVersionUID
Constructor Detail |
---|
public MapCellRenderer()
Method Detail |
---|
public void setForeground(Color c)
JComponent.setForeground
to assign
the unselected-foreground color to the specified color.
setForeground
in class JComponent
c
- set the foreground color to this valuepublic void setBackground(Color c)
JComponent.setBackground
to assign
the unselected-background color to the specified color.
setBackground
in class JComponent
c
- set the background color to this valuepublic void updateUI()
UIManager
that the look and feel
[L&F] has changed.
Replaces the current UI object with the latest version from the
UIManager
.
updateUI
in class JTextComponent
JComponent.updateUI()
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
getTableCellRendererComponent
in interface TableCellRenderer
table
- the JTable
value
- the value to assign to the cell at [row, column]
isSelected
- true if cell is selectedhasFocus
- true if cell has focusrow
- the row of the cell to rendercolumn
- the column of the cell to render
|
Copyright ? 2003-2004 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |