bugged stringlengths 6 599k | fixed stringlengths 6 40.8M | __index_level_0__ int64 0 3.24M |
|---|---|---|
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(); } | 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(); } | 507 |
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(); } | 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(); } | 508 |
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(); } | 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(); } | 509 |
public Color getDockingColor() { return dockingColor; } | public Color getDockingColor() { return dockingColor; } | 510 |
public Color getFloatingColor() { return floatingColor; } | public Color getFloatingColor() { return floatingColor; } | 511 |
public Dimension getMaximumSize(JComponent c) { return getPreferredSize(c); } | public Dimension getMaximumSize(JComponent c) { return getPreferredSize(c); } | 512 |
public Dimension getMaximumSize(JComponent c) { return getPreferredSize(c); } | public Dimension getMaximumSize(JComponent c) { return getPreferredSize(c); } | 513 |
public Dimension getMinimumSize(JComponent c) { return getPreferredSize(c); } | public Dimension getMinimumSize(JComponent c) { return getPreferredSize(c); } | 514 |
public Dimension getMinimumSize(JComponent c) { return getPreferredSize(c); } | public Dimension getMinimumSize(JComponent c) { return getPreferredSize(c); } | 515 |
protected void installComponents() { floatFrame = (Window) createFloatingWindow(toolBar); dragWindow = createDragWindow(toolBar); cachedBounds = toolBar.getPreferredSize(); cachedOrientation = toolBar.getOrientation(); nonRolloverBorder = createNonRolloverBorder(); rolloverBorder = createRolloverBorder(); borders = new Hashtable(); fillHashtable(); } | protected void installComponents() { floatFrame = (Window) createFloatingWindow(toolBar); dragWindow = createDragWindow(toolBar); cachedBounds = toolBar.getPreferredSize(); cachedOrientation = toolBar.getOrientation(); nonRolloverBorder = createNonRolloverBorder(); rolloverBorder = createRolloverBorder(); borders = new Hashtable(); fillHashtable(); } | 516 |
protected void installComponents() { floatFrame = (Window) createFloatingWindow(toolBar); dragWindow = createDragWindow(toolBar); cachedBounds = toolBar.getPreferredSize(); cachedOrientation = toolBar.getOrientation(); nonRolloverBorder = createNonRolloverBorder(); rolloverBorder = createRolloverBorder(); borders = new Hashtable(); fillHashtable(); } | protected void installComponents() { floatFrame = (Window) createFloatingWindow(toolBar); dragWindow = createDragWindow(toolBar); cachedBounds = toolBar.getPreferredSize(); cachedOrientation = toolBar.getOrientation(); nonRolloverBorder = createNonRolloverBorder(); rolloverBorder = createRolloverBorder(); borders = new Hashtable(); fillHashtable(); } | 517 |
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"); } | 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"); } | 518 |
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"); } | 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"); } | 519 |
protected void installKeyboardActions() { // FIXME: implement. } | protected void installKeyboardActions() { // FIXME: implement. } | 520 |
protected void installKeyboardActions() { // FIXME: implement. } | protected void installKeyboardActions() { // FIXME: implement. } | 521 |
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); } | 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); } | 522 |
protected void installNonRolloverBorders(JComponent c) { Component[] components = toolBar.getComponents(); for (int i = 0; i < components.length; i++) setBorderToNonRollover(components[i]); } | protected void installNonRolloverBorders(JComponent c) { Component[] components = toolBar.getComponents(); for (int i = 0; i < components.length; i++) setBorderToNonRollover(components[i]); } | 523 |
protected void installNonRolloverBorders(JComponent c) { Component[] components = toolBar.getComponents(); for (int i = 0; i < components.length; i++) setBorderToNonRollover(components[i]); } | protected void installNonRolloverBorders(JComponent c) { Component[] components = toolBar.getComponents(); for (int i = 0; i < components.length; i++) setBorderToNonRollover(components[i]); } | 524 |
protected void installNormalBorders(JComponent c) { Component[] components = toolBar.getComponents(); for (int i = 0; i < components.length; i++) setBorderToNormal(components[i]); } | protected void installNormalBorders(JComponent c) { Component[] components = toolBar.getComponents(); for (int i = 0; i < components.length; i++) setBorderToNormal(components[i]); } | 525 |
protected void installNormalBorders(JComponent c) { Component[] components = toolBar.getComponents(); for (int i = 0; i < components.length; i++) setBorderToNormal(components[i]); } | protected void installNormalBorders(JComponent c) { Component[] components = toolBar.getComponents(); for (int i = 0; i < components.length; i++) setBorderToNormal(components[i]); } | 526 |
protected void installRolloverBorders(JComponent c) { Component[] components = toolBar.getComponents(); for (int i = 0; i < components.length; i++) setBorderToRollover(components[i]); } | protected void installRolloverBorders(JComponent c) { Component[] components = toolBar.getComponents(); for (int i = 0; i < components.length; i++) setBorderToRollover(components[i]); } | 527 |
protected void installRolloverBorders(JComponent c) { Component[] components = toolBar.getComponents(); for (int i = 0; i < components.length; i++) setBorderToRollover(components[i]); } | protected void installRolloverBorders(JComponent c) { Component[] components = toolBar.getComponents(); for (int i = 0; i < components.length; i++) setBorderToRollover(components[i]); } | 528 |
public void installUI(JComponent c) { super.installUI(c); if (c instanceof JToolBar) { toolBar = (JToolBar) c; toolBar.setOpaque(true); installDefaults(); installComponents(); installListeners(toolBar); installKeyboardActions(); } } | public void installUI(JComponent c) { super.installUI(c); if (c instanceof JToolBar) { toolBar = (JToolBar) c; toolBar.setOpaque(true); installDefaults(); installComponents(); installListeners(toolBar); installKeyboardActions(); } } | 529 |
public void installUI(JComponent c) { super.installUI(c); if (c instanceof JToolBar) { toolBar = (JToolBar) c; toolBar.setOpaque(true); installDefaults(); installComponents(); installListeners(toolBar); installKeyboardActions(); } } | public void installUI(JComponent c) { super.installUI(c); if (c instanceof JToolBar) { toolBar = (JToolBar) c; toolBar.setOpaque(true); installDefaults(); installComponents(); installListeners(toolBar); installKeyboardActions(); } } | 530 |
public void installUI(JComponent c) { super.installUI(c); if (c instanceof JToolBar) { toolBar = (JToolBar) c; toolBar.setOpaque(true); installDefaults(); installComponents(); installListeners(toolBar); installKeyboardActions(); } } | public void installUI(JComponent c) { super.installUI(c); if (c instanceof JToolBar) { toolBar = (JToolBar) c; toolBar.setOpaque(true); installDefaults(); installComponents(); installListeners(toolBar); installKeyboardActions(); } } | 531 |
public void installUI(JComponent c) { super.installUI(c); if (c instanceof JToolBar) { toolBar = (JToolBar) c; toolBar.setOpaque(true); installDefaults(); installComponents(); installListeners(toolBar); installKeyboardActions(); } } | public void installUI(JComponent c) { super.installUI(c); if (c instanceof JToolBar) { toolBar = (JToolBar) c; toolBar.setOpaque(true); installDefaults(); installComponents(); installListeners(toolBar); installKeyboardActions(); } } | 532 |
public boolean isFloating() { return floatFrame.isVisible(); } | public boolean isFloating() { return floatFrame.isVisible(); } | 533 |
public boolean isFloating() { return floatFrame.isVisible(); } | public boolean isFloating() { return floatFrame.isVisible(); } | 534 |
public boolean isRolloverBorders() { return toolBar.isRollover(); } | public boolean isRolloverBorders() { return toolBar.isRollover(); } | 535 |
public boolean isRolloverBorders() { return toolBar.isRollover(); } | public boolean isRolloverBorders() { return toolBar.isRollover(); } | 536 |
protected void navigateFocusedComp(int direction) { // FIXME: Implement. } | protected void navigateFocusedComp(int direction) { // FIXME: Implement. } | 537 |
protected void navigateFocusedComp(int direction) { // FIXME: Implement. } | protected void navigateFocusedComp(int direction) { // FIXME: Implement. } | 538 |
protected void setBorderToNonRollover(Component c) { if (c instanceof JButton) { JButton b = (JButton) c; b.setRolloverEnabled(false); b.setBorder(nonRolloverBorder); } } | protected void setBorderToNonRollover(Component c) { if (c instanceof JButton) { JButton b = (JButton) c; b.setRolloverEnabled(false); b.setBorder(nonRolloverBorder); } } | 539 |
protected void setBorderToNonRollover(Component c) { if (c instanceof JButton) { JButton b = (JButton) c; b.setRolloverEnabled(false); b.setBorder(nonRolloverBorder); } } | protected void setBorderToNonRollover(Component c) { if (c instanceof JButton) { JButton b = (JButton) c; b.setRolloverEnabled(false); b.setBorder(nonRolloverBorder); } } | 540 |
protected void setBorderToNormal(Component c) { if (c instanceof JButton) { JButton b = (JButton) c; Border border = (Border) borders.get(b); b.setBorder(border); } } | protected void setBorderToNormal(Component c) { if (c instanceof JButton) { JButton b = (JButton) c; Border border = (Border) borders.get(b); b.setBorder(border); } } | 541 |
protected void setBorderToNormal(Component c) { if (c instanceof JButton) { JButton b = (JButton) c; Border border = (Border) borders.get(b); b.setBorder(border); } } | protected void setBorderToNormal(Component c) { if (c instanceof JButton) { JButton b = (JButton) c; Border border = (Border) borders.get(b); b.setBorder(border); } } | 542 |
protected void setBorderToRollover(Component c) { if (c instanceof JButton) { JButton b = (JButton) c; b.setRolloverEnabled(true); b.setBorder(rolloverBorder); } } | protected void setBorderToRollover(Component c) { if (c instanceof JButton) { JButton b = (JButton) c; b.setRolloverEnabled(true); b.setBorder(rolloverBorder); } } | 543 |
protected void setBorderToRollover(Component c) { if (c instanceof JButton) { JButton b = (JButton) c; b.setRolloverEnabled(true); b.setBorder(rolloverBorder); } } | protected void setBorderToRollover(Component c) { if (c instanceof JButton) { JButton b = (JButton) c; b.setRolloverEnabled(true); b.setBorder(rolloverBorder); } } | 544 |
public void setDockingColor(Color c) { dockingColor = c; } | public void setDockingColor(Color c) { dockingColor = c; } | 545 |
public void setFloatingColor(Color c) { floatingColor = c; } | public void setFloatingColor(Color c) { floatingColor = c; } | 546 |
public void setFloatingColor(Color c) { floatingColor = c; } | public void setFloatingColor(Color c) { floatingColor = c; } | 547 |
protected void uninstallComponents() { installNormalBorders(toolBar); borders = null; rolloverBorder = null; nonRolloverBorder = null; cachedBounds = null; floatFrame = null; dragWindow = null; } | protected void uninstallComponents() { installNormalBorders(toolBar); borders = null; rolloverBorder = null; nonRolloverBorder = null; cachedBounds = null; floatFrame = null; dragWindow = null; } | 548 |
protected void uninstallDefaults() { toolBar.setBackground(null); toolBar.setForeground(null); toolBar.setFont(null); dockingBorderColor = null; dockingColor = null; floatingBorderColor = null; floatingColor = null; } | protected void uninstallDefaults() { toolBar.setBackground(null); toolBar.setForeground(null); toolBar.setFont(null); dockingBorderColor = null; dockingColor = null; floatingBorderColor = null; floatingColor = null; } | 549 |
protected void uninstallKeyboardActions() { // FIXME: implement. } | protected void uninstallKeyboardActions() { // FIXME: implement. } | 550 |
protected void uninstallKeyboardActions() { // FIXME: implement. } | protected void uninstallKeyboardActions() { // FIXME: implement. } | 551 |
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; } | 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; } | 552 |
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; } | 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; } | 553 |
public void uninstallUI(JComponent c) { uninstallKeyboardActions(); uninstallListeners(); uninstallComponents(); uninstallDefaults(); toolBar = null; } | public void uninstallUI(JComponent c) { uninstallKeyboardActions(); uninstallListeners(); uninstallComponents(); uninstallDefaults(); toolBar = null; } | 554 |
public Window(Frame owner) { this (owner, owner.getGraphicsConfiguration ()); } | Window() { this (owner, owner.getGraphicsConfiguration ()); } | 555 |
public Window(Frame owner) { this (owner, owner.getGraphicsConfiguration ()); } | public Window(Frame owner) { 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(); } | 556 |
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);} | 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);} | 557 |
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);} | 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);} | 558 |
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); | 559 |
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; } } | 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; } } | 560 |
public static Point convertPoint(Component source, Point aPoint, Component destination) { return convertPoint(source, aPoint.x, aPoint.y, destination); } | public static Point convertPoint(Component source, int x, int y, Component destination) { return convertPoint(source, aPoint.x, aPoint.y, destination); } | 561 |
public static Point convertPoint(Component source, Point aPoint, Component destination) { return convertPoint(source, aPoint.x, aPoint.y, destination); } | public static Point convertPoint(Component source, Point aPoint, Component 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; } | 562 |
public SecurityException(String s) { super(s); } | public SecurityException(String s) { super(s); } | 563 |
public RuntimeException(String s) { super(s); } | public RuntimeException() { super(s); } | 564 |
public RuntimeException(String s) { super(s); } | public RuntimeException(String s) { super(s); } | 565 |
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); } } | public void setOrientation(int orientation) { if (orientation != VERTICAL && orientation != HORIZONTAL) throw new IllegalArgumentException(orientation + " is not a legal orientation"); if (this.orientation != orientation) { int oldOrientation = this.orientation; this.orientation = orientation; firePropertyChange("orientation", oldOrientation, this.orientation); } } | 566 |
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. } | 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. } | 567 |
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. } | 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. } | 568 |
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()); } | 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.pasteMe(false); 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.pasteMe(false); 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()); } | 569 |
public void actionPerformed(ActionEvent e) { screen.copyMe(); getFocusForMe(); } | public void actionPerformed(ActionEvent e) { screen.pasteMe(false); getFocusForMe(); } | 570 |
BorderLayout(){ this(0,0);} | BorderLayout(){ this(0,0);} | 571 |
BorderLayout(){ this(0,0);} | BorderLayout(){ this(0,0);} | 572 |
public JPanel() { this(new FlowLayout(), true); } | public JPanel() { this(new FlowLayout(), true); } | 573 |
public void setBounds(int x, int y, int width, int height) { reshape (x, y, width, height); } | public void setBounds(Rectangle r) { reshape (x, y, width, height); } | 574 |
public void setBounds(int x, int y, int width, int height) { reshape (x, y, width, height); } | public void setBounds(int x, int y, int width, int height) { reshape (x, y, width, height); } | 575 |
protected final Point getEndPoint() { if(this.endPoint == null) { setEndPoint(new Point(0,0)); } return this.endPoint; } | protected Point getEndPoint() { if(this.endPoint == null) { setEndPoint(new Point(0,0)); } return this.endPoint; } | 576 |
protected final Point getStartPoint() { if(this.startPoint == null) { setStartPoint(new Point(0,0)); } return this.startPoint; } | protected Point getStartPoint() { if(this.startPoint == null) { setStartPoint(new Point(0,0)); } return this.startPoint; } | 577 |
public Thread(Runnable target) { this(null, target, autoName()); } | public Thread(Runnable target) { this(null, target, autoName()); } | 578 |
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(); } | 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(); } | 579 |
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(); } | 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(); } | 580 |
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(); } | 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(); if (pane.getValue() instanceof Integer) return ((Integer) pane.getValue()).intValue(); return -1; } | 581 |
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); } | public MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger, int button) { this(source, id, when, modifiers, x, y, clickCount, popupTrigger, NOBUTTON); } | 582 |
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); } | 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); } | 583 |
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(); } | 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(); } | 584 |
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(); } | 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(); } | 585 |
public boolean isInField(int pos, boolean chgToField) { return screenFields.isInField(pos,chgToField); } | public boolean isInField() { return screenFields.isInField(pos,chgToField); } | 586 |
public boolean isInField(int pos, boolean chgToField) { return screenFields.isInField(pos,chgToField); } | public boolean isInField(int pos, boolean chgToField) { return isInField(lastPos,true); } | 587 |
public final static boolean isMacrosExist() { return macrosExist; } | publicfinalstaticbooleanisMacrosExist(){returnmacrosExist;} | 588 |
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(); } } | 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(); } } | 589 |
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); } } } | 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);}}} | 590 |
public void setSize(int width, int height) { resize (width, height); } | public void setSize(Dimension d) { resize (width, height); } | 591 |
public void setSize(int width, int height) { resize (width, height); } | public void setSize(int width, int height) { resize (width, height); } | 592 |
public boolean isFocusTraversable() { return enabled && visible && (peer == null || peer.isFocusTraversable()); } | public boolean isFocusTraversable() { return enabled && visible && (peer == null || peer.isFocusTraversable()); } | 593 |
public final void setBounds(Rectangle r) { setBounds(r.width, r.height); } | public final void setBounds(int width, int height) { setBounds(r.width, r.height); } | 594 |
public final void setBounds(Rectangle r) { setBounds(r.width, r.height); } | public final void setBounds(Rectangle r) { 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); } | 595 |
public JList(ListModel listData) { init(); setModel(listData); } | public JList() { init(); setModel(listData); } | 596 |
public JList(ListModel listData) { init(); setModel(listData); } | public JList(ListModel listData) { init(); } | 597 |
public JScrollPane(Component view) { this(view, VERTICAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_AS_NEEDED); } | public JScrollPane() { this(view, VERTICAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_AS_NEEDED); } | 598 |
public JScrollPane(Component view) { this(view, VERTICAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_AS_NEEDED); } | public JScrollPane(Component view) { this(view, VERTICAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_AS_NEEDED); } | 599 |
public static String showInputDialog(Component parentComponent, Object message, String title, int messageType) { JOptionPane pane = new JOptionPane(message, messageType); pane.setWantsInput(true); JDialog dialog = pane.createDialog(parentComponent, title); dialog.pack(); dialog.show(); return (String) pane.getInputValue(); } | public static String showInputDialog(Component parentComponent, Object message, String title, int messageType) { JOptionPane pane = new JOptionPane(message, messageType); pane.setWantsInput(true); JDialog dialog = pane.createDialog(parentComponent, title); dialog.pack(); dialog.show(); return (String) pane.getInputValue(); } | 600 |
public static String showInputDialog(Component parentComponent, Object message, String title, int messageType) { JOptionPane pane = new JOptionPane(message, messageType); pane.setWantsInput(true); JDialog dialog = pane.createDialog(parentComponent, title); dialog.pack(); dialog.show(); return (String) pane.getInputValue(); } | public static String showInputDialog(Component parentComponent, Object message, String title, int messageType) { JOptionPane pane = new JOptionPane(message, QUESTION_MESSAGE); pane.setWantsInput(true); JDialog dialog = pane.createDialog(parentComponent, title); dialog.pack(); dialog.show(); return (String) pane.getInputValue(); } | 601 |
public static String showInputDialog(Component parentComponent, Object message, String title, int messageType) { JOptionPane pane = new JOptionPane(message, messageType); pane.setWantsInput(true); JDialog dialog = pane.createDialog(parentComponent, title); dialog.pack(); dialog.show(); return (String) pane.getInputValue(); } | public static String showInputDialog(Component parentComponent, Object message, String title, int messageType) { JOptionPane pane = new JOptionPane(message, messageType); pane.setWantsInput(true); JDialog dialog = pane.createDialog(parentComponent, null); dialog.pack(); dialog.show(); return (String) pane.getInputValue(); } | 602 |
private RefItem(int kind, Register reg, VmConstString val, int offsetToFP) { super(kind, reg, offsetToFP); this.value = val; } | private RefItem(int kind, Register reg, VmConstString val, int offsetToFP) { super(kind, reg, offsetToFP); this.value = val; } | 603 |
protected WordItem cloneConstant() { return createConst(getValue()); } | protected WordItem cloneConstant() { return createConst(getValue()); } | 604 |
public void setBlockIncrement(int blockIncrement) { if (blockIncrement != this.blockIncrement) { int oldInc = this.blockIncrement; this.blockIncrement = blockIncrement; firePropertyChange(BLOCK_INCREMENT_CHANGED_PROPERTY, oldInc, this.blockIncrement); } } | public void setBlockIncrement(int blockIncrement) { if (blockIncrement != this.blockIncrement) { int oldInc = this.blockIncrement; this.blockIncrement = blockIncrement; firePropertyChange(BLOCK_INCREMENT_CHANGED_PROPERTY, oldInc, this.blockIncrement); } } | 605 |
public void setModel(BoundedRangeModel newModel) { if (model != newModel) { BoundedRangeModel oldModel = model; model = newModel; oldModel.removeChangeListener(changeListener); model.addChangeListener(changeListener); firePropertyChange(MODEL_CHANGED_PROPERTY, oldModel, model); } } | public void setModel(BoundedRangeModel newModel) { if (model != newModel) { BoundedRangeModel oldModel = model; model = newModel; oldModel.removeChangeListener(changeListener); model.addChangeListener(changeListener); firePropertyChange(MODEL_CHANGED_PROPERTY, oldModel, model); } } | 606 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.