All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.ennwifi.webframe.ui.client.common.RowOperator Maven / Gradle / Ivy

There is a newer version: 2.3.0
Show newest version
package cn.ennwifi.webframe.ui.client.common;

import cn.mapway.ui.client.widget.common.PrimaryButton;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.ui.Widget;
import com.ksyzt.gwt.client.common.MessageComposite;
import com.ksyzt.gwt.client.event.MessageEvent;

/**
 * 数据库行操作
 *
 * @author zhangjianshe
 */
public class RowOperator extends MessageComposite {

  private static RowOperatorUiBinder uiBinder = GWT.create(RowOperatorUiBinder.class);

    /**
     * The interface Row operator ui binder.
     */
    interface RowOperatorUiBinder extends UiBinder {
  }

    /**
     * Instantiates a new Row operator.
     */
    public RowOperator() {
    initWidget(uiBinder.createAndBindUi(this));
  }

    /**
     * The M data.
     */
    Object mData;

    /**
     * Sets data.
     *
     * @param obj the obj
     */
    public void setData(Object obj) {
    mData = obj;
  }

    /**
     * Gets data.
     *
     * @return the data
     */
    public Object getData() {
    return mData;
  }

    /**
     * The Btn editor.
     */
    @UiField
  PrimaryButton btnEditor;

    /**
     * The Btn delete.
     */
    @UiField
  PrimaryButton btnDelete;

    /**
     * On editor.
     *
     * @param e the e
     */
    @UiHandler("btnEditor")
  void onEditor(ClickEvent e) {
    MessageEvent ev = new MessageEvent(MessageEvent.EDIT, mData);
    fireEvent(ev);
  }

    /**
     * On delete.
     *
     * @param e the e
     */
    @UiHandler("btnDelete")
  void onDelete(ClickEvent e) {
    MessageEvent ev = new MessageEvent(MessageEvent.DELETE, mData);
    fireEvent(ev);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy