| /** |
| * |
| * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation |
| */ |
| package org.eclipse.osbp.ui.api.datamart; |
| |
| import java.util.Collection; |
| import java.util.List; |
| |
| import org.eclipse.osbp.runtime.common.event.IDualData; |
| |
| import com.vaadin.data.Container; |
| import com.vaadin.data.Property.ValueChangeListener; |
| import com.vaadin.server.Sizeable.Unit; |
| |
| public interface IDatamartSelectable { |
| |
| /** |
| * Checks if is slicer. |
| * |
| * @return true, if is slicer |
| */ |
| boolean isSlicer(); |
| |
| /** |
| * Checks if is multi selected. |
| * |
| * @return true, if is multi selected |
| */ |
| boolean isMultiSelected(); |
| |
| /** |
| * Update the combo box. |
| * |
| * @param options the dual data items |
| */ |
| void update(Collection<IDualData> options); |
| |
| /** |
| * Gets the selected items. |
| * |
| * @return the selected items |
| */ |
| List<IDualData> getSelectedItems(); |
| |
| /** |
| * Gets a selected single value. |
| * |
| * @return the value |
| */ |
| Object getValue(); |
| |
| /** |
| * Gets the first item. |
| * |
| * @return the first item matching |
| */ |
| IDualData getFirstItem(); |
| |
| /** |
| * Gets the hierarchy if any. |
| * |
| * @return the hierarchy |
| */ |
| String getHierarchy(); |
| |
| /** |
| * Sets the hierarchy. |
| * |
| * @param hierarchy the new hierarchy |
| */ |
| void setHierarchy(String hierarchy); |
| |
| /** |
| * Gets the container datasource of the underlying combobox. |
| * |
| * @return the container datasource |
| */ |
| Container getContainerDataSource(); |
| |
| /** |
| * Select an item in the underlying combobox |
| * |
| * @param obj the obj |
| */ |
| void select(Object obj); |
| |
| /** |
| * Adds the value change listener. |
| * |
| * @param listener the listener |
| */ |
| void addValueChangeListener(ValueChangeListener listener); |
| |
| /** |
| * Removes the value change listener. |
| * |
| * @param listener the listener |
| */ |
| void removeValueChangeListener(ValueChangeListener listener); |
| |
| /** |
| * Sets the caption. |
| * |
| * @param caption the new caption |
| */ |
| void setCaption(String caption); |
| |
| /** |
| * Sets the description. |
| * |
| * @param description the new description |
| */ |
| void setDescription(String description); |
| |
| /** |
| * Gets the height. |
| * |
| * @return the height |
| */ |
| float getHeight(); |
| |
| /** |
| * Gets the height units. |
| * |
| * @return the height units |
| */ |
| Unit getHeightUnits(); |
| |
| /** |
| * Sets the width. |
| * |
| * @param width the new width |
| */ |
| void setWidth(String width); |
| |
| } |