1
|
/*******************************************************************************
|
2
|
* Copyright 2005, CHISEL Group, University of Victoria, Victoria, BC, Canada.
|
3
|
* All rights reserved. This program and the accompanying materials are made
|
4
|
* available under the terms of the Eclipse Public License v1.0 which
|
5
|
* accompanies this distribution, and is available at
|
6
|
* http://www.eclipse.org/legal/epl-v10.html
|
7
|
*
|
8
|
* Contributors: The Chisel Group, University of Victoria
|
9
|
*******************************************************************************/
|
10
|
package org.eclipse.zest.layouts;
|
11
|
|
12
|
import org.eclipse.zest.layouts.constraints.LayoutConstraint;
|
13
|
|
14
|
/**
|
15
|
* This represents a single entity, providing the layout algorithms with
|
16
|
* a common interface to run on.
|
17
|
*
|
18
|
* @author Casey Best
|
19
|
* @author Ian Bull
|
20
|
* @author Chris Bennett
|
21
|
*/
|
22
|
public interface LayoutEntity extends Comparable, LayoutItem {
|
23
|
|
24
|
public final static String ATTR_PREFERRED_WIDTH = "tree-preferred-width";
|
25
|
public final static String ATTR_PREFERRED_HEIGHT = "tree-preferred-height";
|
26
|
|
27
|
public void setLocationInLayout(double x, double y);
|
28
|
|
29
|
public void setSizeInLayout(double width, double height);
|
30
|
|
31
|
public double getXInLayout();
|
32
|
|
33
|
public double getYInLayout();
|
34
|
|
35
|
public double getWidthInLayout();
|
36
|
|
37
|
public double getHeightInLayout();
|
38
|
|
39
|
public Object getLayoutInformation();
|
40
|
|
41
|
public void setLayoutInformation(Object internalEntity);
|
42
|
|
43
|
/**
|
44
|
* Classes should update the specified layout constraint if recognized
|
45
|
* @return
|
46
|
*/
|
47
|
public void populateLayoutConstraint(LayoutConstraint constraint);
|
48
|
}
|