public abstract class BaseTitle extends javax.swing.JLabel implements DataviewTitles, ViewComponent, java.io.Serializable, BaseTitleAttributes
javax.swing.JLabel.AccessibleJLabeljavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
protected BaseTitleXML |
_baseTitleXML |
protected java.util.BitSet |
_styleOverrideFlags |
protected java.util.BitSet |
_userOverrideFlags |
protected int |
baseline |
protected int |
constrainWidth |
protected int |
d_fontSize |
protected Dataview |
dataView |
protected java.awt.FontMetrics |
fm |
protected static java.lang.String |
m_errorBG |
protected static java.lang.String |
m_errorFG |
protected static java.lang.String |
m_errorMsg |
protected static java.lang.String |
m_errorSetFont |
protected static java.lang.String |
m_errorSetHA |
protected static java.lang.String |
m_errorSetZoom |
protected java.awt.Font |
m_font |
protected int |
m_horzAlign |
protected static java.lang.String |
m_method_setBG |
protected static java.lang.String |
m_method_setFG |
protected static java.lang.String |
m_method_setFont |
protected static java.lang.String |
m_method_setHA |
protected static java.lang.String |
m_method_setText |
protected static java.lang.String |
m_method_setZoomFactor |
protected java.lang.String |
m_text |
protected boolean |
m_underline |
protected java.lang.String |
m_version |
protected int |
zoomFactor |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTATTR_BACKGROUND, ATTR_FONTBOLD, ATTR_FONTITALIC, ATTR_FONTNAME, ATTR_FONTSIZE, ATTR_FOREGROUND, ATTR_HORIZONTALALIGNMENT, ATTR_STYLE_MAXID, ATTR_UNDERLINE| Constructor and Description |
|---|
BaseTitle(java.lang.String t,
Dataview v) |
| Modifier and Type | Method and Description |
|---|---|
protected java.awt.Dimension |
adjustForEnhancements(java.awt.Dimension size) |
void |
createPropertyOverrideFlags() |
protected void |
drawAlignedString(java.awt.Graphics g,
java.lang.String s,
int x,
int y,
int width,
boolean bDontdraw) |
static void |
drawEnhancedAdornments(java.awt.FontMetrics metrics,
java.awt.Graphics g,
int x,
int y,
int sw,
boolean underline,
boolean doubleUnderline,
boolean strikeThrough) |
java.beans.BeanInfo |
getBeanInfo()
Return a BeanInfo structure representing public
properties this component wants to expose in an IDE.
|
abstract java.lang.String |
getComponentName()
Return the string name for this component.
|
java.awt.Font |
getFont()
Retrieves a
Font object for the title. |
java.lang.String |
getFontName()
get font name
|
int |
getFontSize()
get font size
|
int |
getHorizontalAlignment()
Retrieves the horizontal alignment for the font within its rectangle.
|
java.awt.Dimension |
getPreferredSize() |
oracle.dss.util.xml.ObjectNode |
getStyleXML(boolean allProperties) |
java.lang.String |
getText()
Returns the parsed text for a string that includes variables.
|
java.lang.String |
getToolTipText(java.awt.event.MouseEvent event) |
java.lang.String |
getUnParseText()
Retrieves the unparsed text for the title.
|
java.awt.Font |
getUnscaledFont() |
oracle.dss.util.xml.ObjectNode |
getXML(boolean allProperties) |
protected java.awt.Font |
initializeFont() |
boolean |
isBackgroundUsed() |
boolean |
isBorderOpaque() |
boolean |
isFocusTraversable()
Indicates whether this component can receive the focus.
|
boolean |
isFontBold()
is font bold?
|
boolean |
isFontItalic()
is font italic?
|
boolean |
isForegroundUsed() |
boolean |
isSelected() |
boolean |
isStyleOverrideFlag(int attrID) |
boolean |
isUnderline()
Indicates whether the text is underlined with one line.
|
boolean |
isUserOverrideFlag(int attrID) |
boolean |
isVisible()
Indicates whether the title is visible.
|
void |
paintComponent(java.awt.Graphics g) |
protected void |
paintFocus(java.awt.Graphics g,
java.awt.Rectangle focusRect) |
void |
resetStyle() |
void |
resetToDefault(int reset) |
void |
resetToDefault(int reset,
java.lang.String version) |
void |
setBackground(java.awt.Color bg)
Specifies the background color of this component.
|
void |
setFont(java.awt.Font f)
Specifies a
Font object for the title. |
void |
setFontBold(boolean bold)
specifies wheather the font is bold.
|
void |
setFontItalic(boolean italic)
specifies wheather the font is italic.
|
void |
setFontName(java.lang.String name)
specifies the font name.
|
void |
setFontSize(int size)
specifies the font size.
|
void |
setForeground(java.awt.Color fg)
Specifies the foreground color of this component.
|
void |
setHorizontalAlignment(int alignment)
Specifies the horizontal alignment for the font within its rectangle.
|
void |
setSelected(boolean sel) |
void |
setStyleProperty(int attrID,
java.lang.String value) |
void |
setStyleXML(oracle.dss.util.xml.ObjectNode node,
java.lang.String version,
int reset) |
void |
setText(java.lang.String t)
Specifies the parsed text for a
String that includes variables. |
void |
setUnderline(boolean underline)
Specifies whether the text is underlined with one line.
|
void |
setVisible(boolean b)
Specifies whether the title is visible.
|
void |
setXML(oracle.dss.util.xml.ObjectNode node,
java.lang.String version,
int reset) |
void |
setXML(oracle.dss.util.xml.ObjectNode node,
java.lang.String version,
int reset,
java.util.HashMap map) |
void |
setZoomFactor(int f) |
java.lang.String |
toString() |
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setDisplayedMnemonicIndex, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setUI, setVerticalAlignment, setVerticalTextPosition, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetIDgetBackground, getForegroundprotected java.util.BitSet _userOverrideFlags
protected java.util.BitSet _styleOverrideFlags
protected Dataview dataView
protected boolean m_underline
protected int m_horzAlign
protected java.awt.Font m_font
protected java.awt.FontMetrics fm
protected int baseline
protected int constrainWidth
protected int zoomFactor
protected java.lang.String m_text
protected static final java.lang.String m_errorMsg
protected static final java.lang.String m_errorBG
protected static final java.lang.String m_errorFG
protected static final java.lang.String m_errorSetFont
protected static final java.lang.String m_errorSetZoom
protected static final java.lang.String m_errorSetHA
protected static final java.lang.String m_method_setText
protected static final java.lang.String m_method_setBG
protected static final java.lang.String m_method_setFG
protected static final java.lang.String m_method_setFont
protected static final java.lang.String m_method_setZoomFactor
protected static final java.lang.String m_method_setHA
protected BaseTitleXML _baseTitleXML
protected int d_fontSize
protected java.lang.String m_version
public BaseTitle(java.lang.String t,
Dataview v)
t - The text for the title.v - The data view that the title belongs to.public boolean isFocusTraversable()
isFocusTraversable in class java.awt.Componenttrue if this component can receive the focus.public void setVisible(boolean b)
setVisible in interface TitlessetVisible in class javax.swing.JComponentb - true to make the title visible, false to make the title invisible.public boolean isVisible()
public void setText(java.lang.String t)
String that includes variables.public java.lang.String getText()
public java.lang.String getUnParseText()
getUnParseText in interface TitlesTokenSubstitutionpublic void setBackground(java.awt.Color bg)
setBackground in interface DataviewTitlessetBackground in class javax.swing.JComponentbg - The background color for this title.public void setForeground(java.awt.Color fg)
setForeground in interface DataviewTitlessetForeground in class javax.swing.JComponentfg - The foreground color for this title.public void setFont(java.awt.Font f)
Font object for the title.
A Font object is the awt object with attributes such as name, style, and absolute size.setFont in interface FontAttributesetFont in class javax.swing.JComponentf - A Font object for the title.public java.awt.Font getFont()
Font object for the title.
A Font object is the awt object with attributes such as name, style, and absolute size.getFont in interface java.awt.MenuContainergetFont in interface FontAttributegetFont in class java.awt.ComponentFont object for the title.public java.awt.Font getUnscaledFont()
Font object for the title, that is not scaled by the ZoomFactor.Font object for the title, that is not scaled by the ZoomFactor.public int getFontSize()
public void setFontSize(int size)
size - of the fontpublic java.lang.String getFontName()
public void setFontName(java.lang.String name)
name - of the fontpublic boolean isFontBold()
public void setFontBold(boolean bold)
bold - true to set the font to bold
false to prevent the font to be bold.public boolean isFontItalic()
public void setFontItalic(boolean italic)
italic - true to set the font to italic
false to prevent the font to be italic.public void setStyleProperty(int attrID,
java.lang.String value)
setStyleProperty in interface BaseTitleAttributespublic void setUnderline(boolean underline)
setUnderline in interface DataviewTitlesunderline - true to underline the text with one line, false to prevent the text from being underlined with one line.public boolean isUnderline()
isUnderline in interface DataviewTitlestrue if the text is underlined with one line, false if the text is not underlined with one line.public void setHorizontalAlignment(int alignment)
setHorizontalAlignment in interface HorizontalAlignmentsetHorizontalAlignment in class javax.swing.JLabelalignment - A swing constant that represents the
horizontal alignment of the font within its rectangle.
Valid constants are SwingConstants.RIGHT,
SwingConstants.LEFT,
SwingConstants.CENTER, and
SwingConstants.LEADING.
The SwingConstants class is defined in the
javax.swing package.public int getHorizontalAlignment()
SwingConstants.RIGHT,
SwingConstants.LEFT,
SwingConstants.CENTER, and
SwingConstants.LEADING.
The SwingConstants class is defined in the
javax.swing package.getHorizontalAlignment in interface HorizontalAlignmentgetHorizontalAlignment in class javax.swing.JLabelswing constant that represents the horizontal
alignment of the font within its rectangle.public boolean isBorderOpaque()
true if it is opaque, false if you cannot see through it.public java.beans.BeanInfo getBeanInfo()
ViewComponentgetBeanInfo in interface ViewComponentarray of BeanInfo structures if there are any, null if there are none.public java.lang.String getToolTipText(java.awt.event.MouseEvent event)
getToolTipText in class javax.swing.JComponentpublic java.awt.Dimension getPreferredSize()
getPreferredSize in class javax.swing.JComponentpublic void paintComponent(java.awt.Graphics g)
paintComponent in class javax.swing.JComponentg - graphics contextpublic static void drawEnhancedAdornments(java.awt.FontMetrics metrics,
java.awt.Graphics g,
int x,
int y,
int sw,
boolean underline,
boolean doubleUnderline,
boolean strikeThrough)
metrics - The font metrics for the font of the title.
Font metrics specify detailed information about the font, such as ascenders, descenders and leading.g - The graphic context for painting the title.x - The horizontal position of the text within the rectangle of this title.y - The vertical position of the text within the rectangle of this title.sw - The width for the string of the title.underline - true to underline the text with one line, false to display the text without a single underline.doubleUnderline - true to underline the text with two lines, false to display the text without a double underline.strikeThrough - true to draw a line through the text, false to display the text without a line drawn through it.doubleUnderline parameter value, set the parameter value for underline to false.public void setZoomFactor(int f)
f - The zoom factor of this title.public void setSelected(boolean sel)
sel - true if title should be marked as selectedpublic boolean isSelected()
true if selectedpublic java.lang.String toString()
toString in class java.awt.Componentpublic boolean isForegroundUsed()
isForegroundUsed in interface BaseTitleAttributespublic boolean isBackgroundUsed()
isBackgroundUsed in interface BaseTitleAttributesprotected void paintFocus(java.awt.Graphics g,
java.awt.Rectangle focusRect)
protected void drawAlignedString(java.awt.Graphics g,
java.lang.String s,
int x,
int y,
int width,
boolean bDontdraw)
protected java.awt.Dimension adjustForEnhancements(java.awt.Dimension size)
public abstract java.lang.String getComponentName()
ViewComponentgetComponentName in interface BaseTitleAttributesgetComponentName in interface ViewComponentpublic void setXML(oracle.dss.util.xml.ObjectNode node,
java.lang.String version,
int reset)
setXML in interface BaseTitleAttributespublic void setXML(oracle.dss.util.xml.ObjectNode node,
java.lang.String version,
int reset,
java.util.HashMap map)
setXML in interface BaseTitleAttributespublic oracle.dss.util.xml.ObjectNode getXML(boolean allProperties)
getXML in interface BaseTitleAttributespublic void setStyleXML(oracle.dss.util.xml.ObjectNode node,
java.lang.String version,
int reset)
setStyleXML in interface BaseTitleAttributespublic oracle.dss.util.xml.ObjectNode getStyleXML(boolean allProperties)
getStyleXML in interface BaseTitleAttributespublic void resetToDefault(int reset)
public void resetToDefault(int reset,
java.lang.String version)
protected java.awt.Font initializeFont()
public void createPropertyOverrideFlags()
public boolean isUserOverrideFlag(int attrID)
isUserOverrideFlag in interface BaseTitleAttributespublic boolean isStyleOverrideFlag(int attrID)
isStyleOverrideFlag in interface BaseTitleAttributespublic void resetStyle()