net.sf.doolin.gui.layout
Class LayoutManagerService

java.lang.Object
  extended by net.sf.doolin.gui.layout.LayoutManagerService
All Implemented Interfaces:
LayoutService

public class LayoutManagerService
extends Object
implements LayoutService

Layout service based on a LayoutManager.

Author:
Damien Coraboeuf

Constructor Summary
LayoutManagerService()
           
 
Method Summary
 void add(JPanel panel, JComponent component, Object constraint)
          Adds a component to a panel using the given constraint.
 LayoutConstraintAdapter<Object,Object> getConstraintAdapter()
          Gets the constraint adapter.
 LayoutManager getLayoutManager()
          Gets the layout manager.
 void init(JPanel panel)
          Initializes a panel for layout
 void setConstraintAdapter(LayoutConstraintAdapter<Object,Object> constraintAdapter)
          Sets the constraint adapter.
 void setLayoutManager(LayoutManager layoutManager)
          Sets the layout manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayoutManagerService

public LayoutManagerService()
Method Detail

getLayoutManager

public LayoutManager getLayoutManager()
Gets the layout manager.

Returns:
the layout manager

setLayoutManager

public void setLayoutManager(LayoutManager layoutManager)
Sets the layout manager.

Parameters:
layoutManager - the new layout manager

getConstraintAdapter

public LayoutConstraintAdapter<Object,Object> getConstraintAdapter()
Gets the constraint adapter.

Returns:
the constraint adapter

setConstraintAdapter

public void setConstraintAdapter(LayoutConstraintAdapter<Object,Object> constraintAdapter)
Sets the constraint adapter.

Parameters:
constraintAdapter - the constraint adapter

add

public void add(JPanel panel,
                JComponent component,
                Object constraint)
Adds a component to a panel using the given constraint.

Specified by:
add in interface LayoutService
Parameters:
panel - Container
component - Component to add
constraint - Constraint for the position

init

public void init(JPanel panel)
Initializes a panel for layout

Specified by:
init in interface LayoutService
Parameters:
panel - Panel to initialize.


Copyright © 2011. All Rights Reserved.