Tabnine Logo
DefaultFocusRequest.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
bibliothek.gui.dock.control.focus.DefaultFocusRequest
constructor

Best Java code snippets using bibliothek.gui.dock.control.focus.DefaultFocusRequest.<init> (Showing top 20 results out of 315)

origin: xyz.cofe/docking-frames-core

/**
 * Sets the {@link Dockable} which should have the focus. This is identical of calling
 * {@link #setFocusedDockable(FocusRequest)} with a new {@link DefaultFocusRequest}.
 * @param focusedDockable the element with the focus or <code>null</code>
 * @param force <code>true</code> if this controller must ensure
 * that all properties are correct, <code>false</code> if some
 * optimizations are allowed. Clients normally can set this argument
 * to <code>false</code>.
 */
public void setFocusedDockable( Dockable focusedDockable, boolean force ) {
  setFocusedDockable( new DefaultFocusRequest( focusedDockable, force ) );
}

origin: xyz.cofe/docking-frames-core

public FocusVeto setFocusedDockable( DockElementRepresentative source, Component component, boolean force, boolean ensureFocusSet, boolean ensureDockableFocused ){
  DefaultFocusRequest request = new DefaultFocusRequest( source, component, force, ensureFocusSet, ensureDockableFocused );
  focus( request );
  return request.getVeto();
}

origin: org.opentcs.thirdparty.dockingframes/docking-frames-core

@Override
public void dockableUnregistered( DockController controller, Dockable dockable ){
  if( dockable == controller.getFocusedDockable() )
    controller.setFocusedDockable( new DefaultFocusRequest( null, null, false ));
}
  
origin: org.opentcs.thirdparty.dockingframes/docking-frames-core

/**
 * Close the currently open popup window and changes the focused
 * {@link Dockable} to <code>dockable</code>.
 * @param dockable the element that will own the focus
 */
public void stop( Dockable dockable ){
  close();
  controller.setFocusedDockable( new DefaultFocusRequest( dockable, null, false ));
}

origin: xyz.cofe/docking-frames-core

@Override
public void dockableUnregistered( DockController controller, Dockable dockable ){
  if( dockable == controller.getFocusedDockable() )
    controller.setFocusedDockable( new DefaultFocusRequest( null, null, false ));
}
  
origin: org.opentcs.thirdparty.dockingframes/docking-frames-core

public FocusVeto setFocusedDockable( DockElementRepresentative source, Component component, boolean force, boolean ensureFocusSet, boolean ensureDockableFocused ){
  DefaultFocusRequest request = new DefaultFocusRequest( source, component, force, ensureFocusSet, ensureDockableFocused );
  focus( request );
  return request.getVeto();
}

origin: xyz.cofe/docking-frames-core

/**
 * Close the currently open popup window and changes the focused
 * {@link Dockable} to <code>dockable</code>.
 * @param dockable the element that will own the focus
 */
public void stop( Dockable dockable ){
  close();
  controller.setFocusedDockable( new DefaultFocusRequest( dockable, null, false ));
}

origin: xyz.cofe/docking-frames-core

/**
 * Sets the {@link Dockable} which should have the focus.
 * @param focusedDockable the element with the focus or <code>null</code>
 * @param component the {@link Component} which should receive the focus, can be <code>null</code>.
 * See {@link FocusController#setFocusedDockable(DockElementRepresentative, Component, boolean, boolean, boolean)}.
 * @param force <code>true</code> if this controller must ensure
 * that all properties are correct, <code>false</code> if some
 * optimizations are allowed. Clients normally can set this argument
 * to <code>false</code>.
 * @deprecated clients should use {@link #setFocusedDockable(FocusRequest)} instead
 */
@Deprecated
@Todo( compatibility=Compatibility.BREAK_MAJOR, description="remove this method", priority=Todo.Priority.ENHANCEMENT,
  target=Version.VERSION_1_1_3)
public void setFocusedDockable( Dockable focusedDockable, Component component, boolean force ) {
  setFocusedDockable( new DefaultFocusRequest( focusedDockable, component, force ) );
}
origin: xyz.cofe/docking-frames-core

/**
 * Sets the {@link Dockable} which should have the focus.
 * @param focusedDockable the element with the focus or <code>null</code>
 * @param component the {@link Component} which should receive the focus, can be <code>null</code>.
 * See {@link FocusController#setFocusedDockable(DockElementRepresentative, Component, boolean, boolean, boolean)}.
 * @param force <code>true</code> if this controller must ensure
 * that all properties are correct, <code>false</code> if some
 * optimizations are allowed. Clients normally can set this argument
 * to <code>false</code>.
 * @param ensureFocusSet if <code>true</code>, then this method should make sure that either <code>focusedDockable</code>
 * itself or one of its {@link DockElementRepresentative} is the focus owner 
 * @param ensureDockableFocused  if <code>true</code>, then this method should make sure that <code>focusedDockable</code>
 * is the focus owner. This parameter is stronger that <code>ensureFocusSet</code>
 * @deprecated clients should use {@link #setFocusedDockable(FocusRequest)} instead
 */
@Deprecated
@Todo( compatibility=Compatibility.BREAK_MAJOR, description="remove this method", priority=Todo.Priority.ENHANCEMENT,
  target=Version.VERSION_1_1_3)
public void setFocusedDockable( Dockable focusedDockable, Component component, boolean force, boolean ensureFocusSet, boolean ensureDockableFocused ) {
  setFocusedDockable( new DefaultFocusRequest( focusedDockable, component, force, ensureFocusSet, ensureDockableFocused ) );
}

origin: xyz.cofe/docking-frames-core

/**
 * Sets the focused {@link Dockable}. Nothing happens if <code>focusedDockable</code>
 * is a station and one of its children already has the focus.
 * @param focusedDockable the element which should have the focus
 * @param component the {@link Component} which should receive the focus, can be <code>null</code>.
 * See {@link FocusController#setFocusedDockable(DockElementRepresentative, Component, boolean, boolean, boolean)}.
 * @see #isOnFocusing()
 */
public void setAtLeastFocusedDockable( Dockable focusedDockable, Component component ) {
  Dockable current = getFocusedDockable();
  
  if( current == null ){
    setFocusedDockable( new DefaultFocusRequest( focusedDockable, component, false ) );
  }
  else if( !DockUtilities.isAncestor( focusedDockable, current )){
    setFocusedDockable( new DefaultFocusRequest( focusedDockable, component, false ) );
  }
}

origin: nroduit/Weasis

public void setSelectedAndGetFocus() {
  UIManager.DOCKING_CONTROL.getController()
    .setFocusedDockable(new DefaultFocusRequest(dockable.intern(), this, false, true, false));
}
origin: xyz.cofe/docking-frames-core

@Override
public void dockableAdded( DockStation station, Dockable dockable ){
  if( !controller.getRelocator().isOnPut() ){
    Dockable focusedDockable = controller.getFocusedDockable();
    if( dockable == focusedDockable || focusedDockable == null ){
      if( dockable.isDockableShowing() ){
        controller.setFocusedDockable( new DefaultFocusRequest( dockable, null, true ));
      }
    }
  }
}

origin: xyz.cofe/docking-frames-core

  public void run(){
    DockElementRepresentative element = getDockable( component, event );
    if( element != null ){
      Dockable dock = element.getElement().asDockable();
      if( dock != null ){
        controller.setFocusedDockable( new DefaultFocusRequest( dock, component, false, ensureFocus, element.shouldTransfersFocus() ));
      }
    }
  }
});
origin: org.opentcs.thirdparty.dockingframes/docking-frames-core

  public void run(){
    DockElementRepresentative element = getDockable( component, event );
    if( element != null ){
      Dockable dock = element.getElement().asDockable();
      if( dock != null ){
        controller.setFocusedDockable( new DefaultFocusRequest( dock, component, false, ensureFocus, element.shouldTransfersFocus() ));
      }
    }
  }
});
origin: org.opentcs.thirdparty.dockingframes/docking-frames-core

@Override
public void dockableAdded( DockStation station, Dockable dockable ){
  if( !controller.getRelocator().isOnPut() ){
    Dockable focusedDockable = controller.getFocusedDockable();
    if( dockable == focusedDockable || focusedDockable == null ){
      if( dockable.isDockableShowing() ){
        controller.setFocusedDockable( new DefaultFocusRequest( dockable, null, true ));
      }
    }
  }
}

origin: xyz.cofe/docking-frames-common

/**
 * Tries to focus this dockable, and then ensures that the {@link Component} <code>focus</code> actually gets the focus.<br>
 * The behavior of this method is not defined for the case where <code>focus</code> is not a child of <code>this</code>.<br>
 * There is no guarantee of success, this methods fails silently if the focus cannot be gained.
 * @param focus a child of this dockable, not <code>null</code>
 * @see #toFront()
 */
public void toFront( Component focus ){
  if( isVisible() ){
    FocusRequest request = new DefaultFocusRequest( intern(), focus, true, true, true, true );
    control.getOwner().intern().getController().setFocusedDockable( request );
  }
}

origin: org.opentcs.thirdparty.dockingframes/docking-frames-common

/**
 * Tries to focus this dockable. In order to gain focus this dockable must at least be visible, additional
 * restrictions exist, like gaining focus takes some time during which no other dockable must ask for the
 * focus. This method is best used to highlight existing dockables, but not while building 
 * a new layout (look at methods like {@link CGrid#select(double, double, double, double, CDockable) CGrid.select} 
 * to select a dockable in a stack while building a layout).<br>
 * There is no guarantee of success, this methods fails silently if the focus cannot be gained.
 */
public void toFront(){
  if( isVisible() ){
    FocusRequest request = new DefaultFocusRequest( intern(), null, false, true, false, true );
    control.getOwner().intern().getController().setFocusedDockable( request );
  }
}
 
origin: xyz.cofe/docking-frames-common

/**
 * Tries to focus this dockable. In order to gain focus this dockable must at least be visible, additional
 * restrictions exist, like gaining focus takes some time during which no other dockable must ask for the
 * focus. This method is best used to highlight existing dockables, but not while building 
 * a new layout (look at methods like {@link CGrid#select(double, double, double, double, CDockable) CGrid.select} 
 * to select a dockable in a stack while building a layout).<br>
 * There is no guarantee of success, this methods fails silently if the focus cannot be gained.
 */
public void toFront(){
  if( isVisible() ){
    FocusRequest request = new DefaultFocusRequest( intern(), null, false, true, false, true );
    control.getOwner().intern().getController().setFocusedDockable( request );
  }
}

origin: xyz.cofe/docking-frames-core

public void selectionChanged( StackDockComponent stack ){
  if( !ignoreSelectionChanges ){
    DockController controller = getController();
    if( controller != null && !updatingTheme ){
      Dockable selection = getFrontDockable();
      if( selection != null && !controller.getRelocator().isOnPut() ){
        controller.setFocusedDockable( new DefaultFocusRequest( selection, null, false ));
      }
      
      fireDockableSelected();
    }
    
    visibility.fire();
  }
}

origin: xyz.cofe/docking-frames-core

  @Override
  public void mouseReleased( MouseEvent e ){
    if( dockable.getDockParent() == FlapDockStation.this ){
      final int MASK = InputEvent.BUTTON1_DOWN_MASK | InputEvent.BUTTON2_DOWN_MASK | InputEvent.BUTTON3_DOWN_MASK;
      DisablingStrategy strategy = disablingStrategy.getValue();
      boolean enabled = strategy == null || (!strategy.isDisabled( dockable ) && !strategy.isDisabled( FlapDockStation.this ));
      
      if( enabled && e.getButton() == MouseEvent.BUTTON1 && (e.getModifiersEx() & MASK ) == 0 ){
        int index = indexOf( dockable );
        if( index < 0 )
          return;
        
        DockableHandle handle = handles.dockables().get( index );
        DockTitle title = handle.getTitle();
        
        if( getFrontDockable() == dockable && title.isActive() ){
          getController().setFocusedDockable( new DefaultFocusRequest( FlapDockStation.this, null, true ));
          setFrontDockable( null );
        }
        else
          getController().setFocusedDockable( new DefaultFocusRequest( dockable, null, true ));
      }
    }
  }
}
bibliothek.gui.dock.control.focusDefaultFocusRequest<init>

Javadoc

Creates a new request for setting the focused Dockable.

Popular methods of DefaultFocusRequest

  • getVeto
    Tells whether the FocusVetoListeners approved of this request.
  • getDockable
  • isHardRequest

Popular in Java

  • Creating JSON documents from java classes using gson
  • getApplicationContext (Context)
  • getContentResolver (Context)
  • getSystemService (Context)
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • JCheckBox (javax.swing)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now