/** * Creates a new content area. * @param control the control for which this area will be used * @param uniqueId a unique identifier of this center */ public CContentArea( CControl control, String uniqueId ){ this.control = control; this.uniqueId = uniqueId; CBaseLocation base = new CBaseLocation( this ); center = new CenterStation( getCenterIdentifier(), base.normal() ); north = new MinimizeStation( getNorthIdentifier(), new CMinimizedLocation( base, Side.NORTH ) ); south = new MinimizeStation( getSouthIdentifier(), new CMinimizedLocation( base, Side.SOUTH ) ); east = new MinimizeStation( getEastIdentifier(), new CMinimizedLocation( base, Side.EAST ) ); west = new MinimizeStation( getWestIdentifier(), new CMinimizedLocation( base, Side.WEST ) ); center.getStation().setExpandOnDoubleclick( false ); north.setDirection( Direction.SOUTH ); south.setDirection( Direction.NORTH ); east.setDirection( Direction.WEST ); west.setDirection( Direction.EAST ); setLayout( new BorderLayout() ); add( center.getStation(), BorderLayout.CENTER ); add( north, BorderLayout.NORTH ); add( south, BorderLayout.SOUTH ); add( east, BorderLayout.EAST ); add( west, BorderLayout.WEST ); stations = new CStation[]{ north, south, east, west, center }; }
/** * Creates a new content area. * @param control the control for which this area will be used * @param uniqueId a unique identifier of this center */ public CContentArea( CControl control, String uniqueId ){ this.control = control; this.uniqueId = uniqueId; CBaseLocation base = new CBaseLocation( this ); center = new CenterStation( getCenterIdentifier(), base.normal() ); north = new MinimizeStation( getNorthIdentifier(), new CMinimizedLocation( base, Side.NORTH ) ); south = new MinimizeStation( getSouthIdentifier(), new CMinimizedLocation( base, Side.SOUTH ) ); east = new MinimizeStation( getEastIdentifier(), new CMinimizedLocation( base, Side.EAST ) ); west = new MinimizeStation( getWestIdentifier(), new CMinimizedLocation( base, Side.WEST ) ); center.getStation().setExpandOnDoubleclick( false ); north.setDirection( Direction.SOUTH ); south.setDirection( Direction.NORTH ); east.setDirection( Direction.WEST ); west.setDirection( Direction.EAST ); setLayout( new BorderLayout() ); add( center.getStation(), BorderLayout.CENTER ); add( north, BorderLayout.NORTH ); add( south, BorderLayout.SOUTH ); add( east, BorderLayout.EAST ); add( west, BorderLayout.WEST ); stations = new CStation[]{ north, south, east, west, center }; }