Package bibliothek.gui.dock.common.intern

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


  }
 
  @Override
  public void remove( Dockable dockable ){
    if( dockable instanceof CommonDockable ){
      CDockable cdockable = ((CommonDockable)dockable).getDockable();
      String key = control.shouldStore( cdockable );
      if( key != null ){
        addEmpty( key );
      }
    }
View Full Code Here


    public CLocation getDropLocation( CStation<?> station ){
      Dockable[] history = control.getOwner().getController().getFocusHistory().getHistory();
      for( int i = history.length-1; i >= 0; i-- ){
        Dockable next = history[i];
        if( next instanceof CommonDockable && next.asDockStation() != station.getStation() ){
          CDockable cnext = ((CommonDockable)next).getDockable();
         
          if( DockUtilities.isAncestor( station.getStation(), next )){
            boolean valid;
            if( station.isWorkingArea() ){
              valid = cnext.getWorkingArea() == station;
            }
            else{
              valid = cnext.getWorkingArea() == null;
            }
            if( valid ){
              CLocation location = cnext.getBaseLocation();
              if( location != null ){
                return location.aside();
              }
              }
          }
          if( cnext.getWorkingArea() == station ){
            CLocation location = cnext.getBaseLocation();
            if( location != null ){
              return location.aside();
            }
          }
        }
View Full Code Here

  public void resetWorkingAreaChildren(){
    runTransaction( new AffectingRunnable() {
      public void run( AffectedSet set ){
        for( Dockable dockable : listDockables() ){
          if( dockable instanceof CommonDockable ){
            CDockable cdockable = ((CommonDockable)dockable).getDockable();
            resetWorkingArea( cdockable, set );
          }
        }
      }
    });
View Full Code Here

      }
    }
     
   
    if( dockable instanceof CommonDockable ){
      CDockable cdockable = ((CommonDockable)dockable).getDockable();
      KeyedActionSource source = new KeyedActionSource( cdockable, key );
      sources.add( source );
      source.setDefaultAction( getSelectModeAction() );
      source.setVisible( true );
      return source;
View Full Code Here

    }
   

    @Override
    protected FontModifier get( FontModifier value, String id, DockFont observer ) {
        CDockable dockable = getDockable( observer );
        if( dockable == null )
            return value;
       
        return get( value, id, dockable );
    }
View Full Code Here

    DockLayoutInfo info = layout.getLayout();
    if( info != null ){
      DockLayout<?> data = info.getDataLayout();
      if( data != null ){
        if( REPLACEMENT_FACTORY_ID.equals( data.getFactoryID() )){
          CDockable dockable = (CDockable)data.getData();
          visible.add( dockable.intern() );
        }
      }
    }
   
    for( DockLayoutComposition child : layout.getChildren() ){
View Full Code Here

       
        frontend.getController().getRegister().addDockRegisterListener( new DockRegisterAdapter(){
            @Override
            public void dockableRegistered( DockController controller, Dockable dockable ) {
                if( dockable instanceof CommonDockable ){
                    CDockable cdock = ((CommonDockable)dockable).getDockable();
                    CDockableAccess access = accesses.get( cdock );
                    if( access != null ){
                        access.informVisibility( true );
                    }

                    for( CControlListener listener : listeners() )
                        listener.opened( CControl.this, cdock );
                }
            }

            @Override
            public void dockableUnregistered( DockController controller, Dockable dockable ) {
                if( dockable instanceof CommonDockable ){
                    CDockable cdock = ((CommonDockable)dockable).getDockable();
                    CDockableAccess access = accesses.get( cdock );
                    if( access != null ){
                        access.informVisibility( false );
                    }
View Full Code Here

            public void dockableFocused( DockableFocusEvent event ) {
                Dockable oldFocused = event.getOldFocusOwner();
                Dockable newFocused = event.getNewFocusOwner();

                if( oldFocused != null && oldFocused instanceof CommonDockable ){
                    CDockable oldC = ((CommonDockable)oldFocused).getDockable();
                    CDockableAccess access = accesses.get( oldC );
                    if( access != null ){
                        access.getFocusListener().focusLost( oldC );
                    }

                    listenerCollection.getFocusListener().focusLost( oldC );
                }
                if( newFocused != null && newFocused instanceof CommonDockable ){
                    CDockable newC = ((CommonDockable)newFocused).getDockable();
                    CDockableAccess access = accesses.get( newC );
                    if( access != null ){
                        access.getFocusListener().focusGained( newC );
                    }
View Full Code Here

            if( mode == ExtendedMode.MINIMIZED ){
              Dockable[] history = getController().getFocusHistory().getHistory();
              for( int i = history.length-1; i >= 0; i-- ){
                Dockable next = history[i];
                if( next instanceof CommonDockable ){
                  CDockable cdockable = ((CommonDockable)next).getDockable();
                  if( cdockable.getExtendedMode() != ExtendedMode.MINIMIZED ){
                    getController().setFocusedDockable( cdockable.intern(), true );
                  }
                }
              }
            }
          }
View Full Code Here

    private void initInputListener( DockController controller ){
        controller.getKeyboardController().addListener( new KeyboardListener(){
            public boolean keyPressed( DockElement element, KeyEvent event ) {
                if( element instanceof CommonDockable ){
                    CDockable source = ((CommonDockable)element).getDockable();
                    CDockableAccess access = accesses.get( source );
                    if( access != null ){
                        if( access.getKeyboardListener().keyPressed( source, event ))
                            return true;
                    }
                    return listenerCollection.getKeyboardListener().keyPressed( source, event );
                }
                return false;
            }

            public boolean keyReleased( DockElement element, KeyEvent event ) {
                if( element instanceof CommonDockable ){
                    CDockable source = ((CommonDockable)element).getDockable();
                    CDockableAccess access = accesses.get( source );
                    if( access != null ){
                        if( access.getKeyboardListener().keyReleased( source, event ))
                            return true;
                    }
                    return listenerCollection.getKeyboardListener().keyReleased( source, event );
                }
                return false;
            }

            public boolean keyTyped( DockElement element, KeyEvent event ) {
                if( element instanceof CommonDockable ){
                    CDockable source = ((CommonDockable)element).getDockable();
                    CDockableAccess access = accesses.get( source );
                    if( access != null ){
                        if( access.getKeyboardListener().keyTyped( source, event ))
                            return true;
                    }
                    return listenerCollection.getKeyboardListener().keyTyped( source, event );
                }
                return false;
            }

            public DockElement getTreeLocation() {
                return null;
            }         
        });

        controller.getDoubleClickController().addListener( new DoubleClickListener(){
            public boolean process( Dockable dockable, MouseEvent event ) {
                if( dockable instanceof CommonDockable ){
                    CDockable source = ((CommonDockable)dockable).getDockable();
                    CDockableAccess access = accesses.get( source );
                    if( access != null ){
                        if( access.getDoubleClickListener().clicked( source, event ))
                            return true;
                    }
View Full Code Here

TOP

Related Classes of bibliothek.gui.dock.common.intern.CDockable

Copyright © 2018 www.massapicom. 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.