Java 类com.intellij.openapi.ui.OnePixelDivider 实例源码

项目:intellij-ce-playground    文件:JavaDocFormattingPanel.java   
@Override
protected void init() {
  super.init();

  myEnableCheckBox = new JCheckBox(ApplicationBundle.message("checkbox.enable.javadoc.formatting"));
  myEnableCheckBox.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
      update();
    }
  });

  myPanel.setBorder(new CustomLineBorder(OnePixelDivider.BACKGROUND, 1, 0, 0, 0));
  myJavaDocPanel.add(BorderLayout.CENTER, myPanel);
  myJavaDocPanel.add(myEnableCheckBox, BorderLayout.NORTH);
}
项目:jediterm    文件:JBTabsImpl.java   
@Override
@NotNull
public JBTabsPresentation setTabsPosition(final JBTabsPosition position) {
    myPosition = position;
    OnePixelDivider divider = mySplitter.getDivider();
    if ((position == JBTabsPosition.left || position == JBTabsPosition.right) && divider.getParent() == null) {
        add(divider);
    } else if (divider.getParent() == this) {
        remove(divider);
    }
    relayout(true, false);
    return this;
}
项目:consulo    文件:DetailsPanel.java   
private void rebuildCommitPanels(int[] selection) {
  myEmptyText.setText("");

  int selectionLength = selection.length;

  // for each commit besides the first there are two components: Separator and CommitPanel
  int existingCount = (myMainContentPanel.getComponentCount() + 1) / 2;
  int requiredCount = Math.min(selectionLength, MAX_ROWS);
  for (int i = existingCount; i < requiredCount; i++) {
    if (i > 0) {
      myMainContentPanel.add(new SeparatorComponent(0, OnePixelDivider.BACKGROUND, null));
    }
    myMainContentPanel.add(new CommitPanel(myLogData, myColorManager));
  }

  // clear superfluous items
  while (myMainContentPanel.getComponentCount() > 2 * requiredCount - 1) {
    myMainContentPanel.remove(myMainContentPanel.getComponentCount() - 1);
  }

  if (selectionLength > MAX_ROWS) {
    myMainContentPanel.add(new SeparatorComponent(0, OnePixelDivider.BACKGROUND, null));
    JBLabel label = new JBLabel("(showing " + MAX_ROWS + " of " + selectionLength + " selected commits)");
    label.setFont(VcsHistoryUtil.getCommitDetailsFont());
    label.setBorder(CommitPanel.getDetailsBorder());
    myMainContentPanel.add(label);
  }

  mySelection = Ints.asList(Arrays.copyOf(selection, requiredCount));

  repaint();
}
项目:intellij-ce-playground    文件:OnePixelSplitter.java   
@Override
protected Divider createDivider() {
  return new OnePixelDivider(isVertical(), this);
}
项目:intellij-ce-playground    文件:TabsSideSplitter.java   
TabsSideSplitter(@NotNull JBTabsImpl tabs) {
  myTabs = tabs;
  myTabs.addPropertyChangeListener(JBTabsImpl.SIDE_TABS_SIZE_LIMIT_KEY.toString(), this);
  myDivider = new OnePixelDivider(false, this);
}
项目:intellij-ce-playground    文件:TabsSideSplitter.java   
OnePixelDivider getDivider() {
  return myDivider;
}
项目:jediterm    文件:OnePixelSplitter.java   
@Override
protected Divider createDivider() {
  return new OnePixelDivider(isVertical(), this);
}
项目:jediterm    文件:JBTabsImpl.java   
@Override
public void doLayout() {
    try {
        myHeaderFitSize = computeHeaderFitSize();
        final Collection<TabLabel> labels = myInfo2Label.values();


        List<TabInfo> visible = new ArrayList<>();
        visible.addAll(getVisibleInfos());

        if (myDropInfo != null && !visible.contains(myDropInfo) && myShowDropLocation) {
            if (getDropInfoIndex() >= 0 && getDropInfoIndex() < visible.size()) {
                visible.add(getDropInfoIndex(), myDropInfo);
            } else {
                visible.add(myDropInfo);
            }
        }

        if (isSingleRow()) {
            myLastLayoutPass = mySingleRowLayout.layoutSingleRow(visible);
            myTableLayout.myLastTableLayout = null;
            OnePixelDivider divider = mySplitter.getDivider();
            if (divider.getParent() == this) {
                int location = getTabsPosition() == JBTabsPosition.left
                        ? mySingleRowLayout.myLastSingRowLayout.tabRectangle.width
                        : getWidth() - mySingleRowLayout.myLastSingRowLayout.tabRectangle.width;
                divider.setBounds(location, 0, 1, getHeight());
            }
        } else {
            myLastLayoutPass = myTableLayout.layoutTable(visible);
            mySingleRowLayout.myLastSingRowLayout = null;
        }

        if (isStealthModeEffective() && !isHideTabs()) {
            final TabLabel label = getSelectedLabel();
            final Rectangle bounds = label.getBounds();
            final Insets insets = getLayoutInsets();
            layout(label, insets.left, bounds.y, getWidth() - insets.right - insets.left, bounds.height);
        }


        moveDraggedTabLabel();

        myTabActionsAutoHideListener.processMouseOver();
    } finally {
        myForcedRelayout = false;
    }

    applyResetComponents();
}
项目:jediterm    文件:TabsSideSplitter.java   
TabsSideSplitter(@NotNull JBTabsImpl tabs) {
    myTabs = tabs;
//    myTabs.addPropertyChangeListener(JBTabsImpl.SIDE_TABS_SIZE_LIMIT_KEY.toString(), this);
    myDivider = new OnePixelDivider(false, this);
  }
项目:jediterm    文件:TabsSideSplitter.java   
OnePixelDivider getDivider() {
  return myDivider;
}
项目:consulo    文件:OnePixelSplitter.java   
@Override
protected Divider createDivider() {
  return new OnePixelDivider(isVertical(), this);
}