javax.swing.tree

Class DefaultTreeCellRenderer

Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable, SwingConstants, TreeCellRenderer

public class DefaultTreeCellRenderer
extends JLabel
implements TreeCellRenderer

A default implementation of the TreeCellRenderer interface.
See Also:
Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from class javax.swing.JLabel

JLabel.AccessibleJLabel

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

protected Color
backgroundNonSelectionColor
The background color for non-selected cells.
protected Color
backgroundSelectionColor
The background color for selected cells.
protected Color
borderSelectionColor
The border color for selected tree cells.
protected Icon
closedIcon
The icon used to represent non-leaf nodes that are closed.
protected boolean
hasFocus
A flag indicating the current focus status.
protected Icon
leafIcon
The icon used to represent leaf nodes.
protected Icon
openIcon
The icon used to represent non-leaf nodes that are open.
protected boolean
selected
A flag indicating the current selection status.
protected Color
textNonSelectionColor
The color used for text in non-selected cells.
protected Color
textSelectionColor
The color used for text in selected cells.

Fields inherited from class javax.swing.JLabel

labelFor

Fields inherited from class javax.swing.JComponent

TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW, accessibleContext, listenerList, ui

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

Fields inherited from interface javax.swing.SwingConstants

BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST

Constructor Summary

DefaultTreeCellRenderer()
Creates a new tree cell renderer with defaults appropriate for the current LookAndFeel.

Method Summary

