org.tentackle.fx.rdc.PdoContextMenuFactory Maven / Gradle / Ivy
/*
* Tentackle - https://tentackle.org
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.tentackle.fx.rdc;
import javafx.scene.control.ContextMenu;
import org.tentackle.common.ServiceFactory;
import org.tentackle.pdo.PersistentDomainObject;
interface PdoContextMenuFactoryHolder {
PdoContextMenuFactory INSTANCE = ServiceFactory.createService(PdoContextMenuFactory.class);
}
/**
* A factory for PDO context menus.
* The context menus are used as popups.
*
* @author harald
*/
public interface PdoContextMenuFactory {
/**
* The singleton.
*
* @return the singleton
*/
static PdoContextMenuFactory getInstance() {
return PdoContextMenuFactoryHolder.INSTANCE;
}
/**
* Creates a context menu for a tree cell.
*
* @param the PDO's class
* @param cell the tree cell
* @return the context menu, null if no menu items
*/
> ContextMenu create(PdoTreeCell cell);
/**
* Creates a context menu for a table cell.
*
* @param the table row's type
* @param the table cell's pdo type
* @param cell the table cell
* @return the context menu, null if no menu items
*/
> ContextMenu create(PdoTableCell cell);
/**
* Creates a context menu for a tree table cell.
*
* @param the table row's type
* @param the table cell's pdo type
* @param cell the table cell
* @return the context menu, null if no menu items
*/
> ContextMenu create(PdoTreeTableCell cell);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy