1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.diagram.flag;
14 import java.awt.Shape;
15 import java.awt.geom.Rectangle2D;
17 import org.simantics.db.ReadGraph;
18 import org.simantics.db.exception.DatabaseException;
19 import org.simantics.g2d.elementclass.FlagClass;
20 import org.simantics.g2d.utils.Alignment;
23 * @author Tuukka Lehtonen
25 public interface IFlagType {
28 * @author Tuukka Lehtonen
31 public interface FlagInfo {
34 Rectangle2D getTextArea();
35 FlagClass.Type getType();
36 Alignment getHorizontalAlignment();
37 Alignment getVerticalAlignment();
41 * Reads and calculates information about this flags graphical
44 * @param graph database read access
45 * @return all info gathered up about the flag
46 * @throws DatabaseException
48 FlagInfo getInfo(ReadGraph graph) throws DatabaseException;