blob: e833c6c9ffa3d1bd04209f24098dd44ee04147cd [file] [log] [blame]
/*
*
* 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
*
* Initial contribution:
* Loetz GmbH & Co. KG
*
*/
package org.eclipse.osbp.vaaclipse.addons.softwarefactory.userfilter;
import javax.inject.Inject;
import javax.inject.Named;
import org.eclipse.e4.core.contexts.IEclipseContext;
import org.eclipse.e4.ui.model.application.ui.advanced.MPerspective;
import org.eclipse.osbp.ui.api.contextfunction.IVaadinDialogProvider;
//import org.eclipse.osbp.vaaclipse.publicapi.change.ChangeCommand;
import org.eclipse.osbp.vaaclipse.publicapi.theme.ThemeEngine;
import org.eclipse.osbp.vaadin.optiondialog.OptionDialog;
import org.eclipse.osbp.vaadin.optiondialog.OptionDialog.ComponentProvider;
import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.data.Property.ValueChangeListener;
import com.vaadin.ui.Component;
// TODO: Auto-generated Javadoc
//import org.eclipse.emf.ecore.EObject;
/**
* The Class UserAccountFilterDialogContent.
*/
@SuppressWarnings({ "serial", "restriction" })
public class UserAccountFilterDialogContent implements ComponentProvider,
ValueChangeListener {
// public static final int OPTION_OK = 0;
// public static final int OPTION_CANCEL = 1;
/** The context. */
@Inject
IEclipseContext context;
/** The theme engine. */
@Inject
ThemeEngine themeEngine;
/** The filter menu provider. */
@Inject
@Named("UserFilter")
private IVaadinDialogProvider filterMenuProvider;
// @Inject
// private ResourceInfoProvider resourceInfoProvider;
//
// @Inject
// private IModelingContext modelingContext;
/** The option dialog. */
private OptionDialog optionDialog;
/** The current perspective. */
private MPerspective currentPerspective;
/**
* Gets the current perspective.
*
* @return the current perspective
*/
public MPerspective getCurrentPerspective() {
return currentPerspective;
}
/* (non-Javadoc)
* @see org.eclipse.osbp.vaadin.optiondialog.OptionDialog.ComponentProvider#getComponent(org.eclipse.osbp.vaadin.optiondialog.OptionDialog)
*/
@Override
public Component getComponent(OptionDialog optionDialog) {
this.optionDialog = optionDialog;
return filterMenuProvider.getDialog();
}
/* (non-Javadoc)
* @see com.vaadin.data.Property.ValueChangeListener#valueChange(com.vaadin.data.Property.ValueChangeEvent)
*/
@Override
public void valueChange(ValueChangeEvent event) {
if (optionDialog == null) {
return;
}
}
/* (non-Javadoc)
* @see org.eclipse.osbp.vaadin.optiondialog.OptionDialog.OptionListener#optionSelected(org.eclipse.osbp.vaadin.optiondialog.OptionDialog, int)
*/
@Override
public void optionSelected(OptionDialog optionDialog, int optionId) {
// if (optionId == OPTION_OK) {
//
// // optionDialog.close();
//
// } else if (optionId == OPTION_CANCEL)
// optionDialog.close();
}
/* (non-Javadoc)
* @see org.eclipse.osbp.vaadin.optiondialog.OptionDialog.ComponentProvider#setMessage(java.lang.String)
*/
@Override
public void setMessage(String message) {
}
}