memberselectionmodel.java

来自「OLAP 的客户端代码」· Java 代码 · 共 49 行

JAVA
49
字号
/*
 * ====================================================================
 * This software is subject to the terms of the Common Public License
 * Agreement, available at the following URL:
 *   http://www.opensource.org/licenses/cpl.html .
 * Copyright (C) 2003-2004 TONBELLER AG.
 * All Rights Reserved.
 * You must accept the terms of that agreement to use this software.
 * ====================================================================
 *
 * 
 */
package com.tonbeller.jpivot.navigator.member;

import com.tonbeller.jpivot.olap.model.Member;
import com.tonbeller.wcf.selection.DefaultSelectionModel;

/**
 * A SelectionModel that allows only <code>Members</code> to be selected.
 * The Model may contain objects of other types but only Members are
 * selectable.
 * @author av
 */
public class MemberSelectionModel extends DefaultSelectionModel {

  /**
   * Constructor for MemberSelectionModel.
   */
  public MemberSelectionModel() {
    super();
  }

  /**
   * Constructor for MemberSelectionModel.
   * @param mode
   */
  public MemberSelectionModel(int mode) {
    super(mode);
  }

  /**
   * true if item is a member
   */
  public boolean isSelectable(Object item) {
    return super.isSelectable(item) && item instanceof Member;
  }

}

⌨️ 快捷键说明

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