rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
{ | { | protected ContainerListener createToolBarContListener() { return new ToolBarContListener(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
} | } | protected ContainerListener createToolBarContListener() { return new ToolBarContListener(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ | { | protected FocusListener createToolBarFocusListener() { return new ToolBarFocusListener(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
} | } | protected FocusListener createToolBarFocusListener() { return new ToolBarFocusListener(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ | { | public static ComponentUI createUI(JComponent c) { return new BasicToolBarUI(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
} | } | public static ComponentUI createUI(JComponent c) { return new BasicToolBarUI(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ | { | protected void dragTo(Point position, Point origin) { int loc = areaOfClick(origParent, SwingUtilities.convertPoint(toolBar, position, origParent)); if (loc != -1) { dragWindow.setBorderColor(dockingBorderColor); dragWindow.setBackground(dockingColor); } else { dragWindow.setBorderColor(floatingBorderColor); dragWindow.setBackground(floatingColor); } int w = 0; int h = 0; boolean tmp = ((loc == SwingConstants.NORTH) || (loc == SwingConstants.SOUTH) || (loc == -1)); if (((cachedOrientation == SwingConstants.HORIZONTAL) && tmp) || ((cachedOrientation == VERTICAL) && ! tmp)) { w = cachedBounds.width; h = cachedBounds.height; } else { w = cachedBounds.height; h = cachedBounds.width; } Point p = dragWindow.getOffset(); Insets insets = toolBar.getInsets(); dragWindow.setBounds((origin.x + position.x) - p.x - ((insets.left + insets.right) / 2), (origin.y + position.y) - p.y - ((insets.top + insets.bottom) / 2), w, h); if (! dragWindow.isVisible()) dragWindow.show(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
} | } | protected void dragTo(Point position, Point origin) { int loc = areaOfClick(origParent, SwingUtilities.convertPoint(toolBar, position, origParent)); if (loc != -1) { dragWindow.setBorderColor(dockingBorderColor); dragWindow.setBackground(dockingColor); } else { dragWindow.setBorderColor(floatingBorderColor); dragWindow.setBackground(floatingColor); } int w = 0; int h = 0; boolean tmp = ((loc == SwingConstants.NORTH) || (loc == SwingConstants.SOUTH) || (loc == -1)); if (((cachedOrientation == SwingConstants.HORIZONTAL) && tmp) || ((cachedOrientation == VERTICAL) && ! tmp)) { w = cachedBounds.width; h = cachedBounds.height; } else { w = cachedBounds.height; h = cachedBounds.width; } Point p = dragWindow.getOffset(); Insets insets = toolBar.getInsets(); dragWindow.setBounds((origin.x + position.x) - p.x - ((insets.left + insets.right) / 2), (origin.y + position.y) - p.y - ((insets.top + insets.bottom) / 2), w, h); if (! dragWindow.isVisible()) dragWindow.show(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ | { | protected void floatAt(Point position, Point origin) { Point p = new Point(position); int aoc = areaOfClick(origParent, SwingUtilities.convertPoint(toolBar, p, origParent)); Container oldParent = toolBar.getParent(); oldParent.remove(toolBar); oldParent.doLayout(); oldParent.repaint(); Container newParent; if (aoc == -1) newParent = ((RootPaneContainer) floatFrame).getContentPane(); else { floatFrame.hide(); newParent = origParent; } String constraint; switch (aoc) { case SwingConstants.EAST: constraint = BorderLayout.EAST; break; case SwingConstants.NORTH: constraint = BorderLayout.NORTH; break; case SwingConstants.SOUTH: constraint = BorderLayout.SOUTH; break; case SwingConstants.WEST: constraint = BorderLayout.WEST; break; default: constraint = BorderLayout.CENTER; break; } int newOrientation = SwingConstants.HORIZONTAL; if ((aoc != -1) && ((aoc == SwingConstants.EAST) || (aoc == SwingConstants.WEST))) newOrientation = SwingConstants.VERTICAL; if (aoc != -1) { constraintBeforeFloating = constraint; lastGoodOrientation = newOrientation; } newParent.add(toolBar, constraint); setFloating(aoc == -1, null); toolBar.setOrientation(newOrientation); Insets insets = floatFrame.getInsets(); Dimension dims = toolBar.getPreferredSize(); p = dragWindow.getOffset(); setFloatingLocation((position.x + origin.x) - p.x - ((insets.left + insets.right) / 2), (position.y + origin.y) - p.y - ((insets.top + insets.bottom) / 2)); if (aoc == -1) { floatFrame.pack(); floatFrame.setSize(dims.width + insets.left + insets.right, dims.height + insets.top + insets.bottom); floatFrame.show(); } newParent.invalidate(); newParent.validate(); newParent.repaint(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
} | } | protected void floatAt(Point position, Point origin) { Point p = new Point(position); int aoc = areaOfClick(origParent, SwingUtilities.convertPoint(toolBar, p, origParent)); Container oldParent = toolBar.getParent(); oldParent.remove(toolBar); oldParent.doLayout(); oldParent.repaint(); Container newParent; if (aoc == -1) newParent = ((RootPaneContainer) floatFrame).getContentPane(); else { floatFrame.hide(); newParent = origParent; } String constraint; switch (aoc) { case SwingConstants.EAST: constraint = BorderLayout.EAST; break; case SwingConstants.NORTH: constraint = BorderLayout.NORTH; break; case SwingConstants.SOUTH: constraint = BorderLayout.SOUTH; break; case SwingConstants.WEST: constraint = BorderLayout.WEST; break; default: constraint = BorderLayout.CENTER; break; } int newOrientation = SwingConstants.HORIZONTAL; if ((aoc != -1) && ((aoc == SwingConstants.EAST) || (aoc == SwingConstants.WEST))) newOrientation = SwingConstants.VERTICAL; if (aoc != -1) { constraintBeforeFloating = constraint; lastGoodOrientation = newOrientation; } newParent.add(toolBar, constraint); setFloating(aoc == -1, null); toolBar.setOrientation(newOrientation); Insets insets = floatFrame.getInsets(); Dimension dims = toolBar.getPreferredSize(); p = dragWindow.getOffset(); setFloatingLocation((position.x + origin.x) - p.x - ((insets.left + insets.right) / 2), (position.y + origin.y) - p.y - ((insets.top + insets.bottom) / 2)); if (aoc == -1) { floatFrame.pack(); floatFrame.setSize(dims.width + insets.left + insets.right, dims.height + insets.top + insets.bottom); floatFrame.show(); } newParent.invalidate(); newParent.validate(); newParent.repaint(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ return dockingColor; } | { return dockingColor; } | public Color getDockingColor() { return dockingColor; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ return floatingColor; } | { return floatingColor; } | public Color getFloatingColor() { return floatingColor; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ | { | public Dimension getMaximumSize(JComponent c) { return getPreferredSize(c); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
} | } | public Dimension getMaximumSize(JComponent c) { return getPreferredSize(c); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ | { | public Dimension getMinimumSize(JComponent c) { return getPreferredSize(c); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
} | } | public Dimension getMinimumSize(JComponent c) { return getPreferredSize(c); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ | { | protected void installComponents() { floatFrame = (Window) createFloatingWindow(toolBar); dragWindow = createDragWindow(toolBar); cachedBounds = toolBar.getPreferredSize(); cachedOrientation = toolBar.getOrientation(); nonRolloverBorder = createNonRolloverBorder(); rolloverBorder = createRolloverBorder(); borders = new Hashtable(); fillHashtable(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
} | } | protected void installComponents() { floatFrame = (Window) createFloatingWindow(toolBar); dragWindow = createDragWindow(toolBar); cachedBounds = toolBar.getPreferredSize(); cachedOrientation = toolBar.getOrientation(); nonRolloverBorder = createNonRolloverBorder(); rolloverBorder = createRolloverBorder(); borders = new Hashtable(); fillHashtable(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ | { | protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); toolBar.setBorder(new ToolBarBorder()); toolBar.setBackground(defaults.getColor("ToolBar.background")); toolBar.setForeground(defaults.getColor("ToolBar.foreground")); toolBar.setFont(defaults.getFont("ToolBar.font")); dockingBorderColor = defaults.getColor("ToolBar.dockingForeground"); dockingColor = defaults.getColor("ToolBar.dockingBackground"); floatingBorderColor = defaults.getColor("ToolBar.floatingForeground"); floatingColor = defaults.getColor("ToolBar.floatingBackground"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
} | } | protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); toolBar.setBorder(new ToolBarBorder()); toolBar.setBackground(defaults.getColor("ToolBar.background")); toolBar.setForeground(defaults.getColor("ToolBar.foreground")); toolBar.setFont(defaults.getFont("ToolBar.font")); dockingBorderColor = defaults.getColor("ToolBar.dockingForeground"); dockingColor = defaults.getColor("ToolBar.dockingBackground"); floatingBorderColor = defaults.getColor("ToolBar.floatingForeground"); floatingColor = defaults.getColor("ToolBar.floatingBackground"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ | { | protected void installKeyboardActions() { // FIXME: implement. } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
} | } | protected void installKeyboardActions() { // FIXME: implement. } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ | { | protected void installListeners(JToolBar toolbar) { dockingListener = createDockingListener(); toolBar.addMouseListener(dockingListener); toolBar.addMouseMotionListener(dockingListener); propertyListener = createPropertyListener(); toolBar.addPropertyChangeListener(propertyListener); toolBarContListener = createToolBarContListener(); toolBar.addContainerListener(toolBarContListener); windowListener = createFrameListener(); floatFrame.addWindowListener(windowListener); toolBarFocusListener = createToolBarFocusListener(); toolBar.addFocusListener(toolBarFocusListener); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ | { | protected void installNonRolloverBorders(JComponent c) { Component[] components = toolBar.getComponents(); for (int i = 0; i < components.length; i++) setBorderToNonRollover(components[i]); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
} | } | protected void installNonRolloverBorders(JComponent c) { Component[] components = toolBar.getComponents(); for (int i = 0; i < components.length; i++) setBorderToNonRollover(components[i]); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ | { | protected void installNormalBorders(JComponent c) { Component[] components = toolBar.getComponents(); for (int i = 0; i < components.length; i++) setBorderToNormal(components[i]); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
} | } | protected void installNormalBorders(JComponent c) { Component[] components = toolBar.getComponents(); for (int i = 0; i < components.length; i++) setBorderToNormal(components[i]); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ | { | protected void installRolloverBorders(JComponent c) { Component[] components = toolBar.getComponents(); for (int i = 0; i < components.length; i++) setBorderToRollover(components[i]); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
} | } | protected void installRolloverBorders(JComponent c) { Component[] components = toolBar.getComponents(); for (int i = 0; i < components.length; i++) setBorderToRollover(components[i]); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ super.installUI(c); | { super.installUI(c); | public void installUI(JComponent c) { super.installUI(c); if (c instanceof JToolBar) { toolBar = (JToolBar) c; toolBar.setOpaque(true); installDefaults(); installComponents(); installListeners(toolBar); installKeyboardActions(); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
if (c instanceof JToolBar) { toolBar = (JToolBar) c; toolBar.setOpaque(true); | if (c instanceof JToolBar) { toolBar = (JToolBar) c; toolBar.setOpaque(true); | public void installUI(JComponent c) { super.installUI(c); if (c instanceof JToolBar) { toolBar = (JToolBar) c; toolBar.setOpaque(true); installDefaults(); installComponents(); installListeners(toolBar); installKeyboardActions(); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
installListeners(toolBar); | installListeners(toolBar); | public void installUI(JComponent c) { super.installUI(c); if (c instanceof JToolBar) { toolBar = (JToolBar) c; toolBar.setOpaque(true); installDefaults(); installComponents(); installListeners(toolBar); installKeyboardActions(); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
} } | } } | public void installUI(JComponent c) { super.installUI(c); if (c instanceof JToolBar) { toolBar = (JToolBar) c; toolBar.setOpaque(true); installDefaults(); installComponents(); installListeners(toolBar); installKeyboardActions(); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ | { | public boolean isFloating() { return floatFrame.isVisible(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
} | } | public boolean isFloating() { return floatFrame.isVisible(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ | { | public boolean isRolloverBorders() { return toolBar.isRollover(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
} | } | public boolean isRolloverBorders() { return toolBar.isRollover(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ | { | protected void navigateFocusedComp(int direction) { // FIXME: Implement. } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
} | } | protected void navigateFocusedComp(int direction) { // FIXME: Implement. } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ | { | protected void setBorderToNonRollover(Component c) { if (c instanceof JButton) { JButton b = (JButton) c; b.setRolloverEnabled(false); b.setBorder(nonRolloverBorder); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
} | } | protected void setBorderToNonRollover(Component c) { if (c instanceof JButton) { JButton b = (JButton) c; b.setRolloverEnabled(false); b.setBorder(nonRolloverBorder); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ | { | protected void setBorderToNormal(Component c) { if (c instanceof JButton) { JButton b = (JButton) c; Border border = (Border) borders.get(b); b.setBorder(border); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
} | } | protected void setBorderToNormal(Component c) { if (c instanceof JButton) { JButton b = (JButton) c; Border border = (Border) borders.get(b); b.setBorder(border); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ | { | protected void setBorderToRollover(Component c) { if (c instanceof JButton) { JButton b = (JButton) c; b.setRolloverEnabled(true); b.setBorder(rolloverBorder); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
} | } | protected void setBorderToRollover(Component c) { if (c instanceof JButton) { JButton b = (JButton) c; b.setRolloverEnabled(true); b.setBorder(rolloverBorder); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ dockingColor = c; } | { dockingColor = c; } | public void setDockingColor(Color c) { dockingColor = c; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ | { | public void setFloatingColor(Color c) { floatingColor = c; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
} | } | public void setFloatingColor(Color c) { floatingColor = c; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ | { | protected void uninstallComponents() { installNormalBorders(toolBar); borders = null; rolloverBorder = null; nonRolloverBorder = null; cachedBounds = null; floatFrame = null; dragWindow = null; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
} | } | protected void uninstallDefaults() { toolBar.setBackground(null); toolBar.setForeground(null); toolBar.setFont(null); dockingBorderColor = null; dockingColor = null; floatingBorderColor = null; floatingColor = null; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ | { | protected void uninstallKeyboardActions() { // FIXME: implement. } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
} | } | protected void uninstallKeyboardActions() { // FIXME: implement. } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ | { | protected void uninstallListeners() { toolBar.removeFocusListener(toolBarFocusListener); toolBarFocusListener = null; floatFrame.removeWindowListener(windowListener); windowListener = null; toolBar.removeContainerListener(toolBarContListener); toolBarContListener = null; toolBar.removeMouseMotionListener(dockingListener); toolBar.removeMouseListener(dockingListener); dockingListener = null; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
} | } | protected void uninstallListeners() { toolBar.removeFocusListener(toolBarFocusListener); toolBarFocusListener = null; floatFrame.removeWindowListener(windowListener); windowListener = null; toolBar.removeContainerListener(toolBarContListener); toolBarContListener = null; toolBar.removeMouseMotionListener(dockingListener); toolBar.removeMouseListener(dockingListener); dockingListener = null; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
{ | { | public void uninstallUI(JComponent c) { uninstallKeyboardActions(); uninstallListeners(); uninstallComponents(); uninstallDefaults(); toolBar = null; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicToolBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicToolBarUI.java |
public Window(Frame owner) | Window() | public Window(Frame owner) { this (owner, owner.getGraphicsConfiguration ()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6e9e807110ca5387384fb5569869118ad80844bc/Window.java/buggy/core/src/classpath/java/java/awt/Window.java |
this (owner, owner.getGraphicsConfiguration ()); | visible = false; focusCycleRoot = true; setLayout(new BorderLayout()); addWindowFocusListener (new WindowAdapter () { public void windowGainedFocus (WindowEvent event) { if (windowFocusOwner != null) { EventQueue eq = Toolkit.getDefaultToolkit ().getSystemEventQueue (); synchronized (eq) { KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager (); Component currentFocusOwner = manager.getGlobalPermanentFocusOwner (); if (currentFocusOwner != null) { eq.postEvent (new FocusEvent (currentFocusOwner, FocusEvent.FOCUS_LOST, false, windowFocusOwner)); eq.postEvent (new FocusEvent (windowFocusOwner, FocusEvent.FOCUS_GAINED, false, currentFocusOwner)); } else eq.postEvent (new FocusEvent (windowFocusOwner, FocusEvent.FOCUS_GAINED, false)); } } } }); GraphicsEnvironment g = GraphicsEnvironment.getLocalGraphicsEnvironment(); graphicsConfiguration = g.getDefaultScreenDevice().getDefaultConfiguration(); | public Window(Frame owner) { this (owner, owner.getGraphicsConfiguration ()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6e9e807110ca5387384fb5569869118ad80844bc/Window.java/buggy/core/src/classpath/java/java/awt/Window.java |
{ | { | public void drawRect(int x, int y, int width, int height){ int x1 = x; int y1 = y; int x2 = x + width; int y2 = y + height; drawLine(x1, y1, x2, y1); drawLine(x2, y1, x2, y2); drawLine(x2, y2, x1, y2); drawLine(x1, y2, x1, y1);} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Graphics.java/buggy/core/src/classpath/java/java/awt/Graphics.java |
} | } | public void drawRect(int x, int y, int width, int height){ int x1 = x; int y1 = y; int x2 = x + width; int y2 = y + height; drawLine(x1, y1, x2, y1); drawLine(x2, y1, x2, y2); drawLine(x2, y2, x1, y2); drawLine(x1, y2, x1, y1);} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Graphics.java/buggy/core/src/classpath/java/java/awt/Graphics.java |
void paintBorder(Component c, Graphics g, int x, int y, int width, int height); | void paintBorder(Component c, Graphics g, int x, int y, int width, int height); | void paintBorder(Component c, Graphics g, int x, int y, int width, int height); | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/Border.java/buggy/core/src/classpath/javax/javax/swing/border/Border.java |
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) | public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) | public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { switch (etchType) { case RAISED: paintEtchedBorder(g, x, y, width, height, getHighlightColor(c), getShadowColor(c)); break; case LOWERED: paintEtchedBorder(g, x, y, width, height, getShadowColor(c), getHighlightColor(c)); break; } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/EtchedBorder.java/buggy/core/src/classpath/javax/javax/swing/border/EtchedBorder.java |
public static Point convertPoint(Component source, Point aPoint, Component destination) | public static Point convertPoint(Component source, int x, int y, Component destination) | public static Point convertPoint(Component source, Point aPoint, Component destination) { return convertPoint(source, aPoint.x, aPoint.y, destination); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/SwingUtilities.java/buggy/core/src/classpath/javax/javax/swing/SwingUtilities.java |
return convertPoint(source, aPoint.x, aPoint.y, destination); | Point pt = new Point(x, y); if (source == null && destination == null) return pt; if (source == null) source = getRoot(destination); if (destination == null) destination = getRoot(source); if (source.isShowing() && destination.isShowing()) { convertPointToScreen(pt, source); convertPointFromScreen(pt, destination); } return pt; | public static Point convertPoint(Component source, Point aPoint, Component destination) { return convertPoint(source, aPoint.x, aPoint.y, destination); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/SwingUtilities.java/buggy/core/src/classpath/javax/javax/swing/SwingUtilities.java |
public SecurityException(String s) { super(s); | public SecurityException() { | public SecurityException(String s) { super(s); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b2ed890086e708f00d163f3e8514bfa8b353f662/SecurityException.java/clean/core/src/classpath/java/java/lang/SecurityException.java |
public RuntimeException(String s) | public RuntimeException() | public RuntimeException(String s) { super(s); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7c463aa3bd840a934d101c434976bb7b25d5b975/RuntimeException.java/buggy/core/src/classpath/java/java/lang/RuntimeException.java |
super(s); | public RuntimeException(String s) { super(s); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7c463aa3bd840a934d101c434976bb7b25d5b975/RuntimeException.java/buggy/core/src/classpath/java/java/lang/RuntimeException.java |
|
throw new IllegalArgumentException("orientation must be one of VERTICAL or HORIZONTAL"); | throw new IllegalArgumentException(orientation + " is not a legal orientation"); | public void setOrientation(int orientation) { if (orientation != VERTICAL && orientation != HORIZONTAL) throw new IllegalArgumentException("orientation must be one of VERTICAL or HORIZONTAL"); if (this.orientation != orientation) { int oldOrientation = this.orientation; this.orientation = orientation; firePropertyChange("orientation", oldOrientation, this.orientation); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/JProgressBar.java/clean/core/src/classpath/javax/javax/swing/JProgressBar.java |
public DefaultBoundedRangeModel(int value, int extent, int minimum, int maximum) | public DefaultBoundedRangeModel() | public DefaultBoundedRangeModel(int value, int extent, int minimum, int maximum) { if (!(minimum <= value && extent >= 0 && (value + extent) <= maximum)) throw new IllegalArgumentException(); this.value = value; this.extent = extent; this.minimum = minimum; this.maximum = maximum; // The isAdjusting field already has a false value by default. } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/DefaultBoundedRangeModel.java/buggy/core/src/classpath/javax/javax/swing/DefaultBoundedRangeModel.java |
if (!(minimum <= value && extent >= 0 && (value + extent) <= maximum)) throw new IllegalArgumentException(); this.value = value; this.extent = extent; this.minimum = minimum; this.maximum = maximum; | maximum = 100; | public DefaultBoundedRangeModel(int value, int extent, int minimum, int maximum) { if (!(minimum <= value && extent >= 0 && (value + extent) <= maximum)) throw new IllegalArgumentException(); this.value = value; this.extent = extent; this.minimum = minimum; this.maximum = maximum; // The isAdjusting field already has a false value by default. } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/DefaultBoundedRangeModel.java/buggy/core/src/classpath/javax/javax/swing/DefaultBoundedRangeModel.java |
screen.copyMe(); | screen.pasteMe(false); | private void doPopup (MouseEvent me) { JMenuItem menuItem; Action action; popup = new JPopupMenu(); final Gui5250 g = this; JMenuItem mi; final int pos = screen.getPosFromView(me.getX(),me.getY()); if (!rubberband.isAreaSelected() && screen.isInField(pos,false) ) { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyField(pos); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.copyMe(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); popup.addSeparator(); } else { action = new AbstractAction(LangTool.getString("popup.copy")) { public void actionPerformed(ActionEvent e) { screen.copyMe(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_COPY)); action = new AbstractAction(LangTool.getString("popup.paste")) { public void actionPerformed(ActionEvent e) { screen.sendKeys(MNEMONIC_PASTE); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PASTE)); action = new AbstractAction(LangTool.getString("popup.pasteSpecial")) { public void actionPerformed(ActionEvent e) { screen.pasteMe(true); getFocusForMe(); } }; popup.add(action); Rectangle workR = new Rectangle(); if (rubberband.isAreaSelected()) { // get the bounded area of the selection screen.getBoundingArea(workR); popup.addSeparator(); menuItem = new JMenuItem(LangTool.getString("popup.selectedColumns") + " " + workR.width); menuItem.setArmed(false); popup.add(menuItem); menuItem = new JMenuItem(LangTool.getString("popup.selectedRows") + " " + workR.height); menuItem.setArmed(false); popup.add(menuItem); JMenu sumMenu = new JMenu(LangTool.getString("popup.calc")); popup.add(sumMenu); action = new AbstractAction(LangTool.getString("popup.calcGroupCD")) { public void actionPerformed(ActionEvent e) { sumArea(true); } }; sumMenu.add(action); action = new AbstractAction(LangTool.getString("popup.calcGroupDC")) { public void actionPerformed(ActionEvent e) { sumArea(false); } }; sumMenu.add(action); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.printScreen")) { public void actionPerformed(ActionEvent e) { screen.printMe(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_PRINT_SCREEN)); popup.addSeparator(); JMenu kbMenu = new JMenu(LangTool.getString("popup.keyboard")); popup.add(kbMenu); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); } }; kbMenu.add(action); kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[attn]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[attn]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ATTN)); action = new AbstractAction(LangTool.getString("key.[reset]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[reset]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_RESET)); action = new AbstractAction(LangTool.getString("key.[sysreq]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[sysreq]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_SYSREQ)); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } kbMenu.addSeparator(); action = new AbstractAction(LangTool.getString("key.[dupfield]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[dupfield]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_DUP_FIELD)); action = new AbstractAction(LangTool.getString("key.[help]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[help]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_HELP)); action = new AbstractAction(LangTool.getString("key.[eraseeof]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[eraseeof]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_ERASE_EOF)); action = new AbstractAction(LangTool.getString("key.[field+]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field+]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_PLUS)); action = new AbstractAction(LangTool.getString("key.[field-]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[field-]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_FIELD_MINUS)); action = new AbstractAction(LangTool.getString("key.[newline]")) { public void actionPerformed(ActionEvent e) { screen.sendKeys("[newline]"); } }; kbMenu.add(createMenuItem(action,MNEMONIC_NEW_LINE)); action = new AbstractAction(LangTool.getString("popup.hostPrint")) { public void actionPerformed(ActionEvent e) { vt.hostPrint(1); } }; kbMenu.add(createMenuItem(action,MNEMONIC_PRINT)); createShortCutItems(kbMenu); if (screen.isMessageWait()) { action = new AbstractAction(LangTool.getString("popup.displayMessages")) { public void actionPerformed(ActionEvent e) { vt.systemRequest('4'); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_MESSAGES)); } popup.addSeparator(); action = new AbstractAction(LangTool.getString("popup.hexMap")) { public void actionPerformed(ActionEvent e) { showHexMap(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.mapKeys")) { public void actionPerformed(ActionEvent e) { mapMeKeys(); getFocusForMe(); } }; popup.add(createMenuItem(action,"")); action = new AbstractAction(LangTool.getString("popup.settings")) { public void actionPerformed(ActionEvent e) { doAttributes(); getFocusForMe(); } }; popup.add(createMenuItem(action,MNEMONIC_DISP_ATTRIBUTES)); popup.addSeparator(); if (isMacroRunning()) { action = new AbstractAction(LangTool.getString("popup.stopScript")) { public void actionPerformed(ActionEvent e) { setStopMacroRequested(); } }; popup.add(action); } else { JMenu macMenu = new JMenu(LangTool.getString("popup.macros")); if (keyHandler.isRecording()) { action = new AbstractAction(LangTool.getString("popup.stop")) { public void actionPerformed(ActionEvent e) { stopRecordingMe(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.record")) { public void actionPerformed(ActionEvent e) { startRecordingMe(); getFocusForMe(); } }; } macMenu.add(action); if (macros.isMacrosExist()) { // this will add a sorted list of the macros to the macro menu addMacros(macMenu); } popup.add(macMenu); } popup.addSeparator(); JMenu xtfrMenu = new JMenu(LangTool.getString("popup.export")); action = new AbstractAction(LangTool.getString("popup.xtfrFile")) { public void actionPerformed(ActionEvent e) { doMeTransfer(); getFocusForMe(); } }; xtfrMenu.add(createMenuItem(action,MNEMONIC_FILE_TRANSFER)); action = new AbstractAction(LangTool.getString("popup.xtfrSpool")) { public void actionPerformed(ActionEvent e) { doMeSpool(); getFocusForMe(); } }; xtfrMenu.add(action); popup.add(xtfrMenu); JMenu sendMenu = new JMenu(LangTool.getString("popup.send")); popup.add(sendMenu); action = new AbstractAction(LangTool.getString("popup.email")) { public void actionPerformed(ActionEvent e) { sendScreenEMail(); getFocusForMe(); } }; sendMenu.add(createMenuItem(action,MNEMONIC_E_MAIL)); action = new AbstractAction(LangTool.getString("popup.file")) { public void actionPerformed(ActionEvent e) { sendMeToFile(); } }; sendMenu.add(action); popup.addSeparator(); } action = new AbstractAction(LangTool.getString("popup.connections")) { public void actionPerformed(ActionEvent e) { doConnections(); } }; popup.add(createMenuItem(action,MNEMONIC_OPEN_NEW)); popup.addSeparator(); if (vt.isConnected()) { action = new AbstractAction(LangTool.getString("popup.disconnect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } else { action = new AbstractAction(LangTool.getString("popup.connect")) { public void actionPerformed(ActionEvent e) { changeConnection(); getFocusForMe(); } }; } popup.add(createMenuItem(action,MNEMONIC_TOGGLE_CONNECTION)); action = new AbstractAction(LangTool.getString("popup.close")) { public void actionPerformed(ActionEvent e) { closeSession(); } }; popup.add(createMenuItem(action,MNEMONIC_CLOSE)); GUIGraphicsUtils.positionPopup(me.getComponent(),popup, me.getX(),me.getY()); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/6c5751be2425bbd77709da94b1a544cb9d9d7c1e/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java |
screen.copyMe(); | screen.pasteMe(false); | public void actionPerformed(ActionEvent e) { screen.copyMe(); getFocusForMe(); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/6c5751be2425bbd77709da94b1a544cb9d9d7c1e/Gui5250.java/clean/tn5250j/src/org/tn5250j/Gui5250.java |
BorderLayout() { | public BorderLayout() { | BorderLayout(){ this(0,0);} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1e7aa2954f7fa9e45a7b68da25c13d3846158a39/BorderLayout.java/buggy/core/src/classpath/java/java/awt/BorderLayout.java |
} | } | BorderLayout(){ this(0,0);} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1e7aa2954f7fa9e45a7b68da25c13d3846158a39/BorderLayout.java/buggy/core/src/classpath/java/java/awt/BorderLayout.java |
this(new FlowLayout(), true); | this(new FlowLayout(), true); | public JPanel() { this(new FlowLayout(), true); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/JPanel.java/buggy/core/src/classpath/javax/javax/swing/JPanel.java |
public void setBounds(int x, int y, int width, int height) | public void setBounds(Rectangle r) | public void setBounds(int x, int y, int width, int height) { reshape (x, y, width, height); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c703200057968fb1fad7e17bbcfd87040b579718/Rectangle.java/buggy/core/src/classpath/java/java/awt/Rectangle.java |
reshape (x, y, width, height); | setBounds (r.x, r.y, r.width, r.height); | public void setBounds(int x, int y, int width, int height) { reshape (x, y, width, height); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c703200057968fb1fad7e17bbcfd87040b579718/Rectangle.java/buggy/core/src/classpath/java/java/awt/Rectangle.java |
protected final Point getEndPoint() { | protected Point getEndPoint() { | protected final Point getEndPoint() { if(this.endPoint == null) { setEndPoint(new Point(0,0)); } return this.endPoint; } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/RubberBand.java/buggy/tn5250j/src/org/tn5250j/RubberBand.java |
protected final Point getStartPoint() { | protected Point getStartPoint() { | protected final Point getStartPoint() { if(this.startPoint == null) { setStartPoint(new Point(0,0)); } return this.startPoint; } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/30f98b37d145e16ed4c5e314b8cf6d272bab1023/RubberBand.java/buggy/tn5250j/src/org/tn5250j/RubberBand.java |
public Thread(Runnable target) { this(null, target, autoName()); | public Thread() { this(null, null, autoName()); | public Thread(Runnable target) { this(null, target, autoName()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/34018d58ddf97a144be387eabd5b8ae715c6f8a5/Thread.java/buggy/core/src/classpath/vm/java/lang/Thread.java |
public static int showConfirmDialog(Component parentComponent, Object message, String title, int optionType) | public static int showConfirmDialog(Component parentComponent, Object message) | public static int showConfirmDialog(Component parentComponent, Object message, String title, int optionType) { JOptionPane pane = new JOptionPane(message, PLAIN_MESSAGE, optionType); JDialog dialog = pane.createDialog(parentComponent, title); dialog.pack(); dialog.show(); return ((Integer) pane.getValue()).intValue(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java |
JOptionPane pane = new JOptionPane(message, PLAIN_MESSAGE, optionType); JDialog dialog = pane.createDialog(parentComponent, title); | JOptionPane pane = new JOptionPane(message, QUESTION_MESSAGE); JDialog dialog = pane.createDialog(parentComponent, "Select an Option"); | public static int showConfirmDialog(Component parentComponent, Object message, String title, int optionType) { JOptionPane pane = new JOptionPane(message, PLAIN_MESSAGE, optionType); JDialog dialog = pane.createDialog(parentComponent, title); dialog.pack(); dialog.show(); return ((Integer) pane.getValue()).intValue(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java |
return ((Integer) pane.getValue()).intValue(); | if (pane.getValue() instanceof Integer) return ((Integer) pane.getValue()).intValue(); return -1; | public static int showConfirmDialog(Component parentComponent, Object message, String title, int optionType) { JOptionPane pane = new JOptionPane(message, PLAIN_MESSAGE, optionType); JDialog dialog = pane.createDialog(parentComponent, title); dialog.pack(); dialog.show(); return ((Integer) pane.getValue()).intValue(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java |
int x, int y, int clickCount, boolean popupTrigger) | int x, int y, int clickCount, boolean popupTrigger, int button) | public MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger) { this(source, id, when, modifiers, x, y, clickCount, popupTrigger, NOBUTTON); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/560cf787ab92cba97cf57ce7b258e72947e5efbc/MouseEvent.java/buggy/core/src/classpath/java/java/awt/event/MouseEvent.java |
this(source, id, when, modifiers, x, y, clickCount, popupTrigger, NOBUTTON); | super(source, id, when, modifiers); this.x = x; this.y = y; this.clickCount = clickCount; this.popupTrigger = popupTrigger; this.button = button; if (button < NOBUTTON || button > BUTTON3) throw new IllegalArgumentException(); if ((modifiers & EventModifier.OLD_MASK) != 0) { if ((modifiers & BUTTON1_MASK) != 0) this.button = BUTTON1; else if ((modifiers & BUTTON2_MASK) != 0) this.button = BUTTON2; else if ((modifiers & BUTTON3_MASK) != 0) this.button = BUTTON3; } | public MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger) { this(source, id, when, modifiers, x, y, clickCount, popupTrigger, NOBUTTON); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/560cf787ab92cba97cf57ce7b258e72947e5efbc/MouseEvent.java/buggy/core/src/classpath/java/java/awt/event/MouseEvent.java |
Object message, String title, int messageType, Icon icon) | Object message) | public static void showMessageDialog(Component parentComponent, Object message, String title, int messageType, Icon icon) { JOptionPane pane = new JOptionPane(message, messageType); pane.setIcon(icon); JDialog dialog = pane.createDialog(parentComponent, title); dialog.pack(); dialog.show(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java |
JOptionPane pane = new JOptionPane(message, messageType); pane.setIcon(icon); JDialog dialog = pane.createDialog(parentComponent, title); | JOptionPane pane = new JOptionPane(message, INFORMATION_MESSAGE); JDialog dialog = pane.createDialog(parentComponent, null); | public static void showMessageDialog(Component parentComponent, Object message, String title, int messageType, Icon icon) { JOptionPane pane = new JOptionPane(message, messageType); pane.setIcon(icon); JDialog dialog = pane.createDialog(parentComponent, title); dialog.pack(); dialog.show(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java |
public boolean isInField(int pos, boolean chgToField) { | public boolean isInField() { | public boolean isInField(int pos, boolean chgToField) { return screenFields.isInField(pos,chgToField); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/0166767548ad2224376eff5004531d67a0ff55d6/Screen5250.java/buggy/tn5250j/src/org/tn5250j/Screen5250.java |
return screenFields.isInField(pos,chgToField); | return isInField(lastPos,true); | public boolean isInField(int pos, boolean chgToField) { return screenFields.isInField(pos,chgToField); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/0166767548ad2224376eff5004531d67a0ff55d6/Screen5250.java/buggy/tn5250j/src/org/tn5250j/Screen5250.java |
public final static boolean isMacrosExist() { return macrosExist; } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/69e4ad8b79244d7a9ead6ae9be5f21d5cf302742/Macronizer.java/buggy/tn5250j/src/org/tn5250j/tools/Macronizer.java |
||
public final void systemRequest(char sr) { if (sr == ' ') { JPanel srp = new JPanel(); srp.setLayout(new BorderLayout()); JLabel jl = new JLabel("Enter alternate job"); final JTextField sro = new JTextField(); srp.add(jl,BorderLayout.NORTH); srp.add(sro,BorderLayout.CENTER); Object[] message = new Object[1]; message[0] = srp; String[] options = {"SysReq","Cancel"}; final JOptionPane pane = new JOptionPane( message, JOptionPane.QUESTION_MESSAGE, JOptionPane.DEFAULT_OPTION, null, options, options[0]); final JDialog dialog = pane.createDialog(null, "System Request" ); dialog.addWindowListener( new WindowAdapter() { public void windowOpened( WindowEvent e) { super.windowOpened( e ); sro.requestFocus(); } }); dialog.show(); String value = (String)pane.getValue(); if (value.equals(options[0])) { if (sro.getText().length() > 0) { for (int x = 0; x < sro.getText().length(); x++) { if (sro.getText().charAt(0) == '2') { dsq.clear(); } baosp.write(getEBCDIC(sro.getText().charAt(x))); } try { writeGDS(4, 0, baosp.toByteArray()); } catch (IOException ioe) { System.out.println(ioe.getMessage()); } baosp.reset(); } else { try { writeGDS(4, 0, null); } catch (IOException ioe) { System.out.println(ioe.getMessage()); } } } controller.requestFocus(); } else { baosp.write(getEBCDIC(sr)); try { writeGDS(4, 0, baosp.toByteArray()); } catch (IOException ioe) { baosp.reset(); System.out.println(ioe.getMessage()); } baosp.reset(); } | public final void systemRequest() { systemRequest(' '); | public final void systemRequest(char sr) { if (sr == ' ') { JPanel srp = new JPanel(); srp.setLayout(new BorderLayout()); JLabel jl = new JLabel("Enter alternate job"); final JTextField sro = new JTextField(); srp.add(jl,BorderLayout.NORTH); srp.add(sro,BorderLayout.CENTER); Object[] message = new Object[1]; message[0] = srp; String[] options = {"SysReq","Cancel"}; final JOptionPane pane = new JOptionPane( message, // the dialog message array JOptionPane.QUESTION_MESSAGE, // message type JOptionPane.DEFAULT_OPTION, // option type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0]); // option that should be made into a default button // create a dialog wrapping the pane final JDialog dialog = pane.createDialog(null, // parent frame "System Request" // dialog title ); // add the listener that will set the focus to // the desired option dialog.addWindowListener( new WindowAdapter() { public void windowOpened( WindowEvent e) { super.windowOpened( e ); // now we're setting the focus to the desired component // it's not the best solution as it depends on internals // of the OptionPane class, but you can use it temporarily // until the bug gets fixed // also you might want to iterate here thru the set of // the buttons and pick one to call requestFocus() for it sro.requestFocus(); } }); dialog.show(); // now we can process the value selected String value = (String)pane.getValue(); if (value.equals(options[0])) { // from rfc1205 section 4.3 // Client sends header with the 000A12A0000004040000FFEF // System Request bit set. // // if we wanted to send an option with it we would need to send // it at the end such as the following // // byte abyte0[] = new byte[1]; or number of bytes in option // abyte0[0] = getEBCDIC(option);// System.out.println("SYSRQS sent"); // send option along with system request if (sro.getText().length() > 0) { for (int x = 0; x < sro.getText().length(); x++) { // System.out.println(sro.getText().charAt(x)); if (sro.getText().charAt(0) == '2') { // System.out.println("dataq cleared"); dsq.clear(); } baosp.write(getEBCDIC(sro.getText().charAt(x))); } try { writeGDS(4, 0, baosp.toByteArray()); } catch (IOException ioe) { System.out.println(ioe.getMessage()); } baosp.reset(); } else { // no option sent with system request try { writeGDS(4, 0, null); } catch (IOException ioe) { System.out.println(ioe.getMessage()); } } } controller.requestFocus(); } else { baosp.write(getEBCDIC(sr)); try { writeGDS(4, 0, baosp.toByteArray()); } catch (IOException ioe) { baosp.reset(); System.out.println(ioe.getMessage()); } baosp.reset(); } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/138d7f531fedca589f174b282c497f86f7e83899/tnvt.java/buggy/tn5250j/src/org/tn5250j/tnvt.java |
public final static void invoke (String macro, Session session) { String keys = getMacroByName(macro); if (keys != null) session.getScreen().sendKeys(keys); else { try { if (!macro.endsWith(".py")) macro = macro + ".py"; InterpreterDriverManager.executeScriptFile((Session)session,"scripts" + File.separatorChar + macro); } catch (Exception ex) { System.err.println(ex); } } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/69e4ad8b79244d7a9ead6ae9be5f21d5cf302742/Macronizer.java/buggy/tn5250j/src/org/tn5250j/tools/Macronizer.java |
||
public void setSize(int width, int height) | public void setSize(Dimension d) | public void setSize(int width, int height) { resize (width, height); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c703200057968fb1fad7e17bbcfd87040b579718/Rectangle.java/buggy/core/src/classpath/java/java/awt/Rectangle.java |
resize (width, height); | setSize (d.width, d.height); | public void setSize(int width, int height) { resize (width, height); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c703200057968fb1fad7e17bbcfd87040b579718/Rectangle.java/buggy/core/src/classpath/java/java/awt/Rectangle.java |
return enabled && visible && (peer == null || peer.isFocusTraversable()); | return enabled && visible && (peer == null || isLightweight() || peer.isFocusTraversable()); | public boolean isFocusTraversable() { return enabled && visible && (peer == null || peer.isFocusTraversable()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/566e4ab93ebc97794094572536829e581d565b11/Component.java/buggy/core/src/classpath/java/java/awt/Component.java |
public final void setBounds(Rectangle r) { | public final void setBounds(int width, int height) { | public final void setBounds(Rectangle r) { setBounds(r.width, r.height); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/0166767548ad2224376eff5004531d67a0ff55d6/Screen5250.java/buggy/tn5250j/src/org/tn5250j/Screen5250.java |
setBounds(r.width, r.height); | setCursorActive(false); resizeScreenArea(width,height); dirty.setBounds(tArea.getBounds()); if (gui.getGraphics() != null) { gg2d = null; drawing = true; updateDirty(); } if (isStatusErrorCode()) setStatus(STATUS_ERROR_CODE,STATUS_VALUE_ON,statusString); if (isXSystem()) setStatus(STATUS_SYSTEM,STATUS_VALUE_ON,statusString); if (isMessageWait()) setMessageLightOn(); setCursorActive(true); | public final void setBounds(Rectangle r) { setBounds(r.width, r.height); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/0166767548ad2224376eff5004531d67a0ff55d6/Screen5250.java/buggy/tn5250j/src/org/tn5250j/Screen5250.java |
public JList(ListModel listData) | public JList() | public JList(ListModel listData) { init(); setModel(listData); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JList.java/buggy/core/src/classpath/javax/javax/swing/JList.java |
setModel(listData); | public JList(ListModel listData) { init(); setModel(listData); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JList.java/buggy/core/src/classpath/javax/javax/swing/JList.java |
|
public JScrollPane(Component view) | public JScrollPane() | public JScrollPane(Component view) { this(view, VERTICAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_AS_NEEDED); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JScrollPane.java/buggy/core/src/classpath/javax/javax/swing/JScrollPane.java |
this(view, VERTICAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_AS_NEEDED); | this(null); | public JScrollPane(Component view) { this(view, VERTICAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_AS_NEEDED); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JScrollPane.java/buggy/core/src/classpath/javax/javax/swing/JScrollPane.java |