Skip to content
greipadmin edited this page Jan 21, 2019 · 10 revisions

Introduction

Tile is a powerful widget with many formatted text sections in combination with a graphical decorator.

Constructor

  • Tile(Composite parent, int style)
    • parent the parent Composite
    • style reserved for future use, only SWT.NONE allowed

Methods

Decorator methods

  • void setDecorator(IDecorator decorator) sets the decorator (see Decorators)
  • IDecorator getDecorator() gets the current decorator
  • void setDecoratorAlignment(int alignment) sets the alignment of the decorator
  • int getDecoratorAlignment() returns the decorator alignment
  • void setDecoratorCursor(Cursor cursor) sets the used cursor when mouse hovers the decorator
  • Cursor getDecoratorCursor() gets the defined cursor
  • void setDecoratorSpacing(int decoratorSpacing) defines the distance between decorator and text sections
  • int getDecoratorSpacing() gets the defined distance between decorator and text sections

Text section methods

  • void addSection(String text, int alignment [, Font font, Color foreground, boolean wrap]) add a new text section
  • void removeSection(int index) remove a text section
  • void removeAllSections() remove all text sections
  • void setAlignment(int index, int alignment) change the alignment of the text section identified by index
  • int getAlignment(int index) gets the text sections alignment
  • void setFont(int index, Font font) sets the font of the text section identified by index
  • Font getFont(int index) returns the text sections font
  • void setForeground(int index, Color foreground) sets the text sections text color
  • Color getForeground(int index) returns the text sections text color
  • void setText(int index, String text) change the textual content of the text section identified by index
  • String getText(int index) gets the textual content
  • void setTextSpacing(int textSpacing) sets the spacing between two text sections
  • int getTextSpacing() gets the defined text spacing
  • void setWrap(int index, boolean wrap) enables or disables line wrapping
  • boolean isWrap(int index) returns whether or not line wrapping is enabled
  • void addSelectionListener(SelectionListener listener) adds a listener that is called by clicking links
  • void removeSelectionListener(SelectionListener listener) removes a listener

Other methods

  • void setBorderColor(Color borderColor) sets the controls border color
  • Color getBorderColor() gets the defined border color
  • void setBorderWidth(int borderWith) sets the witdh of the border
  • int getBorderWidth() returns the border width
  • void setEdgeRadius(int edgeRadius) sets the radius of rounded edges when the border line is drawn
  • int getEdgesRadius() returns the defined radius
  • void setHighlight(boolean highlight) enables or disables highlighting on mose over
  • boolean isHighlight() returns whether or not highlighting is enabled
  • void setMargins(int marginWidth, int marginHeight) defines the controls margin width and height
  • Point getMargins() returns the margins
Clone this wiki locally