⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scaletag.java

📁 esri的ArcGIS Server超级学习模板程序(for java)
💻 JAVA
字号:
package com.esri.solutions.jitk.web.faces.taglib;

import javax.faces.component.UIComponent;
import javax.faces.el.ValueBinding;
import javax.faces.webapp.UIComponentTag;

import com.esri.solutions.jitk.web.faces.component.ScaleControl;


/**
 * JSP tag for the {@link TableTag}.
 */
public class ScaleTag extends UIComponentTag {

  private String style = null;
  private String styleClass = null;
  private String value = null;
  
  /**
   * Initializes the tag.
   */
  public ScaleTag() {
	  style = null;
	  styleClass = null;
  }

  /**
   * Resets the attribute values to defaults.
   */
  public void release() {
    super.release();
    style = null;
    styleClass = null;
    value = null;
  }
  
  /**
   * Get style attribute
   */
  public String getStyle(){
	  return this.style;
  }
  
  /**
   * Set style attribute
   * 
   * @param style
   */
  public void setStyle(String style){
	  this.style = style;
  }
  
  /**
   * Get style class attribute
   */
  public String getStyleClass(){
	  return this.styleClass;
  }
  
  /**
   * Set style class attribute
   *
   * @param styleClass
   */
  public void setStyleClass(String styleClass){
	  this.styleClass = styleClass;
  }

  /**
   * Get value attribute
   */
  public String getValue(){
	  return this.value;
  }

  /**
   * Set the value binding expression for the map. The expression must 
   * evaluate to a WebTable.
   * 
   * @param value the value binding expression for the table
   */
  public void setValue(String value) {
    this.value = value;
  }

  /**
   * Return the component type string.
   * @return {@link String}- the component-type as defined in the faces-config.xml file
   */
  public String getComponentType() {
    return ScaleControl.COMPONENT_TYPE;
  }

  /**
   * Return the renderer type.
   * @return {@link String}- the renderer-type as defined in the faces-config.xml file
   */
  public String getRendererType() {
    return null;
  }

  /**
   * Set the attributes of the {@link TableControl} from the tag attributes.
   * @param component the component to override properties
   */
  @SuppressWarnings("unchecked")
protected void setProperties(UIComponent component) {
    super.setProperties(component);
    if (style != null) component.getAttributes().put("style", style);
    if (styleClass != null) component.getAttributes().put("styleClass", styleClass);
    if (value != null){
    	ValueBinding vb = this.getFacesContext().getApplication().createValueBinding(value);
    	component.setValueBinding("value", vb);
    }else{
    	component.getAttributes().put("value", value);
    }
  }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -