API Reference 0.3.24dart_web_toolkit_uiSimpleFace

SimpleFace class

class SimpleFace extends Face {

 String name;
 int faceID;

 SimpleFace(CustomButton customButton, Face delegateTo, this.name, this.faceID) : super(customButton, delegateTo);

 String getName() {
   return name;
 }

 int getFaceID() {
   return faceID;
 }
}

Extends

Face > SimpleFace

Constructors

new SimpleFace(CustomButton customButton, Face delegateTo, String name, int faceID) #

Constructor for <code>Face</code>. Creates a new face that delegates to the supplied face.

@param delegateTo default content provider

docs inherited from Face
SimpleFace(CustomButton customButton, Face delegateTo, this.name, this.faceID) : super(customButton, delegateTo);

Properties

Face delegateTo #

inherited from Face
Face delegateTo

Element face #

inherited from Face
dart_html.Element face

int faceID #

int faceID

String get html #

inherited from Face

Gets the face's contents as html.

@return face's contents as html

String get html => getFace().innerHtml;

void set html(String value) #

inherited from Face

Set the face's contents as html.

@param html html to set as face's contents html

void set html(String value) {
 face = new dart_html.DivElement();
 UiObject.manageElementStyleName(face, STYLENAME_HTML_FACE, true);
 face.innerHtml = value;
 updateButtonFace();
}

String name #

String name

String get text #

inherited from Face

Gets the face's contents as text.

@return face's contents as text

String get text => getFace().text;

void set text(String value) #

inherited from Face

Sets the face's contents as text.

@param text text to set as face's contents

void set text(String value) {
 face = new dart_html.DivElement();
 UiObject.manageElementStyleName(face, STYLENAME_HTML_FACE, true);
 face.text = value;
 updateButtonFace();
}

Methods

Element getFace() #

inherited from Face

Gets the contents associated with this face.

dart_html.Element getFace() {
 if (face == null) {
   if (delegateTo == null) {
     // provide a default face as none was supplied.
     face = new dart_html.DivElement();
     return face;
   } else {
     return delegateTo.getFace();
   }
 } else {
   return face;
 }
}

int getFaceID() #

Gets the ID associated with this face. This will be a bitwise and of all of the attributes that comprise this face.

docs inherited from Face
int getFaceID() {
 return faceID;
}

String getName() #

Get the name of the face. This property is also used as a modifier on the <code>CustomButton</code> style. <p/> For instance, if the <code>CustomButton</code> style is "gwt-PushButton" and the face name is "up", then the CSS class name will be "gwt-PushButton-up".

@return the face's name

docs inherited from Face
String getName() {
 return name;
}

void setImage(Image image) #

inherited from Face

Set the face's contents as an image.

@param image image to set as face contents

void setImage(Image image) {
 face = image.getElement();
 updateButtonFace();
}

String toString() #

inherited from Face

Returns a string representation of this object.

docs inherited from Object
String toString() {
 return this.getName();
}

void updateButtonFace() #

inherited from Face
void updateButtonFace() {
 if (_customButton._curFace != null && _customButton._curFace.getFace() == this.getFace()) {
   _customButton._setCurrentFaceElement(face);
 }
}