public void paint(final Graphics g) { if (myTabs.isDropTarget(myInfo)) return; if (myTabs.getSelectedInfo() != myInfo) { doPaint(g); } }
public void doTranslate(PairConsumer<Integer, Integer> consumer) { final JBTabsPosition pos = myTabs.getTabsPosition(); int dX = 0; int dXs = 0; int dY = 0; int dYs = 0; int selected = getSelectedOffset(); int plain = getNonSelectedOffset(); switch (pos) { case bottom: dY = -plain; dYs = -selected; break; case left: dX = plain; dXs = selected; break; case right: dX = -plain; dXs = -selected; break; case top: dY = plain; dYs = selected; break; } if (!myTabs.isDropTarget(myInfo)) { if (myTabs.getSelectedInfo() != myInfo) { consumer.consume(dX, dY); } else { consumer.consume(dXs, dYs); } } }