Protege 3.0

edu.stanford.smi.protege.widget
Class DefaultWidgetLayoutStrategy

java.lang.Object
  extended byedu.stanford.smi.protege.widget.DefaultWidgetLayoutStrategy
All Implemented Interfaces:
WidgetLayoutStrategy

public class DefaultWidgetLayoutStrategy
extends Object
implements WidgetLayoutStrategy

This class determines the default layout of a form. The original idea was that users could plug in other layouts but I never implemented this and no one has ever asked for it.
The heuristic used for laying out forms is first that strings should come first and then other "small things". "Big things" (such as list boxes) come last. All items are thus grouped by cardinality and then type. This algorithm seems to do a decent job at organizing a form in a reasonable fashion. The implementation of this algorithm is partially delegated to the SlotWidgetComparer which "sorts" the widgets.

Author:
Ray Fergerson

Constructor Summary
DefaultWidgetLayoutStrategy()
           
 
Method Summary
 void layout(Container container, int index)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultWidgetLayoutStrategy

public DefaultWidgetLayoutStrategy()
Method Detail

layout

public void layout(Container container,
                   int index)
Specified by:
layout in interface WidgetLayoutStrategy

toString

public String toString()

Protege 3.0

Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2005 Stanford University.