public class StyledTreeView extends TreeView implements StyledElementView, StyledElementViewPart, TextLines
GadgetContainer.Side
StyledView.Display
StyledElementViewPart.Role
children, NO_GADGETS
Constructor and Description |
---|
StyledTreeView(Element element,
boolean isInline,
Style style) |
Modifier and Type | Method and Description |
---|---|
void |
detachingViewFromModel(Document document,
int viewIndex)
Invoked to signal the gadget that the styled view of an element it is
part of is being deleted (typically because the element is being
deleted).
|
StyledView.Display |
getDisplay()
Returns the CSS display used for this view of an element.
|
int |
getFirstBaseLine()
Returns the baseline of first text line if any and -1 otherwise.
|
int |
getLastBaseLine()
Returns the baseline of last text line if any and -1 otherwise.
|
int |
getMarginBottom()
Same as
Styled.getMarginTop() but for the bottom margin. |
int |
getMarginTop()
Returns the top margin of this object.
|
StyledElementViewPart.Role |
getRole()
Returns the role of this gadget as a part of the styled view of an
element.
|
Style |
getStyle()
Returns the style of this object.
|
StyledElementView |
getStyledElementView()
Returns the styled element view this gadget is part of.
|
String |
getViewToolTip()
Returns the tooltip, if any, to be displayed by this view of an element.
|
boolean |
hasDynamicVerticalMargins() |
void |
initView(ViewParameters param,
ViewParameters paramBefore,
Style styleBefore,
ViewParameters paramAfter,
Style styleAfter,
StyledViewFactory viewFactory)
Creates one or more
Gadget s,
themselves implementing the StyledElementViewPart interface,
which are used to render an element graphically on screen. |
boolean |
isCustomView()
Returns
true if this view is a custom replacement for the
normal view of an element; false otherwise. |
boolean |
isInlineDisplay()
Returns
true if the display returned by
StyledView.getDisplay() is an inline-like display;
false if it is a block-like display. |
protected void |
paint(Graphics g,
Color backgroundColor) |
void |
setStyle(Style style) |
addChildViewGadgets, detachingFromModel, executeCommand, getElement, getElementView, getGadgets, getModel, getNonBreakableVerticalRanges, getSettings, getSizeConstraints, getView, grabsMouseButton, handleMouseEvent, isCollapsed, isCollapsible, isTreeView, isTreeViewContainer, layout, paint, paintRelayout, prepareCommand, print, removeChildViewGadgets, setCollapsed
addChild, findGadgetAt, getChild, getChildCount, getChildren, indexOfChild, indexOfChildAt, insertChild, isAncestorOf, paintRelayout, removeAllChildren, removeChild, removeChild, replaceChild, replaceChild
focusGained, focusLost, gadgetToPanel, gadgetToRoot, getAncestors, getBounds, getBounds, getCursor, getEventDispatcher, getFontMetrics, getGadgetPanel, getGraphics, getLocation, getLocation, getRoot, getSize, getSize, getToolkit, getToolTip, handleAppEvent, handleKeyEvent, hasFocus, isAppEventHandler, layout, makeRectangleVisible, makeRectangleVisible, panelToGadget, refresh, relayout, relayout, repaint, repaint, requestFocus
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addChildViewGadgets, getElement, isTreeView, isTreeViewContainer, removeChildViewGadgets
detachingFromModel, getGadgets, getModel
getElementView
getView
public Style getStyle()
Styled
null
.public boolean hasDynamicVerticalMargins()
hasDynamicVerticalMargins
in interface Styled
public int getMarginTop()
Styled
Style.marginTop
,
the returned value is not a static one and may depend on the contents
of this object.
This method is needed to implement collapsed vertical margins in the case of nested boxes.
getMarginTop
in interface Styled
public int getMarginBottom()
Styled
Styled.getMarginTop()
but for the bottom margin.getMarginBottom
in interface Styled
public void initView(ViewParameters param, ViewParameters paramBefore, Style styleBefore, ViewParameters paramAfter, Style styleAfter, StyledViewFactory viewFactory)
StyledElementView
Gadget
s,
themselves implementing the StyledElementViewPart
interface,
which are used to render an element graphically on screen.initView
in interface StyledElementView
public boolean isCustomView()
ElementViewBase
true
if this view is a custom replacement for the
normal view of an element; false
otherwise.isCustomView
in interface ElementViewBase
public StyledElementView getStyledElementView()
StyledElementViewPart
getStyledElementView
in interface StyledElementViewPart
public StyledElementViewPart.Role getRole()
StyledElementViewPart
getRole
in interface StyledElementViewPart
public void detachingViewFromModel(Document document, int viewIndex)
StyledElementViewPart
detachingViewFromModel
in interface StyledElementViewPart
public StyledView.Display getDisplay()
StyledView
getDisplay
in interface StyledView
public boolean isInlineDisplay()
StyledView
true
if the display returned by
StyledView.getDisplay()
is an inline-like display;
false
if it is a block-like display.isInlineDisplay
in interface StyledView
public String getViewToolTip()
StyledView
null
. May return HTML (starts with
"<html>") rather than plain text.getViewToolTip
in interface StyledView
public int getFirstBaseLine()
TextLines
getFirstBaseLine
in interface TextLines
public int getLastBaseLine()
TextLines
getLastBaseLine
in interface TextLines