public class Title extends org.eclipse.swt.widgets.Canvas implements ITitle, org.eclipse.swt.events.PaintListener
Modifier and Type | Field and Description |
---|---|
protected Chart |
chart
the chart
|
protected boolean |
isVisible
the visibility state of axis
|
protected String |
text
the title text
|
Constructor and Description |
---|
Title(Chart parent,
int style)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
protected String |
getDefaultText()
Gets the default title text.
|
org.eclipse.swt.custom.StyleRange[] |
getStyleRanges()
Gets the style ranges.
|
String |
getText()
Gets the title text.
|
protected boolean |
isHorizontal()
Gets the state indicating if showing title horizontally.
|
boolean |
isVisible()
Gets the visibility state.
|
void |
paintControl(org.eclipse.swt.events.PaintEvent e) |
void |
setFont(org.eclipse.swt.graphics.Font font)
Sets the font for title text.
|
void |
setForeground(org.eclipse.swt.graphics.Color color)
Sets the foreground color of title.
|
void |
setStyleRanges(org.eclipse.swt.custom.StyleRange[] ranges)
Sets the style ranges.
|
void |
setText(String text)
Sets the title text.
|
void |
setVisible(boolean isVisible)
Sets the visibility state of title.
|
void |
updateLayoutData()
Updates the title layout data.
|
drawBackground, getCaret, getIME, scroll, setCaret, setIME
changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getClientArea, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
computeTrim, getBorderWidth, getHorizontalBar, getScrollbarsMode, getVerticalBar
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setToolTipText, setTouchEnabled, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFont, getForeground
protected Chart chart
protected String text
protected boolean isVisible
public Title(Chart parent, int style)
parent
- the parent compositestyle
- the stylepublic void setText(String text)
ITitle
protected String getDefaultText()
public void setFont(org.eclipse.swt.graphics.Font font)
ITitle
public void setForeground(org.eclipse.swt.graphics.Color color)
ITitle
setForeground
in interface ITitle
setForeground
in class org.eclipse.swt.widgets.Control
color
- the foreground color of titlepublic void setStyleRanges(org.eclipse.swt.custom.StyleRange[] ranges)
ITitle
ITitle.setFont(Font)
and ITitle.setForeground(Color)
makes no effect. Instead, the font and background color in style ranges
are used.setStyleRanges
in interface ITitle
ranges
- the style ranges, or null to clear the currently set
style ranges.public org.eclipse.swt.custom.StyleRange[] getStyleRanges()
ITitle
getStyleRanges
in interface ITitle
public void setVisible(boolean isVisible)
ITitle
setVisible
in interface ITitle
setVisible
in class org.eclipse.swt.widgets.Control
isVisible
- the visibility statepublic boolean isVisible()
ITitle
protected boolean isHorizontal()
public void updateLayoutData()
public void dispose()
dispose
in class org.eclipse.swt.widgets.Widget
public void paintControl(org.eclipse.swt.events.PaintEvent e)
paintControl
in interface org.eclipse.swt.events.PaintListener
Copyright © 2013. All Rights Reserved.