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