void
firePropertyChange(String name, boolean oldValue, boolean newValue)
For performance reasons, this method is overridden to do nothing.
void
firePropertyChange(String name, byte oldValue, byte newValue)
For performance reasons, this method is overridden to do nothing.
void
firePropertyChange(String name, char oldValue, char newValue)
For performance reasons, this method is overridden to do nothing.
void
firePropertyChange(String name, double oldValue, double newValue)
For performance reasons, this method is overridden to do nothing.
void
firePropertyChange(String name, float oldValue, float newValue)
For performance reasons, this method is overridden to do nothing.
void
firePropertyChange(String name, int oldValue, int newValue)
For performance reasons, this method is overridden to do nothing.
protected void
firePropertyChange(String name, Object oldValue, Object newValue)
For performance reasons, this method is overridden to do nothing.
void
firePropertyChange(String name, long oldValue, long newValue)
For performance reasons, this method is overridden to do nothing.
void
firePropertyChange(String name, short oldValue, short newValue)
For performance reasons, this method is overridden to do nothing.
Color
getBackgroundNonSelectionColor()
Returns the background color for tree cells that are not selected.
Color
getBackgroundSelectionColor()
Returns the background color for tree cells that are selected.
Color
getBorderSelectionColor()
Returns the border color for tree cells that are selected.
Icon
getClosedIcon()
Returns the icon displayed for non-leaf nodes that are closed.
Icon
getDefaultClosedIcon()
Returns the default icon for non-leaf tree cells that are closed (not expanded).
Icon
getDefaultLeafIcon()
Returns the default icon for leaf tree cells.
Icon
getDefaultOpenIcon()
Returns the default icon for non-leaf tree cells that are open (expanded).
Font
getFont()
Returns the current font.
Icon
getLeafIcon()
Returns the icon displayed for leaf nodes.
Icon
getOpenIcon()
Returns the icon displayed for non-leaf nodes that are open (expanded).
Dimension
getPreferredSize()
Returns the preferred size of the cell.
Color
getTextNonSelectionColor()
Returns the text color for tree cells that are not selected.
Color
getTextSelectionColor()
Returns the text color for tree cells that are selected.
Component
getTreeCellRendererComponent(JTree tree, Object val, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
Returns a component (in fact this) that can be used to render a tree cell with the specified state.
void
paint(Graphics g)
Paints the value.
void
repaint(Rectangle area)
For performance reasons, this method is overridden to do nothing.
void
repaint(long tm, int x, int y, int width, int height)
For performance reasons, this method is overridden to do nothing.
void
revalidate()
For performance reasons, this method is overridden to do nothing.
void
setBackground(Color c)
Sets the background color.
void
setBackgroundNonSelectionColor(Color c)
Sets the background color for tree cells that are not selected.
void
setBackgroundSelectionColor(Color c)
Sets the background color for tree cells that are selected.
void
setBorderSelectionColor(Color c)
Sets the border color for tree cells that are selected.
void
setClosedIcon(Icon icon)
Sets the icon to be displayed for non-leaf nodes that are closed.
void
setFont(Font f)
Sets the font.
void
setLeafIcon(Icon icon)
Sets the icon to be displayed for leaf nodes.
void
setOpenIcon(Icon icon)
Sets the icon to be displayed for non-leaf nodes that are open (expanded).
void
setTextNonSelectionColor(Color c)
Sets the text color for tree cells that are not selected.
void
setTextSelectionColor(Color c)
Sets the text color for tree cells that are selected.
void
validate()
For performance reasons, this method is overridden to do nothing.

Methods inherited from class javax.swing.JLabel

checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setDisplayedMnemonicIndex, setFont, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUI

Methods inherited from class javax.swing.JComponent

addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, extends EventListener> T[] getListeners, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setNextFocusableComponent, setOpaque, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI

Methods inherited from class java.awt.Container

add, add, add, add, add, addContainerListener, addImpl, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, extends EventListener> T[] getListeners, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponentZOrder, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, update, validate, validateTree

Methods inherited from class java.awt.Component

action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, extends EventListener> T[] getListeners, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFocusable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFocusable, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

backgroundNonSelectionColor

protected Color backgroundNonSelectionColor
The background color for non-selected cells.

backgroundSelectionColor

protected Color backgroundSelectionColor
The background color for selected cells.

borderSelectionColor

protected Color borderSelectionColor
The border color for selected tree cells.

closedIcon

protected Icon closedIcon
The icon used to represent non-leaf nodes that are closed.

hasFocus

protected boolean hasFocus
A flag indicating the current focus status.

leafIcon

protected Icon leafIcon
The icon used to represent leaf nodes.

openIcon

protected Icon openIcon
The icon used to represent non-leaf nodes that are open.

selected

protected boolean selected
A flag indicating the current selection status.

textNonSelectionColor

protected Color textNonSelectionColor
The color used for text in non-selected cells.

textSelectionColor

protected Color textSelectionColor
The color used for text in selected cells.

Constructor Details

DefaultTreeCellRenderer

public DefaultTreeCellRenderer()
Creates a new tree cell renderer with defaults appropriate for the current LookAndFeel.

Method Details

firePropertyChange

public void firePropertyChange(String name,
                               boolean oldValue,
                               boolean newValue)
For performance reasons, this method is overridden to do nothing.
Overrides:
firePropertyChange in interface JComponent
Parameters:
name - the property name.
oldValue - the old value.
newValue - the new value.

firePropertyChange

public void firePropertyChange(String name,
                               byte oldValue,
                               byte newValue)
For performance reasons, this method is overridden to do nothing.
Overrides:
firePropertyChange in interface Component
Parameters:
name - the property name.
oldValue - the old value.
newValue - the new value.

firePropertyChange

public void firePropertyChange(String name,
                               char oldValue,
                               char newValue)
For performance reasons, this method is overridden to do nothing.
Overrides:
firePropertyChange in interface Component
Parameters:
name - the property name.
oldValue - the old value.
newValue - the new value.

firePropertyChange

public void firePropertyChange(String name,
                               double oldValue,
                               double newValue)
For performance reasons, this method is overridden to do nothing.
Overrides:
firePropertyChange in interface Component
Parameters:
name - the property name.
oldValue - the old value.
newValue - the new value.

firePropertyChange

public void firePropertyChange(String name,
                               float oldValue,
                               float newValue)
For performance reasons, this method is overridden to do nothing.
Overrides:
firePropertyChange in interface Component
Parameters:
name - the property name.
oldValue - the old value.
newValue - the new value.

firePropertyChange

public void firePropertyChange(String name,
                               int oldValue,
                               int newValue)
For performance reasons, this method is overridden to do nothing.
Overrides:
firePropertyChange in interface JComponent
Parameters:
name - the property name.
oldValue - the old value.
newValue - the new value.

firePropertyChange

protected void firePropertyChange(String name,
                                  Object oldValue,
                                  Object newValue)
For performance reasons, this method is overridden to do nothing.
Overrides:
firePropertyChange in interface Component
Parameters:
name - the property name.
oldValue - the old value.
newValue - the new value.

firePropertyChange

public void firePropertyChange(String name,
                               long oldValue,
                               long newValue)
For performance reasons, this method is overridden to do nothing.
Overrides:
firePropertyChange in interface Component
Parameters:
name - the property name.
oldValue - the old value.
newValue - the new value.

firePropertyChange

public void firePropertyChange(String name,
                               short oldValue,
                               short newValue)
For performance reasons, this method is overridden to do nothing.
Overrides:
firePropertyChange in interface Component
Parameters:
name - the property name.
oldValue - the old value.
newValue - the new value.

getBackgroundNonSelectionColor

public Color getBackgroundNonSelectionColor()
Returns the background color for tree cells that are not selected. The default value is obtained from the LookAndFeel defaults table using the key Tree.textBackground.
Returns:
The background color for tree cells that are not selected.

getBackgroundSelectionColor

public Color getBackgroundSelectionColor()
Returns the background color for tree cells that are selected. The default value is obtained from the LookAndFeel defaults table using the key Tree.selectionBackground.
Returns:
The background color for tree cells that are selected.

getBorderSelectionColor

public Color getBorderSelectionColor()
Returns the border color for tree cells that are selected. The default value is obtained from the LookAndFeel defaults table using the key Tree.selectionBorderColor.
Returns:
The border color for tree cells that are selected.

getClosedIcon

public Icon getClosedIcon()
Returns the icon displayed for non-leaf nodes that are closed. The default value is initialised from the LookAndFeel.
Returns:
The closed icon (possibly null).

getDefaultClosedIcon

public Icon getDefaultClosedIcon()
Returns the default icon for non-leaf tree cells that are closed (not expanded). The icon is fetched from the defaults table for the current LookAndFeel using the key Tree.closedIcon.
Returns:
The default icon.

getDefaultLeafIcon

public Icon getDefaultLeafIcon()
Returns the default icon for leaf tree cells. The icon is fetched from the defaults table for the current LookAndFeel using the key Tree.leafIcon.
Returns:
The default icon.

getDefaultOpenIcon

public Icon getDefaultOpenIcon()
Returns the default icon for non-leaf tree cells that are open (expanded). The icon is fetched from the defaults table for the current LookAndFeel using the key Tree.openIcon.
Returns:
The default icon.

getFont

public Font getFont()
Returns the current font.
Specified by:
getFont in interface MenuContainer
Overrides:
getFont in interface Component
Returns:
The current font.
See Also:
setFont(Font)

getLeafIcon

public Icon getLeafIcon()
Returns the icon displayed for leaf nodes. The default value is initialised from the LookAndFeel.
Returns:
The leaf icon (possibly null).

getOpenIcon

public Icon getOpenIcon()
Returns the icon displayed for non-leaf nodes that are open (expanded). The default value is initialised from the LookAndFeel.
Returns:
The open icon (possibly null).

getPreferredSize

public Dimension getPreferredSize()
Returns the preferred size of the cell.
Overrides:
getPreferredSize in interface JComponent
Returns:
The preferred size of the cell.

getTextNonSelectionColor

public Color getTextNonSelectionColor()
Returns the text color for tree cells that are not selected. The default value is obtained from the LookAndFeel defaults table using the key Tree.selectionForeground.
Returns:
The background color for tree cells that are not selected.
See Also:
setTextgroundNonSelectionColor(Color)

getTextSelectionColor

public Color getTextSelectionColor()
Returns the text color for tree cells that are selected. The default value is obtained from the LookAndFeel defaults table using the key Tree.selectionForeground.
Returns:
The text color for tree cells that are selected.

getTreeCellRendererComponent

public Component getTreeCellRendererComponent(JTree tree,
                                              Object val,
                                              boolean selected,
                                              boolean expanded,
                                              boolean leaf,
                                              int row,
                                              boolean hasFocus)
Returns a component (in fact this) that can be used to render a tree cell with the specified state.
Specified by:
getTreeCellRendererComponent in interface TreeCellRenderer
Parameters:
tree - the tree that the cell belongs to.
val - the cell value.
selected - indicates whether or not the cell is selected.
expanded - indicates whether or not the cell is expanded.
leaf - indicates whether or not the cell is a leaf in the tree.
row - the row index.
hasFocus - indicates whether or not the cell has the focus.
Returns:
this.

paint

public void paint(Graphics g)
Paints the value. The background is filled based on selected.
Overrides:
paint in interface JComponent
Parameters:
g - the graphics device.

repaint

public void repaint(Rectangle area)
For performance reasons, this method is overridden to do nothing.
Overrides:
repaint in interface JComponent
Parameters:
area - the area to repaint.

repaint

public void repaint(long tm,
                    int x,
                    int y,
                    int width,
                    int height)
For performance reasons, this method is overridden to do nothing.
Overrides:
repaint in interface JComponent
Parameters:
tm - ignored
x - coordinate of the region to mark as dirty
y - coordinate of the region to mark as dirty
width - dimension of the region to mark as dirty
height - dimension of the region to mark as dirty

revalidate

public void revalidate()
For performance reasons, this method is overridden to do nothing.
Overrides:
revalidate in interface JComponent

setBackground

public void setBackground(Color c)
Sets the background color.
Overrides:
setBackground in interface JComponent
Parameters:
c - the color.

setBackgroundNonSelectionColor

public void setBackgroundNonSelectionColor(Color c)
Sets the background color for tree cells that are not selected.
Parameters:
c - the color (null permitted).

setBackgroundSelectionColor

public void setBackgroundSelectionColor(Color c)
Sets the background color for tree cells that are selected.
Parameters:
c - the color (null permitted).

setBorderSelectionColor

public void setBorderSelectionColor(Color c)
Sets the border color for tree cells that are selected.
Parameters:
c - the color (null permitted).

setClosedIcon

public void setClosedIcon(Icon icon)
Sets the icon to be displayed for non-leaf nodes that are closed. Set this to null if no icon is required.
Parameters:
icon - the icon (null permitted).

setFont

public void setFont(Font f)
Sets the font.
Overrides:
setFont in interface JLabel
Parameters:
f - the font.
See Also:
getFont()

setLeafIcon

public void setLeafIcon(Icon icon)
Sets the icon to be displayed for leaf nodes. Set this to null if no icon is required.
Parameters:
icon - the icon (null permitted).
See Also:
getLeafIcon()

setOpenIcon

public void setOpenIcon(Icon icon)
Sets the icon to be displayed for non-leaf nodes that are open (expanded). Set this to null if no icon is required.
Parameters:
icon - the icon (null permitted).
See Also:
getOpenIcon()

setTextNonSelectionColor

public void setTextNonSelectionColor(Color c)
Sets the text color for tree cells that are not selected.
Parameters:
c - the color (null permitted).

setTextSelectionColor

public void setTextSelectionColor(Color c)
Sets the text color for tree cells that are selected.
Parameters:
c - the color (null permitted).

validate

public void validate()
For performance reasons, this method is overridden to do nothing.
Overrides:
validate in interface Container

DefaultTreeCellRenderer.java Copyright (C) 2002, 2004, 2006, Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath 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. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.