rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
int cellx = sumIntArray(info.colWidths, constraints.gridx); int celly = sumIntArray(info.rowHeights, constraints.gridy); int cellw = sumIntArray(info.colWidths, constraints.gridx + constraints.gridwidth) - cellx; int cellh = sumIntArray(info.rowHeights, constraints.gridy + constraints.gridheight) - celly; | cellw = sumIntArray(info.colWidths, constraints.gridx + constraints.gridwidth) - cellx; cellh = sumIntArray(info.rowHeights, constraints.gridy + constraints.gridheight) - celly; | protected void ArrangeGrid (Container parent) { Component[] components = parent.getComponents(); if (components.length == 0) return; GridBagLayoutInfo info = getLayoutInfo (parent, PREFERREDSIZE); if (info.cols == 0 && info.rows == 0) return; // DEBUG //dumpLayoutInfo ... |
Dimension dim = component.getPreferredSize(); | protected void ArrangeGrid (Container parent) { Component[] components = parent.getComponents(); if (components.length == 0) return; GridBagLayoutInfo info = getLayoutInfo (parent, PREFERREDSIZE); if (info.cols == 0 && info.rows == 0) return; // DEBUG //dumpLayoutInfo ... | |
int x; int y; | int x = 0; int y = 0; | protected void ArrangeGrid (Container parent) { Component[] components = parent.getComponents(); if (components.length == 0) return; GridBagLayoutInfo info = getLayoutInfo (parent, PREFERREDSIZE); if (info.cols == 0 && info.rows == 0) return; // DEBUG //dumpLayoutInfo ... |
component.setBounds(info.pos_x + x, info.pos_y + y, dim.width, dim.height); | component.setBounds(info.pos_x + x, info.pos_y + y, dim.width, dim.height); lastComp = component; | protected void ArrangeGrid (Container parent) { Component[] components = parent.getComponents(); if (components.length == 0) return; GridBagLayoutInfo info = getLayoutInfo (parent, PREFERREDSIZE); if (info.cols == 0 && info.rows == 0) return; // DEBUG //dumpLayoutInfo ... |
y = 0; | { y = current_y; } | protected GridBagLayoutInfo GetLayoutInfo (Container parent, int sizeflag) { if (sizeflag != MINSIZE && sizeflag != PREFERREDSIZE) throw new IllegalArgumentException(); Dimension parentDim = parent.getSize (); Insets parentInsets = parent.getInsets (); parentDim.width -= parentInsets.l... |
else if (span > 1) | else | private void distributeSizeAndWeight (int size, double weight, int start, int span, int[] sizes, double[] weights) { if (span == 1) { sizes[start] = Math.max(sizes[start], size); weights[start] = Math.... |
if (e.getPropertyName().equals( AbstractButton.ROLLOVER_ENABLED_CHANGED_PROPERTY)) { AbstractButton b = (AbstractButton) e.getSource(); if (b.getBorder() instanceof UIResource) { if (Boolean.TRUE.equals(e.getNewValue())) b.setBorder(MetalBorders.getRolloverBorder()); else if (Boolean.FALSE.equals(e.getNewValue())) b.se... | public void propertyChange(PropertyChangeEvent e) { super.propertyChange(e); if (e.getPropertyName().equals( AbstractButton.ROLLOVER_ENABLED_CHANGED_PROPERTY)) { AbstractButton b = (AbstractButton) e.getSource(); if (b.getBorder() instanceof UIResource) { if (B... | |
int x = e.getX(); int y = e.getY(); int tabCount = tabPane.getTabCount(); if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT) | if (tabPane.isEnabled()) | public void mousePressed(MouseEvent e) { int x = e.getX(); int y = e.getY(); int tabCount = tabPane.getTabCount(); if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT) { if (e.getSource() == incrButton) { if (++currentScrollLocation >= tab... |
if (e.getSource() == incrButton) | int index = tabForCoordinate(tabPane, e.getX(), e.getY()); if (index >= 0 && tabPane.isEnabledAt(index)) | public void mousePressed(MouseEvent e) { int x = e.getX(); int y = e.getY(); int tabCount = tabPane.getTabCount(); if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT) { if (e.getSource() == incrButton) { if (++currentScrollLocation >= tab... |
if (++currentScrollLocation >= tabCount) currentScrollLocation = tabCount - 1; int width = 0; for (int i = currentScrollLocation - 1; i < tabCount; i++) width += rects[i].width; if (width < viewport.getWidth()) currentScrollLocation--; else if (! decrButton.isEnabled()) decrButton.setEnabled(true); tabPane.revalidat... | tabPane.setSelectedIndex(index); | public void mousePressed(MouseEvent e) { int x = e.getX(); int y = e.getY(); int tabCount = tabPane.getTabCount(); if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT) { if (e.getSource() == incrButton) { if (++currentScrollLocation >= tab... |
else if (e.getSource() == decrButton) { if (--currentScrollLocation < 0) currentScrollLocation = 0; if (currentScrollLocation == 0) decrButton.setEnabled(false); else if (! incrButton.isEnabled()) incrButton.setEnabled(true); tabPane.revalidate(); tabPane.repaint(); return; | public void mousePressed(MouseEvent e) { int x = e.getX(); int y = e.getY(); int tabCount = tabPane.getTabCount(); if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT) { if (e.getSource() == incrButton) { if (++currentScrollLocation >= tab... | |
int index = tabForCoordinate(tabPane, x, y); if (index != -1 && tabPane.isEnabledAt(index)) tabPane.setSelectedIndex(index); tabPane.revalidate(); tabPane.repaint(); } | public void mousePressed(MouseEvent e) { int x = e.getX(); int y = e.getY(); int tabCount = tabPane.getTabCount(); if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT) { if (e.getSource() == incrButton) { if (++currentScrollLocation >= tab... | |
assureRectsCreated(tabPane.getTabCount()); contentRect = SwingUtilities.calculateInnerArea(tabPane, contentRect); calculateTabRects(tabPane.getTabPlacement(), tabPane.getTabCount()); if (tabPane.getSelectedIndex() != -1) { Component visible = getVisibleComponent(); Insets insets = getContentBorderInsets(tabPane.getTa... | int count = tabPane.getTabCount(); assureRectsCreated(count); calculateTabRects(tabPane.getTabPlacement(), count); tabRunsDirty = false; | public void calculateLayoutInfo() { assureRectsCreated(tabPane.getTabCount()); contentRect = SwingUtilities.calculateInnerArea(tabPane, contentRect); calculateTabRects(tabPane.getTabPlacement(), tabPane.getTabCount()); if (tabPane.getSelectedIndex() != -1) { Component visible ... |
int componentHeight = 0; int componentWidth = 0; | protected Dimension calculateSize(boolean minimum) { int tabPlacement = tabPane.getTabPlacement(); int width = 0; int height = 0; int componentHeight = 0; int componentWidth = 0; Component c; Dimension dims; for (int i = 0; i < tabPane.getTabCount(); i++) { ... | |
calcRect = c.getBounds(); dims = c.getPreferredSize(); | dims = minimum ? c.getMinimumSize() : c.getPreferredSize(); | protected Dimension calculateSize(boolean minimum) { int tabPlacement = tabPane.getTabPlacement(); int width = 0; int height = 0; int componentHeight = 0; int componentWidth = 0; Component c; Dimension dims; for (int i = 0; i < tabPane.getTabCount(); i++) { ... |
componentHeight = Math.max(componentHeight, dims.height); componentWidth = Math.max(componentWidth, dims.width); | height = Math.max(height, dims.height); width = Math.max(width, dims.width); | protected Dimension calculateSize(boolean minimum) { int tabPlacement = tabPane.getTabPlacement(); int width = 0; int height = 0; int componentHeight = 0; int componentWidth = 0; Component c; Dimension dims; for (int i = 0; i < tabPane.getTabCount(); i++) { ... |
width = Math.max(min, componentWidth); int tabAreaHeight = preferredTabAreaHeight(tabPlacement, width); height = tabAreaHeight + componentHeight; | width = Math.max(min, width); int tabAreaHeight = preferredTabAreaHeight(tabPlacement, width - tabAreaInsets.left -tabAreaInsets.right); height += tabAreaHeight; | protected Dimension calculateSize(boolean minimum) { int tabPlacement = tabPane.getTabPlacement(); int width = 0; int height = 0; int componentHeight = 0; int componentWidth = 0; Component c; Dimension dims; for (int i = 0; i < tabPane.getTabCount(); i++) { ... |
height = Math.max(min, componentHeight); int tabAreaWidth = preferredTabAreaWidth(tabPlacement, height); width = tabAreaWidth + componentWidth; | height = Math.max(min, height); int tabAreaWidth = preferredTabAreaWidth(tabPlacement, height - tabAreaInsets.top - tabAreaInsets.bottom); width += tabAreaWidth; | protected Dimension calculateSize(boolean minimum) { int tabPlacement = tabPane.getTabPlacement(); int width = 0; int height = 0; int componentHeight = 0; int componentWidth = 0; Component c; Dimension dims; for (int i = 0; i < tabPane.getTabCount(); i++) { ... |
return new Dimension(width, height); | Insets tabPaneInsets = tabPane.getInsets(); return new Dimension(width + tabPaneInsets.left + tabPaneInsets.right, height + tabPaneInsets.top + tabPaneInsets.bottom); | protected Dimension calculateSize(boolean minimum) { int tabPlacement = tabPane.getTabPlacement(); int width = 0; int height = 0; int componentHeight = 0; int componentWidth = 0; Component c; Dimension dims; for (int i = 0; i < tabPane.getTabCount(); i++) { ... |
SwingUtilities.calculateInnerArea(tabPane, calcRect); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Insets insets = tabPane.getInsets(); int max = 0; int runs = 0; int start = getTabRunIndent(tabPlacement, 1); | runCount = 0; selectedRun = -1; int selectedIndex = tabPane.getSelectedIndex(); Rectangle rect; | protected void calculateTabRects(int tabPlacement, int tabCount) { if (tabCount == 0) return; FontMetrics fm = getFontMetrics(); SwingUtilities.calculateInnerArea(tabPane, calcRect); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Insets insets = tabPane.getInsets(); i... |
int maxHeight = calculateMaxTabHeight(tabPlacement); calcRect.width -= tabAreaInsets.left + tabAreaInsets.right; max = calcRect.width + tabAreaInsets.left + insets.left; start += tabAreaInsets.left + insets.left; int width = 0; int runWidth = start; | protected void calculateTabRects(int tabPlacement, int tabCount) { if (tabCount == 0) return; FontMetrics fm = getFontMetrics(); SwingUtilities.calculateInnerArea(tabPane, calcRect); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Insets insets = tabPane.getInsets(); i... | |
width = calculateTabWidth(tabPlacement, i, fm); if (runWidth + width > max) | rect = rects[i]; if (i > 0) | protected void calculateTabRects(int tabPlacement, int tabCount) { if (tabCount == 0) return; FontMetrics fm = getFontMetrics(); SwingUtilities.calculateInnerArea(tabPane, calcRect); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Insets insets = tabPane.getInsets(); i... |
runWidth = tabAreaInsets.left + insets.left + getTabRunIndent(tabPlacement, ++runs); rects[i] = new Rectangle(runWidth, insets.top + tabAreaInsets.top, width, maxHeight); runWidth += width; if (runs > tabRuns.length - 1) expandTabRunsArray(); tabRuns[runs] = i; | rect.x = rects[i - 1].x + rects[i - 1].width; | protected void calculateTabRects(int tabPlacement, int tabCount) { if (tabCount == 0) return; FontMetrics fm = getFontMetrics(); SwingUtilities.calculateInnerArea(tabPane, calcRect); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Insets insets = tabPane.getInsets(); i... |
rects[i] = new Rectangle(runWidth, insets.top + tabAreaInsets.top, width, maxHeight); runWidth += width; } | tabRuns[0] = 0; runCount = 1; maxTabWidth = 0; rect.x = x; | protected void calculateTabRects(int tabPlacement, int tabCount) { if (tabCount == 0) return; FontMetrics fm = getFontMetrics(); SwingUtilities.calculateInnerArea(tabPane, calcRect); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Insets insets = tabPane.getInsets(); i... |
runs++; tabAreaRect.width = tabPane.getWidth() - insets.left - insets.right; tabAreaRect.height = runs * maxTabHeight - (runs - 1) * tabRunOverlay + tabAreaInsets.top + tabAreaInsets.bottom; contentRect.width = tabAreaRect.width; contentRect.height = tabPane.getHeight() - insets.top - insets.bottom - tabAreaRect.height... | rect.width = calculateTabWidth(tabPlacement, i, fm); maxTabWidth = Math.max(maxTabWidth, rect.width); if (rect.x != 2 + insets.left && rect.x + rect.width > breakAt) | protected void calculateTabRects(int tabPlacement, int tabCount) { if (tabCount == 0) return; FontMetrics fm = getFontMetrics(); SwingUtilities.calculateInnerArea(tabPane, calcRect); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Insets insets = tabPane.getInsets(); i... |
contentRect.y = insets.top; tabAreaRect.y = contentRect.y + contentRect.height; | if (runCount > tabRuns.length - 1) expandTabRunsArray(); tabRuns[runCount] = i; runCount++; rect.x = x; | protected void calculateTabRects(int tabPlacement, int tabCount) { if (tabCount == 0) return; FontMetrics fm = getFontMetrics(); SwingUtilities.calculateInnerArea(tabPane, calcRect); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Insets insets = tabPane.getInsets(); i... |
else { tabAreaRect.y = insets.top; contentRect.y = tabAreaRect.y + tabAreaRect.height; | rect.y = y; rect.height = maxTabHeight; if (i == selectedIndex) selectedRun = runCount - 1; | protected void calculateTabRects(int tabPlacement, int tabCount) { if (tabCount == 0) return; FontMetrics fm = getFontMetrics(); SwingUtilities.calculateInnerArea(tabPane, calcRect); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Insets insets = tabPane.getInsets(); i... |
int maxWidth = calculateMaxTabWidth(tabPlacement); calcRect.height -= tabAreaInsets.top + tabAreaInsets.bottom; max = calcRect.height + tabAreaInsets.top + insets.top; int height = 0; start += tabAreaInsets.top + insets.top; int runHeight = start; int fontHeight = fm.getHeight(); | protected void calculateTabRects(int tabPlacement, int tabCount) { if (tabCount == 0) return; FontMetrics fm = getFontMetrics(); SwingUtilities.calculateInnerArea(tabPane, calcRect); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Insets insets = tabPane.getInsets(); i... | |
height = calculateTabHeight(tabPlacement, i, fontHeight); if (runHeight + height > max) | rect = rects[i]; if (i > 0) | protected void calculateTabRects(int tabPlacement, int tabCount) { if (tabCount == 0) return; FontMetrics fm = getFontMetrics(); SwingUtilities.calculateInnerArea(tabPane, calcRect); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Insets insets = tabPane.getInsets(); i... |
runHeight = tabAreaInsets.top + insets.top + getTabRunIndent(tabPlacement, ++runs); rects[i] = new Rectangle(insets.left + tabAreaInsets.left, runHeight, maxWidth, height); runHeight += height; if (runs > tabRuns.length - 1) expandTabRunsArray(); tabRuns[runs] = i; | rect.y = rects[i - 1].y + rects[i - 1].height; | protected void calculateTabRects(int tabPlacement, int tabCount) { if (tabCount == 0) return; FontMetrics fm = getFontMetrics(); SwingUtilities.calculateInnerArea(tabPane, calcRect); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Insets insets = tabPane.getInsets(); i... |
rects[i] = new Rectangle(insets.left + tabAreaInsets.left, runHeight, maxWidth, height); runHeight += height; | tabRuns[0] = 0; runCount = 1; maxTabHeight = 0; rect.y = y; } rect.height = calculateTabHeight(tabPlacement, i, fm.getHeight()); maxTabHeight = Math.max(maxTabHeight, rect.height); if (rect.y != 2 + insets.top && rect.y + rect.height > breakAt) { if (runCount > tabRuns.length - 1) expandTabRunsArray(); tabRuns[runCoun... | protected void calculateTabRects(int tabPlacement, int tabCount) { if (tabCount == 0) return; FontMetrics fm = getFontMetrics(); SwingUtilities.calculateInnerArea(tabPane, calcRect); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Insets insets = tabPane.getInsets(); i... |
} runs++; tabAreaRect.width = runs * maxTabWidth - (runs - 1) * tabRunOverlay + tabAreaInsets.left + tabAreaInsets.right; tabAreaRect.height = tabPane.getHeight() - insets.top - insets.bottom; tabAreaRect.y = insets.top; contentRect.width = tabPane.getWidth() - insets.left - insets.right - tabAreaRect.width; contentRe... | if (tabPlacement == BOTTOM) y -= (maxTabHeight - tabRunOverlay); else y += (maxTabHeight - tabRunOverlay); | protected void calculateTabRects(int tabPlacement, int tabCount) { if (tabCount == 0) return; FontMetrics fm = getFontMetrics(); SwingUtilities.calculateInnerArea(tabPane, calcRect); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Insets insets = tabPane.getInsets(); i... |
contentRect.x = insets.left; tabAreaRect.x = contentRect.x + contentRect.width; | for (int j = start; j <= end; ++j) { rect = rects[j]; rect.x = x; rect.y += getTabRunIndent(tabPlacement, i); } if (shouldPadTabRun(tabPlacement, i)) { padTabRun(tabPlacement, start, end, breakAt); } if (tabPlacement == RIGHT) x -= (maxTabWidth - tabRunOverlay); else x += (maxTabWidth - tabRunOverlay); | protected void calculateTabRects(int tabPlacement, int tabCount) { if (tabCount == 0) return; FontMetrics fm = getFontMetrics(); SwingUtilities.calculateInnerArea(tabPane, calcRect); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Insets insets = tabPane.getInsets(); i... |
runCount = runs; if (runCount > tabRuns.length) expandTabRunsArray(); tabRuns[0] = 0; normalizeTabRuns(tabPlacement, tabCount, start, max); selectedRun = getRunForTab(tabCount, tabPane.getSelectedIndex()); if (shouldRotateTabRuns(tabPlacement)) rotateTabRuns(tabPlacement, selectedRun); for (int i = 0; i < runCount; ... | padSelectedTab(tabPlacement, selectedIndex); | protected void calculateTabRects(int tabPlacement, int tabCount) { if (tabCount == 0) return; FontMetrics fm = getFontMetrics(); SwingUtilities.calculateInnerArea(tabPane, calcRect); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Insets insets = tabPane.getInsets(); i... |
int tabPlacement = tabPane.getTabPlacement(); Insets insets = tabPane.getInsets(); int childCount = tabPane.getComponentCount(); if (childCount > 0) { int compX; int compY; int tabAreaWidth = 0; int tabAreaHeight = 0; switch (tabPlacement) { case LEFT: tabAreaWidth = calculateTabAreaWidth(tabPlacement, runCount, maxTab... | public void layoutContainer(Container parent) { calculateLayoutInfo(); } | |
Insets insets = getTabInsets(tabPlacement, tabIndex); int height = 0; | Insets tabInsets = getTabInsets(tabPlacement, tabIndex); | protected int calculateTabHeight(int tabPlacement, int tabIndex, int fontHeight) { Icon icon = getIconForTab(tabIndex); Insets insets = getTabInsets(tabPlacement, tabIndex); int height = 0; if (icon != null) { Rectangle vr = new Rectangle(); Rectangle ... |
{ Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); layoutLabel(tabPlacement, getFontMetrics(), tabIndex, tabPane.getTitleAt(tabIndex), icon, vr, ir, tr, tabIndex == tabPane.getSelectedIndex()); height = tr.union(ir).height; } else height = fontHeight; height += insets.top... | height = Math.max(height, icon.getIconHeight()); height += tabInsets.top + tabInsets.bottom + 2; | protected int calculateTabHeight(int tabPlacement, int tabIndex, int fontHeight) { Icon icon = getIconForTab(tabIndex); Insets insets = getTabInsets(tabPlacement, tabIndex); int height = 0; if (icon != null) { Rectangle vr = new Rectangle(); Rectangle ... |
Insets target = new Insets(0, 0, 0, 0); rotateInsets(tabInsets, target, tabPlacement); return target; | return tabInsets; | protected Insets getTabInsets(int tabPlacement, int tabIndex) { Insets target = new Insets(0, 0, 0, 0); rotateInsets(tabInsets, target, tabPlacement); return target; } |
tabsOpaque = UIManager.getBoolean("TabbedPane.tabsOpaque"); | protected void installDefaults() { LookAndFeel.installColorsAndFont(tabPane, "TabbedPane.background", "TabbedPane.foreground", "TabbedPane.font"); tabPane.setOpaque(false); highlight = UIManager.getColor("TabbedPane.highlight"); ligh... | |
if (!tabPane.isValid()) tabPane.validate(); | public void paint(Graphics g, JComponent c) { if (tabPane.getTabCount() == 0) return; if (tabPane.getTabLayoutPolicy() == JTabbedPane.WRAP_TAB_LAYOUT) paintTabArea(g, tabPane.getTabPlacement(), tabPane.getSelectedIndex()); paintContentBorder(g, tabPane.getTabPlacement(), tabPane.getSelectedIndex()... | |
int x = contentRect.x; int y = contentRect.y; int w = contentRect.width; int h = contentRect.height; | int width = tabPane.getWidth(); int height = tabPane.getHeight(); Insets insets = tabPane.getInsets(); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); int x = insets.left; int y = insets.top; int w = width - insets.left - insets.right; int h = height - insets.top - insets.bottom; switch (tabPlacement) { case ... | protected void paintContentBorder(Graphics g, int tabPlacement, int selectedIndex) { int x = contentRect.x; int y = contentRect.y; int w = contentRect.width; int h = contentRect.height; paintContentBorderTopEdge(g, tabPlacement, selectedIndex, x, y, w, h); paintCo... |
Color saved = g.getColor(); calcRect = iconRect.union(textRect); | if (tabPane.hasFocus() && isSelected) { Rectangle rect = rects[tabIndex]; int x; int y; int w; int h; | protected void paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected) { Color saved = g.getColor(); calcRect = icon... |
g.drawRect(calcRect.x, calcRect.y, calcRect.width, calcRect.height); g.setColor(saved); | switch (tabPlacement) { case LEFT: x = rect.x + 3; y = rect.y + 3; w = rect.width - 5; h = rect.height - 6; break; case RIGHT: x = rect.x + 2; y = rect.y + 3; w = rect.width - 6; h = rect.height - 5; break; case BOTTOM: x = rect.x + 3; y = rect.y + 2; w = rect.width - 6; h = rect.height - 5; break; case TOP: default: x... | protected void paintFocusIndicator(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect, boolean isSelected) { Color saved = g.getColor(); calcRect = icon... |
boolean isSelected = tabIndex == tabPane.getSelectedIndex(); calcRect = getTabBounds(tabPane, tabIndex); int x = calcRect.x; int y = calcRect.y; int w = calcRect.width; int h = calcRect.height; if (getRunForTab(tabPane.getTabCount(), tabIndex) == 1) { Insets insets = getTabAreaInsets(tabPlacement); switch (tabPlacemen... | layoutLabel(tabPlacement, fm, tabIndex, title, icon, rect, iconRect, | protected void paintTab(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect) { FontMetrics fm = getFontMetrics(); Icon icon = getIconForTab(tabIndex); String title = tabPane.getTitleAt(tabIndex); boolean isSelected = tabIndex == t... |
paintTabBackground(g, tabPlacement, tabIndex, x, y, w, h, isSelected); paintTabBorder(g, tabPlacement, tabIndex, x, y, w, h, isSelected); if (icon != null) paintIcon(g, tabPlacement, tabIndex, icon, iconRect, isSelected); if (title != null && ! title.equals("")) | protected void paintTab(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect) { FontMetrics fm = getFontMetrics(); Icon icon = getIconForTab(tabIndex); String title = tabPane.getTitleAt(tabIndex); boolean isSelected = tabIndex == t... | |
paintIcon(g, tabPlacement, tabIndex, icon, iconRect, isSelected); paintFocusIndicator(g, tabPlacement, rects, tabIndex, iconRect, textRect, isSelected); | protected void paintTab(Graphics g, int tabPlacement, Rectangle[] rects, int tabIndex, Rectangle iconRect, Rectangle textRect) { FontMetrics fm = getFontMetrics(); Icon icon = getIconForTab(tabIndex); String title = tabPane.getTitleAt(tabIndex); boolean isSelected = tabIndex == t... | |
int currRun = 1; if (tabCount < 1) return; if (runCount > 1) currRun = 0; for (int i = 0; i < runCount; i++) { int first = lastTabInRun(tabCount, getPreviousTabRun(currRun)) + 1; if (isScroll) first = currentScrollLocation; else if (first == tabCount) first = 0; int last = lastTabInRun(tabCount, currRun); if (isScrol... | for (int i = runCount - 1; i >= 0; --i) | protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex) { Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); boolean isScroll = tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT; // Please note: the ordering of the painting is important. // we WANT to pai... |
for (int k = first; k < tabCount; k++) | int start = tabRuns[i]; int next; if (i == runCount - 1) next = tabRuns[0]; else next = tabRuns[i + 1]; int end = (next != 0 ? next - 1 : tabCount - 1); for (int j = start; j <= end; ++j) | protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex) { Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); boolean isScroll = tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT; // Please note: the ordering of the painting is important. // we WANT to pai... |
if (rects[k].x + rects[k].width - rects[first].x > viewport .getWidth()) | if (j != selectedIndex) | protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex) { Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); boolean isScroll = tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT; // Please note: the ordering of the painting is important. // we WANT to pai... |
last = k; break; | paintTab(g, tabPlacement, rects, j, ir, tr); | protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex) { Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); boolean isScroll = tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT; // Please note: the ordering of the painting is important. // we WANT to pai... |
for (int j = first; j <= last; j++) { if (j != selectedIndex || isScroll) paintTab(g, tabPlacement, rects, j, ir, tr); } currRun = getPreviousTabRun(currRun); } if (! isScroll) | if (selectedIndex >= 0) | protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex) { Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); boolean isScroll = tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT; // Please note: the ordering of the painting is important. // we WANT to pai... |
if (fg == null) fg = tabPane.getForeground(); Color bg = tabPane.getBackgroundAt(tabIndex); if (bg == null) bg = tabPane.getBackground(); Color saved_color = g.getColor(); Font f = g.getFont(); g.setFont(font); if (tabPane.isEnabledAt(tabIndex)) | if (isSelected && (fg instanceof UIResource)) | protected void paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected) { View textView = getTextViewForTab(tabIndex); if (textView != null) { textView.paint(g, tex... |
int mnemIndex = tabPane.getDisplayedMnemonicIndexAt(tabIndex); | protected void paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected) { View textView = getTextViewForTab(tabIndex); if (textView != null) { textView.paint(g, tex... | |
g.setColor(saved_color); g.setFont(f); | protected void paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics, int tabIndex, String title, Rectangle textRect, boolean isSelected) { View textView = getTextViewForTab(tabIndex); if (textView != null) { textView.paint(g, tex... | |
Point p = new Point(x, y); | if (! tabPane.isValid()) tabPane.validate(); | public int tabForCoordinate(JTabbedPane pane, int x, int y) { Point p = new Point(x, y); int tabCount = tabPane.getTabCount(); int currRun = 1; for (int i = 0; i < runCount; i++) { int first = lastTabInRun(tabCount, getPreviousTabRun(currRun)) + 1; if (first == tabCount) first... |
int currRun = 1; for (int i = 0; i < runCount; i++) | int index = -1; for (int i = 0; i < tabCount; ++i) | public int tabForCoordinate(JTabbedPane pane, int x, int y) { Point p = new Point(x, y); int tabCount = tabPane.getTabCount(); int currRun = 1; for (int i = 0; i < runCount; i++) { int first = lastTabInRun(tabCount, getPreviousTabRun(currRun)) + 1; if (first == tabCount) first... |
int first = lastTabInRun(tabCount, getPreviousTabRun(currRun)) + 1; if (first == tabCount) first = 0; int last = lastTabInRun(tabCount, currRun); for (int j = first; j <= last; j++) | if (rects[i].contains(x, y)) | public int tabForCoordinate(JTabbedPane pane, int x, int y) { Point p = new Point(x, y); int tabCount = tabPane.getTabCount(); int currRun = 1; for (int i = 0; i < runCount; i++) { int first = lastTabInRun(tabCount, getPreviousTabRun(currRun)) + 1; if (first == tabCount) first... |
if (getTabBounds(pane, j).contains(p)) return j; | index = i; break; | public int tabForCoordinate(JTabbedPane pane, int x, int y) { Point p = new Point(x, y); int tabCount = tabPane.getTabCount(); int currRun = 1; for (int i = 0; i < runCount; i++) { int first = lastTabInRun(tabCount, getPreviousTabRun(currRun)) + 1; if (first == tabCount) first... |
currRun = getNextTabRun(currRun); | public int tabForCoordinate(JTabbedPane pane, int x, int y) { Point p = new Point(x, y); int tabCount = tabPane.getTabCount(); int currRun = 1; for (int i = 0; i < runCount; i++) { int first = lastTabInRun(tabCount, getPreviousTabRun(currRun)) + 1; if (first == tabCount) first... | |
return -1; | return index; | public int tabForCoordinate(JTabbedPane pane, int x, int y) { Point p = new Point(x, y); int tabCount = tabPane.getTabCount(); int currRun = 1; for (int i = 0; i < runCount; i++) { int first = lastTabInRun(tabCount, getPreviousTabRun(currRun)) + 1; if (first == tabCount) first... |
tabPane.setBackground(null); tabPane.setForeground(null); tabPane.setFont(null); | LookAndFeel.installColorsAndFont(tabPane, "TabbedPane.background", "TabbedPane.foreground", "TabbedPane.font"); | protected void uninstallDefaults() { calcRect = null; tabAreaRect = null; contentRect = null; tabRuns = null; contentBorderInsets = null; tabAreaInsets = null; selectedTabPadInsets = null; tabInsets = null; focus = null; darkShadow = null; shadow = null; lightHighlight = null; ... |
throws NotImplementedException | public void draw (Graphics2D graphics, float x, float y) { throw new Error ("not implemented"); } | |
throws NotImplementedException | public float getAdvance () { throw new Error ("not implemented"); } | |
throws NotImplementedException | public float getAscent () { throw new Error ("not implemented"); } | |
throws NotImplementedException | public Rectangle2D getBounds () { throw new Error ("not implemented"); } | |
throws NotImplementedException | public float getDescent () { throw new Error ("not implemented"); } | |
throws NotImplementedException | public int hashCode () { throw new Error ("not implemented"); } | |
ArrayList algorithmID = new ArrayList(1); | ArrayList algorithmID = new ArrayList(2); | public byte[] encodePublicKey(PublicKey key) { log.entering(this.getClass().getName(), "encodePublicKey()", key); if (! (key instanceof GnuRSAPublicKey)) throw new InvalidParameterException("key"); DERValue derOID = new DERValue(DER.OBJECT_IDENTIFIER, RSA_ALG_OID); GnuRSAPublicKey rsaKey = (GnuRSAPu... |
algorithmID.add(new DERValue(DER.NULL, null)); | public byte[] encodePublicKey(PublicKey key) { log.entering(this.getClass().getName(), "encodePublicKey()", key); if (! (key instanceof GnuRSAPublicKey)) throw new InvalidParameterException("key"); DERValue derOID = new DERValue(DER.OBJECT_IDENTIFIER, RSA_ALG_OID); GnuRSAPublicKey rsaKey = (GnuRSAPu... | |
return; | private void parseExtra() { // Already parsed? if ((known & KNOWN_EXTRA) != 0) return; if (extra == null) { known |= KNOWN_EXTRA; return; } try { int pos = 0; while (pos < extra.length) { int sig = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; int len = (extra... | |
return; | private void parseExtra() { // Already parsed? if ((known & KNOWN_EXTRA) != 0) return; if (extra == null) { known |= KNOWN_EXTRA; return; } try { int pos = 0; while (pos < extra.length) { int sig = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; int len = (extra... | |
throw new BAD_OPERATION("Name component expected"); | BAD_OPERATION bad = new BAD_OPERATION("Name component expected"); bad.initCause(ex); throw bad; | public static NameComponent extract(Any a) { try { return ((NameComponentHolder) a.extract_Streamable()).value; } catch (ClassCastException ex) { throw new BAD_OPERATION("Name component expected"); } } |
VmArrayClass(String name, AbstractVmClassLoader loader, boolean primitive, VmType componentType, int typeSize) { | VmArrayClass(String name, VmClassLoader loader, boolean primitive, VmType componentType, int typeSize) { | VmArrayClass(String name, AbstractVmClassLoader loader, boolean primitive, VmType componentType, int typeSize) { super(name, getObjectClass(), loader, primitive, typeSize); this.componentType = componentType; testClassType(); } |
final VmArrayClass getArrayClass(boolean link) { | final VmArrayClass<T[]> getArrayClass(String arrayClassName) { | final VmArrayClass getArrayClass(boolean link) { if (arrayClass == null) { arrayClass = createArrayClass(link, null); } return arrayClass; } |
public Info(String name, String vendor, String description, String version) | protected Info(String name, String vendor, String description, String version) | public Info(String name, String vendor, String description, String version) { this.name = name; this.vendor = vendor; this.description = description; this.version = version; } |
public boolean equals(Object obj) | public final boolean equals(Object obj) | public boolean equals(Object obj) { return super.equals(obj); } |
public String getDescription() | public final String getDescription() | public String getDescription() { return description; } |
public String getName() | public final String getName() | public String getName() { return name; } |
public String getVendor() | public final String getVendor() | public String getVendor() { return vendor; } |
public String getVersion() | public final String getVersion() | public String getVersion() { return version; } |
public int hashCode() | public final int hashCode() | public int hashCode() { return super.hashCode(); } |
public String toString() | public final String toString() | public String toString() { return name; } |
throws NotImplementedException | protected void decodeLineStyle(Object lineStyleFlag) { // FIXME: not implemented } | |
throws NotImplementedException | protected void paintHorizontalSeparators(Graphics g, JComponent c) { // FIXME: not implemented } | |
contentPane.setBounds(contentPaneBounds); | getContentPane().setBounds(contentPaneBounds); | public void layoutContainer(Container c) { if (glassPaneBounds == null || layeredPaneBounds == null || contentPaneBounds == null || menuBarBounds == null) { Insets i = getInsets(); int containerWidth = c.getBounds().width - i.left - i.right; int containerHeight = c... |
Dimension contentPrefSize = contentPane.getPreferredSize(); | Dimension contentPrefSize = getContentPane().getPreferredSize(); | public Dimension preferredLayoutSize(Container c) { Dimension prefSize = new Dimension(); Insets i = getInsets(); prefSize = new Dimension(i.left + i.right, i.top + i.bottom); Dimension contentPrefSize = contentPane.getPreferredSize(); prefSize.width += co... |
return false; | return isHeadless(); | public boolean isHeadlessInstance() { return false; } |
{ | protected byte[] getResult() { byte[] result = new byte[DIGEST_LENGTH]; // Encrypt checksum as last block. encryptBlock(checksum, 0); for (int i = 0; i < BLOCK_LENGTH; i++) { result[i] = work[i]; } return result; } | |
} | protected byte[] getResult() { byte[] result = new byte[DIGEST_LENGTH]; // Encrypt checksum as last block. encryptBlock(checksum, 0); for (int i = 0; i < BLOCK_LENGTH; i++) { result[i] = work[i]; } return result; } | |
{ | protected byte[] padBuffer() { int length = BLOCK_LENGTH - (int) (count % BLOCK_LENGTH); if (length == 0) { length = BLOCK_LENGTH; } byte[] pad = new byte[length]; for (int i = 0; i < length; i++) { pad[i] = (byte) length; } return pad; } | |
} | protected byte[] padBuffer() { int length = BLOCK_LENGTH - (int) (count % BLOCK_LENGTH); if (length == 0) { length = BLOCK_LENGTH; } byte[] pad = new byte[length]; for (int i = 0; i < length; i++) { pad[i] = (byte) length; } return pad; } | |
valid = Boolean.valueOf(DIGEST0.equals(Util.toString(new MD2().digest()))); | String d = Util.toString(new MD2().digest()); valid = Boolean.valueOf(DIGEST0.equals(d)); | public boolean selfTest() { if (valid == null) { valid = Boolean.valueOf(DIGEST0.equals(Util.toString(new MD2().digest()))); } return valid.booleanValue(); } |
requirementsValid[X_AXIS] = false; requirementsValid[Y_AXIS] = false; | public BoxView(Element element, int axis) { super(element); myAxis = axis; layoutValid[0] = false; layoutValid[1] = false; span[0] = 0; span[1] = 0; requirements[0] = new SizeRequirements(); requirements[1] = new SizeRequirements(); // Initialize the cache arrays. spans[0] = new int[0];... | |
res.maximum = 0; | res.maximum = Integer.MAX_VALUE; | protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements sr) { SizeRequirements res = sr; if (res == null) res = new SizeRequirements(); res.minimum = 0; res.preferred = 0; res.maximum = 0; res.alignment = 0.... |
boolean wasValid = isLayoutValid(myAxis); | protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a, ViewFactory vf) { // FIXME: What to do here? super.forwardUpdate(ec, e, a, vf); } | |
if (wasValid && ! isLayoutValid(myAxis)) { Container c = getContainer(); if (a != null && c != null) { int pos = e.getOffset(); int index = getViewIndexAtPosition(pos); Rectangle r = getInsideAllocation(a); if (myAxis == X_AXIS) { r.x += offsets[myAxis][index]; r.width -= offsets[myAxis][index]; } else { r.y += offsets... | protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent e, Shape a, ViewFactory vf) { // FIXME: What to do here? super.forwardUpdate(ec, e, a, vf); } | |
return span[Y_AXIS] + getTopInset() - getBottomInset(); | return span[Y_AXIS] + getTopInset() + getBottomInset(); | public int getHeight() { return span[Y_AXIS] + getTopInset() - getBottomInset(); } |
int weight = 1; if (axis == myAxis) weight = 0; | updateRequirements(axis); int weight = 0; if ((requirements[axis].preferred != requirements[axis].minimum) || (requirements[axis].preferred != requirements[axis].maximum)) weight = 1; | public int getResizeWeight(int axis) { if (axis != X_AXIS && axis != Y_AXIS) throw new IllegalArgumentException("Illegal axis argument"); int weight = 1; if (axis == myAxis) weight = 0; return weight; } |
Rectangle copy = new Rectangle(r); for (int i = 0; i < count; ++i) | if (myAxis == X_AXIS) | protected View getViewAtPoint(int x, int y, Rectangle r) { View result = null; int count = getViewCount(); Rectangle copy = new Rectangle(r); for (int i = 0; i < count; ++i) { copy.setBounds(r); // The next call modifies copy. childAllocation(i, copy); if (copy.contains(x... |
copy.setBounds(r); childAllocation(i, copy); if (copy.contains(x, y)) | if (x < r.x + offsets[X_AXIS][0]) | protected View getViewAtPoint(int x, int y, Rectangle r) { View result = null; int count = getViewCount(); Rectangle copy = new Rectangle(r); for (int i = 0; i < count; ++i) { copy.setBounds(r); // The next call modifies copy. childAllocation(i, copy); if (copy.contains(x... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.