Examples of CDockable


Examples of bibliothek.gui.dock.common.intern.CDockable

              }
              return false;
            }
            public boolean ignoreElement( DockElement element ) {
                if( element instanceof CommonDockable ){
                    CDockable cdockable = ((CommonDockable)element).getDockable();
                    if( cdockable.getWorkingArea() != null )
                        return true;
                }
                return false;
            }
            public boolean ignoreElement( PerspectiveElement element ){
View Full Code Here

Examples of bibliothek.gui.dock.common.intern.CDockable

    public PerspectiveElement get( String id, DockElement element, boolean isRootStation ){
      if( isRootStation ){
        return perspective.getStation( id ).intern();
      }
      else if( element instanceof CommonDockable ){
        CDockable dockable = ((CommonDockable)element).getDockable();
        if( dockable.asStation() != null ){
          CStationPerspective station = perspective.getStation( dockable.asStation().getUniqueId() );
          if( station == null ){
            throw new IllegalArgumentException( "Found a non-root CStation that is not registered: " + dockable.asStation().getUniqueId() );
          }
          return station.intern();
        }
       
        if( dockable instanceof SingleCDockable ){
View Full Code Here

Examples of bibliothek.gui.dock.common.intern.CDockable

    List<CDockable> result = new ArrayList<CDockable>();
    Dockable[] dockables = history.getHistory();
    for( int i = dockables.length-1; i >= 0; i-- ){
      Dockable dockable = dockables[i];
      if( dockable instanceof CommonDockable ){
        CDockable cdockable = ((CommonDockable)dockable).getDockable();
        result.add( cdockable );
      }
    }
    return result.toArray( new CDockable[ result.size() ] );
  }
View Full Code Here

Examples of bibliothek.gui.dock.common.intern.CDockable

     * @param dockables a list of {@link SingleCDockable}s and {@link MultipleCDockable}s.
     */
    public void add( double x, double y, double width, double height, CDockable... dockables ){
        Dockable[] intern = new Dockable[ dockables.length ];
        for( int i = 0; i < intern.length; i++ ){
            CDockable dockable = dockables[i];
            if( control != null ){
                if( dockable instanceof SingleCDockable ){
                    control.addDockable( (SingleCDockable)dockable );
                }
                else if( dockable instanceof MultipleCDockable ){
                  if( dockable.getControl() == null ){
                    control.addDockable( (MultipleCDockable)dockable );
                  }
                }
            }
           
            intern[i] = dockable.intern();
        }
       
        grid.addDockable( x, y, width, height, intern );
    }
View Full Code Here

Examples of bibliothek.gui.dock.common.intern.CDockable

     */
    protected abstract Color convertFocused( Color source, String key );
   
    @Override
    protected Color get( Color color, String id, DockColor observer ) {
        CDockable dockable = getDockable( observer );
        if( dockable != null ){
            return get( color, id, dockable );
        }
       
        return color;
View Full Code Here

Examples of bibliothek.gui.dock.common.intern.CDockable

     * @param dockable some element
     * @return the size request or <code>null</code>
     */
    protected RequestDimension getAndClearResizeRequest( Dockable dockable ){
        if( dockable instanceof CommonDockable ){
            CDockable cdock = ((CommonDockable)dockable).getDockable();
            RequestDimension result = cdock.getAndClearResizeRequest();
            if( result == null )
                return null;
           
            return result.clone();
        }
View Full Code Here

Examples of bibliothek.gui.dock.common.intern.CDockable

        return size;
    }
   
    private int getMaxSize( Dockable dockable, boolean horizontal ){
        if( dockable instanceof CommonDockable ){
            CDockable cdock = ((CommonDockable)dockable).getDockable();
            Dimension size = cdock.getMinimizedSize();
            if( horizontal )
                return size.height;
            else
                return size.width;
        }
View Full Code Here

Examples of bibliothek.gui.dock.common.intern.CDockable

   
    public void setSize( FlapDockStation station, Dockable dockable, int size ) {
        if( dockable instanceof CommonDockable ){
            Direction direction = station.getDirection();
            boolean horizontal = direction == Direction.NORTH || direction == Direction.SOUTH;
            CDockable cdock = ((CommonDockable)dockable).getDockable();
            Dimension dimension = cdock.getMinimizedSize();
            if( horizontal ){
              cdock.setMinimizedSize( new Dimension( dimension.width, size ) );
            }
            else{
              cdock.setMinimizedSize( new Dimension( size, dimension.height ) );
            }
        }
        else{
            sizes.put( dockable, size );
        }
View Full Code Here

Examples of bibliothek.gui.dock.common.intern.CDockable

     * @param dockable the element to test
     * @return <code>true</code> if the height is locked
     */
    private boolean isLockedVertically( Dockable dockable ){
        if( dockable instanceof CommonDockable ){
            CDockable cdock = ((CommonDockable)dockable).getDockable();
            return cdock.isResizeLockedVertically();
        }
        if( dockable != null && dockable.asDockStation() instanceof StackDockStation ){
            StackDockStation station = (StackDockStation)dockable.asDockStation();
            for( int i = 0, n = station.getDockableCount(); i<n; i++ ){
                if( isLockedVertically( station.getDockable( i ) ))
View Full Code Here

Examples of bibliothek.gui.dock.common.intern.CDockable

     * @param dockable the element to test
     * @return <code>true</code> if the width is locked
     */
    private boolean isLockedHorizontally( Dockable dockable ){
        if( dockable instanceof CommonDockable ){
            CDockable cdock = ((CommonDockable)dockable).getDockable();
            return cdock.isResizeLockedHorizontally();
        }
        if( dockable != null && dockable.asDockStation() instanceof StackDockStation ){
            StackDockStation station = (StackDockStation)dockable.asDockStation();
            for( int i = 0, n = station.getDockableCount(); i<n; i++ ){
                if( isLockedHorizontally( station.getDockable( i ) ))
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.