MLabel

Description

A MLabel holds a label which can be displayed with a border and a special font.

For the font, the string parameter must conform to the following rules. There are 3 semicolon (;) separating parameters : style, type and height.

  • style : possible values are BOLD, NORMAL and ITALIC or a combination of the 3 separated by | caracter. Ex: style\=BOLD|ITALIC
  • type : possible values are Arial, Courier new, Tahoma, ...
  • height : an integer representing the number of pixels for the height of the characters.
  • Full example : "style\=NORMAL;type\=Tahoma;height\=9"

A simple example

 1    //Tree labels 
 2    new MLabel(container, "========== 1A ==========");
 3    new MLabel(container, "========== 1B ==========");
 4    new MLabel(container, "========== 1C ==========");
 5
 6    //A new column
 7    container.newColumn();
 8
 9    //A label 
10    new MLabel(container, "========== 2A ==========");

API

  • Constructors
MLabel(MonoiContainer container, String label) Constructs a new instance of this class given its parent container, label's text
MLabel(MonoiContainer container, String label, String fontInfo) Constructs a new instance of this class given its parent container, label's text and font's information
MLabel(MonoiContainer container, String label,boolean border) Constructs a new instance of this class given its parent container, label's text and border if true
  • Methods
MLabel getMLabel() Gets the MLabel
Object getValue() Gets the label's value
void setLabelFont(String fontInfo) Sets the label's font
void setValue(Object value) Sets the label's value
void setWidth(int width) Sets the label's width
String toString() Gets the Component's value of String
  • See also superclasses
    • MonoiComponent and MonoiDataComponent

MLabel.jpg (11.6 kB) Frédéric ESNAULT, 02/27/2012 11:41 am