javax.swing.JSplitPane.getLeftComponent()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(86)

本文整理了Java中javax.swing.JSplitPane.getLeftComponent()方法的一些代码示例,展示了JSplitPane.getLeftComponent()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSplitPane.getLeftComponent()方法的具体详情如下:
包路径:javax.swing.JSplitPane
类名称:JSplitPane
方法名:getLeftComponent

JSplitPane.getLeftComponent介绍

暂无

代码示例

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-gsf-testrunner-ui

private static StatisticsPanel getStatisticsPanel() {
JSplitPane view = getCurrentResultView();
if (view == null || !(view.getLeftComponent() instanceof StatisticsPanel)) {
  return null;
}
return (StatisticsPanel) view.getLeftComponent();
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-gsf-testrunner-ui

private void copyFilterMask(JSplitPane oldView, JSplitPane newView) {
  StatisticsPanel oldSP = (StatisticsPanel)oldView.getLeftComponent();
  StatisticsPanel newSP = (StatisticsPanel)newView.getLeftComponent();
  newSP.copyFilterMask(oldSP);
}

代码示例来源:origin: stackoverflow.com

final JScrollPane scrollEditor = new JScrollPane(editor, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
final JSplitPane innerPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, scrollEditor, scrollPreview);

innerPane.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, new PropertyChangeListener() {
          @Override
          public void propertyChange(PropertyChangeEvent evt) {

            editor.setSize(innerPane.getLeftComponent().getBounds().width, editor.getHeight() - 10); // If you want more edge space make 10 to 15 or 20
            scrollEditor.setSize(innerPane.getLeftComponent().getBounds().width, editor.getHeight());

          }
        });

代码示例来源:origin: stackoverflow.com

private static void swap(JSplitPane split) {
  Component r = split.getRightComponent();
  Component l = split.getLeftComponent();

  // remove the components
  split.setLeftComponent(null);
  split.setRightComponent(null);

  // add them swapped
  split.setLeftComponent(r);
  split.setRightComponent(l);
}

代码示例来源:origin: de.richtercloud/flexdock-core

public static Component getOtherComponent(JSplitPane split, Component current) {
  if(split==null || current==null) {
    return null;
  }
  Component other = split.getLeftComponent();
  if(other==current) {
    other = split.getRightComponent();
  }
  return other;
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-gsf-testrunner-ui

public void actionPerformed(ActionEvent e) {
    JSplitPane view = getCurrentResultView();
    if (view == null || !(view.getLeftComponent() instanceof StatisticsPanel)) {
      return;
    }
    StatisticsPanel statisticsPanel = (StatisticsPanel) view.getLeftComponent();
    if (next) {
      statisticsPanel.selectNextFailure();
    } else {
      statisticsPanel.selectPreviousFailure();
    }
  }
}

代码示例来源:origin: freeplane/freeplane

public Dimension preferredLayoutSize(Container parent) {
  final JSplitPane splitPane = (JSplitPane) parent;
  if(isDividerRequired(splitPane))
    return lm.preferredLayoutSize(parent);
  return splitPane.getLeftComponent().getPreferredSize();  		
}

代码示例来源:origin: com.eas.platypus/platypus-js-forms

