/** * 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 }; }
case NORTH_WEST: if( horizontal ){ north.remove( cornerComponents[ index ] ); west.remove( cornerComponents[ index ] ); north.remove( cornerComponents[ index ] ); east.remove( cornerComponents[ index ] ); south.remove( cornerComponents[ index ] ); west.remove( cornerComponents[ index ] ); south.remove( cornerComponents[ index ] ); east.remove( cornerComponents[ index ] ); case NORTH_WEST: if( horizontal ){ north.add( component, BorderLayout.WEST ); west.add( component, BorderLayout.NORTH ); north.add( component, BorderLayout.EAST ); east.add( component, BorderLayout.NORTH ); south.add( component, BorderLayout.WEST );
case NORTH_WEST: if( horizontal ){ north.remove( cornerComponents[ index ] ); west.remove( cornerComponents[ index ] ); north.remove( cornerComponents[ index ] ); east.remove( cornerComponents[ index ] ); south.remove( cornerComponents[ index ] ); west.remove( cornerComponents[ index ] ); south.remove( cornerComponents[ index ] ); east.remove( cornerComponents[ index ] ); case NORTH_WEST: if( horizontal ){ north.add( component, BorderLayout.WEST ); west.add( component, BorderLayout.NORTH ); north.add( component, BorderLayout.EAST ); east.add( component, BorderLayout.NORTH ); south.add( component, BorderLayout.WEST );
/** * 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 }; }
/** * Sets the minimum size of the four areas in which minimized {@link Dockable}s * are shown. Clients could also call <code>get'Side'().setMinimumSize( size )</code>.<br> * There is no method <code>getMinimumAreaSize</code> because the result might * not be the same for all stations. * @param size the new minimum size or <code>null</code> to revert to the default * value. * @see FlapDockStation#setMinimumSize(Dimension) * @see FlapDockStation#MINIMUM_SIZE */ public void setMinimumAreaSize( Dimension size ){ north.getStation().setMinimumSize( size ); south.getStation().setMinimumSize( size ); west.getStation().setMinimumSize( size ); east.getStation().setMinimumSize( size ); }
/** * Sets the minimum size of the four areas in which minimized {@link Dockable}s * are shown. Clients could also call <code>get'Side'().setMinimumSize( size )</code>.<br> * There is no method <code>getMinimumAreaSize</code> because the result might * not be the same for all stations. * @param size the new minimum size or <code>null</code> to revert to the default * value. * @see FlapDockStation#setMinimumSize(Dimension) * @see FlapDockStation#MINIMUM_SIZE */ public void setMinimumAreaSize( Dimension size ){ north.getStation().setMinimumSize( size ); south.getStation().setMinimumSize( size ); west.getStation().setMinimumSize( size ); east.getStation().setMinimumSize( size ); }
public MinimizeStation( String id, CLocation location ){ this.location = location; init( control, id ); }
public MinimizeStation( String id, CLocation location ){ this.location = location; init( control, id ); }
/** * Gets the station in the east of this {@link CContentArea} * @return the station in the east */ public FlapDockStation getEast(){ return east.getStation(); }
/** * Gets the station in the east of this {@link CContentArea} * @return the station in the east */ public FlapDockStation getEast(){ return east.getStation(); }
/** * Gets the station in the north of this {@link CContentArea} * @return the station in the north */ public FlapDockStation getNorth(){ return north.getStation(); }
/** * Gets the station in the west of this {@link CContentArea} * @return the station in the west */ public FlapDockStation getWest(){ return west.getStation(); }
/** * Gets the station in the west of this {@link CContentArea} * @return the station in the west */ public FlapDockStation getWest(){ return west.getStation(); }
/** * Gets the station in the south of this {@link CContentArea} * @return the station in the south */ public FlapDockStation getSouth(){ return south.getStation(); }
/** * Gets the station in the north of this {@link CContentArea} * @return the station in the north */ public FlapDockStation getNorth(){ return north.getStation(); }
/** * Gets the station in the south of this {@link CContentArea} * @return the station in the south */ public FlapDockStation getSouth(){ return south.getStation(); }