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

The following examples show how to use bibliothek.gui.dock.common.intern.CDockable. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DrawingViewFocusHandler.java    From openAGV with Apache License 2.0 5 votes vote down vote up
@Override
public void focusGained(CDockable dockable) {
  DrawingViewScrollPane scrollPane = viewManager.getDrawingViewMap().get(dockable);
  if (scrollPane == null) {
    return;
  }
  OpenTCSDrawingView drawView = scrollPane.getDrawingView();
  drawingEditor.setActiveView(drawView);
  // XXX Looks suspicious: Why are the same values set again here?
  drawView.setConstrainerVisible(drawView.isConstrainerVisible());
  drawView.setLabelsVisible(drawView.isLabelsVisible());
  scrollPane.setRulersVisible(scrollPane.isRulersVisible());
  drawView.setBlocksVisible(drawView.isBlocksVisible());
  drawView.dispatchEvent(new FocusEvent(scrollPane, FocusEvent.FOCUS_GAINED));
}
 
Example #2
Source File: DockingFrame.java    From Rails with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Deploys to the frame all dockables that have been added before.
 * Dockables are initially set to invisible if this is as specified
 */
protected void deployDockables() {
    control.getContentArea().deploy( gridLayout );
    for (CDockable d : dockables_initiallyHidden) {
        if (d.isCloseable()) d.setVisible(false);
    }
}
 
Example #3
Source File: DockingFrame.java    From Rails with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Ensure that externalized dockable does not have default maximize button
 * (as it won't work for the adjusted externalization setup).
 * @param d Dockable for which the actions are to be adjusted
 */
private void adjustExternalizedActions(CDockable d) {
    if (d instanceof DefaultSingleCDockable) {
        DefaultSingleCDockable sd = (DefaultSingleCDockable)d;
        if (ExtendedMode.EXTERNALIZED.equals(sd.getExtendedMode())) {
            sd.putAction( CDockable.ACTION_KEY_MAXIMIZE, CBlank.BLANK );
        } else {
            sd.putAction( CDockable.ACTION_KEY_MAXIMIZE, null );
        }
    }
}
 
Example #4
Source File: CStackDockStation.java    From openAGV with Apache License 2.0 4 votes vote down vote up
@Override
public CDockable getDockable() {
  return delegate;
}
 
Example #5
Source File: DrawingViewFocusHandler.java    From openAGV with Apache License 2.0 4 votes vote down vote up
@Override
public void focusLost(CDockable dockable) {
}
 
Example #6
Source File: DockingFrame.java    From Rails with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Ensures for all dockables that, if they are externalized, they do not have
 * the default maximize button
 * (as it won't work for the adjusted externalization setup).
 */
private void adjustExternalizedActions() {
    for (CDockable d : dockables) {
        adjustExternalizedActions(d);
    }
}