@ScriptFunction(jsDoc = FIRST_COMPONENT_JSDOC)
@Undesignable
public JComponent getFirstComponent() {
  return (JComponent) super.getLeftComponent();
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-lib-profiler-ui

private Component getFirstComponent(JSplitPane splitPane) {
  if (splitPane.getOrientation() == JSplitPane.HORIZONTAL_SPLIT) {
    return splitPane.getLeftComponent();
  } else {
    return splitPane.getTopComponent();
  }
}

代码示例来源:origin: joel-costigliola/assertj-swing

@RunsInCurrentThread
private int calculateMinimum(@Nonnull JSplitPane splitPane) {
 Component left = splitPane.getLeftComponent();
 if (left == null || !left.isVisible()) {
  return 0;
 }
 int minimum = left.getMinimumSize().height;
 Insets insets = splitPane.getInsets();
 if (insets != null) {
  minimum += insets.top;
 }
 return minimum;
}

代码示例来源:origin: lycying/c2d-engine

private void fillRightPart(Component comp) {
  mainContentSplitPane.setRightComponent(comp);
  mainContentSplitPane.getLeftComponent().setMinimumSize(new Dimension(0, 0));
  mainContentSplitPane.getLeftComponent().setMaximumSize(new Dimension(0, 0));
  mainContentSplitPane.getRightComponent().setMinimumSize(new Dimension(250, 0));
  frmCdboxdSceneEditor.validate();
  canvasPanel.getComponent(0).requestFocus();//focus the main canvas
}

代码示例来源:origin: org.bitbucket.goalhub.simpleide/jedit

private static void getEditPanes(List<EditPane> vec, Component comp)
{
  if(comp instanceof EditPane)
    vec.add((EditPane) comp);
  else if(comp instanceof JSplitPane)
  {
    JSplitPane split = (JSplitPane)comp;
    getEditPanes(vec,split.getLeftComponent());
    getEditPanes(vec,split.getRightComponent());
  }
} //}}}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-gsf-testrunner-ui

@Override
  public void run() {
    StatisticsPanel comp = (StatisticsPanel) dispHandler.getDisplayComponent().getLeftComponent();
    dispHandler.setTreePanel(comp.getTreePanel());
    lock.release();
  }
});

代码示例来源:origin: de.richtercloud/flexdock-core

private String findSiblingId(Dockable dockable) {
  Component comp = dockable.getComponent();
  JSplitPane split = comp.getParent() instanceof JSplitPane? (JSplitPane)comp.getParent(): null;
  if(split==null) {
    return null;
  }
  Component sibling = split.getLeftComponent();
  if(comp==sibling) {
    sibling = split.getRightComponent();
  }
  Dockable d = findDockable(sibling);
  return d==null? null: d.getPersistentId();
}

代码示例来源:origin: freeplane/freeplane

public Dimension minimumLayoutSize(Container parent) {
  final JSplitPane splitPane = (JSplitPane) parent;
  if(isDividerRequired(splitPane))
    return lm.minimumLayoutSize(parent);
  return splitPane.getLeftComponent().getMinimumSize();  		
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-gsf-testrunner-ui

public void updateOptionStatus(String property, boolean selected) {
NbPreferences.forModule(StatisticsPanel.class).putBoolean(property, selected);
for (int i = 0; i < tabPane.getTabCount(); i++) {
  StatisticsPanel sp = (StatisticsPanel)((JSplitPane)tabPane.getComponentAt(i)).getLeftComponent();
  sp.updateOptionStatus(property, selected);
}
}

代码示例来源:origin: com.github.arnabk/pgslookandfeel

public void uninstallDefaults() {
  super.uninstallDefaults();
  maybeRemoveShadowBorder(splitPane.getLeftComponent());
  maybeRemoveShadowBorder(splitPane.getRightComponent());
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-gsf-testrunner-ui

public @Override boolean requestFocusInWindow() {
  JSplitPane view = getCurrentResultView();
  if (view == null) {
    return super.requestFocusInWindow();
  }
  Component left = view.getLeftComponent();
  if (left == null) {
    return super.requestFocusInWindow();
  }
  return left.requestFocusInWindow();
}

代码示例来源:origin: com.github.arnabk/pgslookandfeel

public void installDefaults() {
  super.installDefaults();
  maybeSetShadowBorder(splitPane.getLeftComponent());
  maybeSetShadowBorder(splitPane.getRightComponent());
}

代码示例来源:origin: de.richtercloud/flexdock-core

protected Component getElderComponent(JSplitPane splitPane) {
  if (splitPane instanceof DockingSplitPane) {
    return ((DockingSplitPane) splitPane).getElderComponent();
  }
  boolean inTopLeft = isElderTopLeft(splitPane);
  Component comp = inTopLeft ? splitPane.getLeftComponent() : splitPane
           .getRightComponent();
  if (comp instanceof DockingPort) {
    comp = ((DockingPort) comp).getDockedComponent();
  }
  return comp;
}

相关文章

JSplitPane类方法