rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
|
---|---|---|
g.drawLine(x + 4, y + 4, x + 4, y + 4); g.drawLine(x + 8, y + 4, x + 8, y + 4); g.drawLine(x + 2, y + 6, x + 2, y + 6); g.drawLine(x + 6, y + 6, x + 6, y + 6); g.drawLine(x + 10, y + 6, x + 10, y + 6); | g.drawLine(x + 2, y + 6, x + 2, y + 6); g.drawLine(x + 6, y + 6, x + 6, y + 6); g.drawLine(x + 10, y + 6, x + 10, y + 6); | public void paintIcon(Component c, Graphics g, int x, int y) { boolean enabled = false; boolean focus = false; if (c != null) { enabled = c.isEnabled(); focus = c.hasFocus(); } // draw the outline if (enabled) g.setColor(MetalLookAndFeel.getBlack()); else g.setColor(MetalLookAndFeel.getControlDarkShadow()); g.drawLine(x + 1, y, x + 13, y); g.drawLine(x + 14, y + 1, x + 14, y + 7); g.drawLine(x + 14, y + 8, x + 7, y + 15); g.drawLine(x + 6, y + 14, x, y + 8); g.drawLine(x, y + 7, x, y + 1); // fill the icon if (focus) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getControl()); g.fillRect(x + 1, y + 2, 13, 7); g.drawLine(x + 2, y + 9, x + 12, y + 9); g.drawLine(x + 3, y + 10, x + 11, y + 10); g.drawLine(x + 4, y + 11, x + 10, y + 11); g.drawLine(x + 5, y + 12, x + 9, y + 12); g.drawLine(x + 6, y + 13, x + 8, y + 13); g.drawLine(x + 7, y + 14, x + 7, y + 14); // if the slider is enabled, draw dots and highlights if (c.isEnabled()) { if (focus) g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); else g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x + 3, y + 3, x + 3, y + 3); g.drawLine(x + 7, y + 3, x + 7, y + 3); g.drawLine(x + 11, y + 3, x + 11, y + 3); g.drawLine(x + 5, y + 5, x + 5, y + 5); g.drawLine(x + 9, y + 5, x + 9, y + 5); g.drawLine(x + 3, y + 7, x + 3, y + 7); g.drawLine(x + 7, y + 7, x + 7, y + 7); g.drawLine(x + 11, y + 7, x + 11, y + 7); // draw highlights if (focus) g.setColor(MetalLookAndFeel.getPrimaryControl()); else g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 1, y + 1, x + 13, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 8); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 6, y + 2, x + 6, y + 2); g.drawLine(x + 10, y + 2, x + 10, y + 2); g.drawLine(x + 4, y + 4, x + 4, y + 4); g.drawLine(x + 8, y + 4, x + 8, y + 4); g.drawLine(x + 2, y + 6, x + 2, y + 6); g.drawLine(x + 6, y + 6, x + 6, y + 6); g.drawLine(x + 10, y + 6, x + 10, y + 6); } } |
Color color = MetalLookAndFeel.getControlDarkShadow(); if (c instanceof JInternalFrame) { JInternalFrame f = (JInternalFrame) c; if (f.isSelected()) color = MetalLookAndFeel.getPrimaryControlShadow(); } g.setColor(color); | Color savedColor = g.getColor(); AbstractButton b = (AbstractButton) c; if (b.getModel().isPressed()) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getPrimaryControl()); g.fillRect(x + 2, y + 6, 7, 7); if (b.getModel().isPressed()) g.setColor(MetalLookAndFeel.getBlack()); else g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); | public void paintIcon(Component c, Graphics g, int x, int y) { Color color = MetalLookAndFeel.getControlDarkShadow(); if (c instanceof JInternalFrame) { JInternalFrame f = (JInternalFrame) c; if (f.isSelected()) color = MetalLookAndFeel.getPrimaryControlShadow(); } g.setColor(color); g.drawLine(x + 12, y + 1, x + 13, y + 1); g.drawLine(x + 11, y + 2, x + 12, y + 2); g.drawLine(x + 10, y + 3, x + 11, y + 3); g.drawLine(x + 8, y + 2, x + 8, y + 3); g.fillRect(x + 8, y + 4, 3, 3); g.drawLine(x + 11, y + 6, x + 12, y + 6); g.drawLine(x + 1, y + 5, x + 5, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 12); g.drawLine(x + 9, y + 9, x + 9, y + 12); g.drawLine(x + 1, y + 13, x + 9, y + 13); g.drawLine(x + 2, y + 12, x + 2, y + 12); g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x + 12, y, x + 9, y + 3); g.drawLine(x + 7, y + 1, x + 8, y + 1); g.drawLine(x + 7, y + 2, x + 7, y + 6); g.drawLine(x + 11, y + 5, x + 12, y + 5); g.drawLine(x, y + 4, x + 5, y + 4); g.drawLine(x, y + 5, x, y + 13); g.drawLine(x + 3, y + 12, x + 8, y + 12); g.drawLine(x + 8, y + 8, x + 8, y + 11); g.drawLine(x + 9, y + 8, x + 9, y + 8); g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 9, y + 2, x + 9, y + 2); g.drawLine(x + 11, y + 4, x + 13, y + 2); g.drawLine(x + 13, y + 6, x + 13, y + 6); g.drawLine(x + 8, y + 7, x + 13, y + 7); g.drawLine(x + 6, y + 5, x + 6, y + 5); g.drawLine(x + 2, y + 6, x + 6, y + 6); g.drawLine(x + 2, y + 6, x + 2, y + 11); g.drawLine(x + 10, y + 8, x + 10, y + 13); g.drawLine(x + 1, y + 14, x + 10, y + 14); } |
g.drawLine(x + 2, y + 6, x + 6, y + 6); g.drawLine(x + 2, y + 6, x + 2, y + 11); | public void paintIcon(Component c, Graphics g, int x, int y) { Color color = MetalLookAndFeel.getControlDarkShadow(); if (c instanceof JInternalFrame) { JInternalFrame f = (JInternalFrame) c; if (f.isSelected()) color = MetalLookAndFeel.getPrimaryControlShadow(); } g.setColor(color); g.drawLine(x + 12, y + 1, x + 13, y + 1); g.drawLine(x + 11, y + 2, x + 12, y + 2); g.drawLine(x + 10, y + 3, x + 11, y + 3); g.drawLine(x + 8, y + 2, x + 8, y + 3); g.fillRect(x + 8, y + 4, 3, 3); g.drawLine(x + 11, y + 6, x + 12, y + 6); g.drawLine(x + 1, y + 5, x + 5, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 12); g.drawLine(x + 9, y + 9, x + 9, y + 12); g.drawLine(x + 1, y + 13, x + 9, y + 13); g.drawLine(x + 2, y + 12, x + 2, y + 12); g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x + 12, y, x + 9, y + 3); g.drawLine(x + 7, y + 1, x + 8, y + 1); g.drawLine(x + 7, y + 2, x + 7, y + 6); g.drawLine(x + 11, y + 5, x + 12, y + 5); g.drawLine(x, y + 4, x + 5, y + 4); g.drawLine(x, y + 5, x, y + 13); g.drawLine(x + 3, y + 12, x + 8, y + 12); g.drawLine(x + 8, y + 8, x + 8, y + 11); g.drawLine(x + 9, y + 8, x + 9, y + 8); g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 9, y + 2, x + 9, y + 2); g.drawLine(x + 11, y + 4, x + 13, y + 2); g.drawLine(x + 13, y + 6, x + 13, y + 6); g.drawLine(x + 8, y + 7, x + 13, y + 7); g.drawLine(x + 6, y + 5, x + 6, y + 5); g.drawLine(x + 2, y + 6, x + 6, y + 6); g.drawLine(x + 2, y + 6, x + 2, y + 11); g.drawLine(x + 10, y + 8, x + 10, y + 13); g.drawLine(x + 1, y + 14, x + 10, y + 14); } |
|
if (!b.getModel().isPressed()) { g.drawLine(x + 2, y + 6, x + 6, y + 6); g.drawLine(x + 2, y + 6, x + 2, y + 11); } g.setColor(savedColor); | public void paintIcon(Component c, Graphics g, int x, int y) { Color color = MetalLookAndFeel.getControlDarkShadow(); if (c instanceof JInternalFrame) { JInternalFrame f = (JInternalFrame) c; if (f.isSelected()) color = MetalLookAndFeel.getPrimaryControlShadow(); } g.setColor(color); g.drawLine(x + 12, y + 1, x + 13, y + 1); g.drawLine(x + 11, y + 2, x + 12, y + 2); g.drawLine(x + 10, y + 3, x + 11, y + 3); g.drawLine(x + 8, y + 2, x + 8, y + 3); g.fillRect(x + 8, y + 4, 3, 3); g.drawLine(x + 11, y + 6, x + 12, y + 6); g.drawLine(x + 1, y + 5, x + 5, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 12); g.drawLine(x + 9, y + 9, x + 9, y + 12); g.drawLine(x + 1, y + 13, x + 9, y + 13); g.drawLine(x + 2, y + 12, x + 2, y + 12); g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x + 12, y, x + 9, y + 3); g.drawLine(x + 7, y + 1, x + 8, y + 1); g.drawLine(x + 7, y + 2, x + 7, y + 6); g.drawLine(x + 11, y + 5, x + 12, y + 5); g.drawLine(x, y + 4, x + 5, y + 4); g.drawLine(x, y + 5, x, y + 13); g.drawLine(x + 3, y + 12, x + 8, y + 12); g.drawLine(x + 8, y + 8, x + 8, y + 11); g.drawLine(x + 9, y + 8, x + 9, y + 8); g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 9, y + 2, x + 9, y + 2); g.drawLine(x + 11, y + 4, x + 13, y + 2); g.drawLine(x + 13, y + 6, x + 13, y + 6); g.drawLine(x + 8, y + 7, x + 13, y + 7); g.drawLine(x + 6, y + 5, x + 6, y + 5); g.drawLine(x + 2, y + 6, x + 6, y + 6); g.drawLine(x + 2, y + 6, x + 2, y + 11); g.drawLine(x + 10, y + 8, x + 10, y + 13); g.drawLine(x + 1, y + 14, x + 10, y + 14); } |
|
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); | Color savedColor = g.getColor(); AbstractButton b = (AbstractButton) c; if (b.getModel().isPressed()) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getPrimaryControl()); g.fillRect(x + 2, y + 2, 10, 10); if (b.getModel().isPressed()) g.setColor(MetalLookAndFeel.getBlack()); else { boolean selected = true; if (selected) g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); else g.setColor(MetalLookAndFeel.getControlDarkShadow()); } | public void paintIcon(Component c, Graphics g, int x, int y) { // draw the gray areas first g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); g.drawLine(x + 1, y + 1, x + 13, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 12); g.drawLine(x + 1, y + 13, x + 13, y + 13); g.drawLine(x + 13, y + 2, x + 13, y + 12); g.fillRect(x + 4, y + 4, 2, 2); g.fillRect(x + 4, y + 9, 2, 2); g.fillRect(x + 9, y + 4, 2, 2); g.fillRect(x + 9, y + 9, 2, 2); g.fillRect(x + 5, y + 5, 5, 5); g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x, y, x + 13, y); g.drawLine(x, y + 1, x, y + 13); g.drawLine(x + 3, y + 4, x + 4, y + 3); g.drawLine(x + 3, y + 9, x + 5, y + 7); g.drawLine(x + 7, y + 5, x + 9, y + 3); g.drawLine(x + 12, y + 3, x + 12, y + 11); g.drawLine(x + 3, y + 12, x + 12, y + 12); g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 1, y + 14, x + 14, y + 14); g.drawLine(x + 14, y + 1, x + 14, y + 14); g.drawLine(x + 5, y + 10, x + 5, y + 10); g.drawLine(x + 6, y + 9, x + 7, y + 9); g.drawLine(x + 10, y + 5, x + 10, y + 5); g.drawLine(x + 9, y + 6, x + 9, y + 7); g.drawLine(x + 10, y + 10, x + 11, y + 10); g.drawLine(x + 10, y + 11, x + 10, y + 11); } |
g.fillRect(x + 4, y + 9, 2, 2); g.fillRect(x + 9, y + 4, 2, 2); g.fillRect(x + 9, y + 9, 2, 2); g.fillRect(x + 5, y + 5, 5, 5); | g.fillRect(x + 5, y + 5, 4, 4); g.drawLine(x + 9, y + 4, x + 10, y + 4); g.drawLine(x + 9, y + 4, x + 9, y + 5); g.drawLine(x + 4, y + 9, x + 4, y + 10); g.drawLine(x + 4, y + 9, x + 5, y + 9); g.drawLine(x + 9, y + 8, x + 9, y + 10); g.drawLine(x + 8, y + 9, x + 10, y + 9); | public void paintIcon(Component c, Graphics g, int x, int y) { // draw the gray areas first g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); g.drawLine(x + 1, y + 1, x + 13, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 12); g.drawLine(x + 1, y + 13, x + 13, y + 13); g.drawLine(x + 13, y + 2, x + 13, y + 12); g.fillRect(x + 4, y + 4, 2, 2); g.fillRect(x + 4, y + 9, 2, 2); g.fillRect(x + 9, y + 4, 2, 2); g.fillRect(x + 9, y + 9, 2, 2); g.fillRect(x + 5, y + 5, 5, 5); g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x, y, x + 13, y); g.drawLine(x, y + 1, x, y + 13); g.drawLine(x + 3, y + 4, x + 4, y + 3); g.drawLine(x + 3, y + 9, x + 5, y + 7); g.drawLine(x + 7, y + 5, x + 9, y + 3); g.drawLine(x + 12, y + 3, x + 12, y + 11); g.drawLine(x + 3, y + 12, x + 12, y + 12); g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 1, y + 14, x + 14, y + 14); g.drawLine(x + 14, y + 1, x + 14, y + 14); g.drawLine(x + 5, y + 10, x + 5, y + 10); g.drawLine(x + 6, y + 9, x + 7, y + 9); g.drawLine(x + 10, y + 5, x + 10, y + 5); g.drawLine(x + 9, y + 6, x + 9, y + 7); g.drawLine(x + 10, y + 10, x + 11, y + 10); g.drawLine(x + 10, y + 11, x + 10, y + 11); } |
g.drawLine(x + 5, y + 10, x + 5, y + 10); g.drawLine(x + 6, y + 9, x + 7, y + 9); g.drawLine(x + 10, y + 5, x + 10, y + 5); g.drawLine(x + 9, y + 6, x + 9, y + 7); g.drawLine(x + 10, y + 10, x + 11, y + 10); g.drawLine(x + 10, y + 11, x + 10, y + 11); | if (!b.getModel().isPressed()) { g.drawLine(x + 5, y + 10, x + 5, y + 10); g.drawLine(x + 6, y + 9, x + 7, y + 9); g.drawLine(x + 10, y + 5, x + 10, y + 5); g.drawLine(x + 9, y + 6, x + 9, y + 7); g.drawLine(x + 10, y + 10, x + 11, y + 10); g.drawLine(x + 10, y + 11, x + 10, y + 11); } g.setColor(savedColor); | public void paintIcon(Component c, Graphics g, int x, int y) { // draw the gray areas first g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); g.drawLine(x + 1, y + 1, x + 13, y + 1); g.drawLine(x + 1, y + 2, x + 1, y + 12); g.drawLine(x + 1, y + 13, x + 13, y + 13); g.drawLine(x + 13, y + 2, x + 13, y + 12); g.fillRect(x + 4, y + 4, 2, 2); g.fillRect(x + 4, y + 9, 2, 2); g.fillRect(x + 9, y + 4, 2, 2); g.fillRect(x + 9, y + 9, 2, 2); g.fillRect(x + 5, y + 5, 5, 5); g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x, y, x + 13, y); g.drawLine(x, y + 1, x, y + 13); g.drawLine(x + 3, y + 4, x + 4, y + 3); g.drawLine(x + 3, y + 9, x + 5, y + 7); g.drawLine(x + 7, y + 5, x + 9, y + 3); g.drawLine(x + 12, y + 3, x + 12, y + 11); g.drawLine(x + 3, y + 12, x + 12, y + 12); g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 1, y + 14, x + 14, y + 14); g.drawLine(x + 14, y + 1, x + 14, y + 14); g.drawLine(x + 5, y + 10, x + 5, y + 10); g.drawLine(x + 6, y + 9, x + 7, y + 9); g.drawLine(x + 10, y + 5, x + 10, y + 5); g.drawLine(x + 9, y + 6, x + 9, y + 7); g.drawLine(x + 10, y + 10, x + 11, y + 10); g.drawLine(x + 10, y + 11, x + 10, y + 11); } |
Color color = MetalLookAndFeel.getControlDarkShadow(); if (c instanceof JInternalFrame) { JInternalFrame f = (JInternalFrame) c; if (f.isSelected()) color = MetalLookAndFeel.getPrimaryControlShadow(); } g.setColor(color); | Color savedColor = g.getColor(); AbstractButton b = (AbstractButton) c; if (b.getModel().isPressed()) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getPrimaryControl()); g.fillRect(x + 2, y + 6, 7, 7); if (b.getModel().isPressed()) g.setColor(MetalLookAndFeel.getBlack()); else g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); | public void paintIcon(Component c, Graphics g, int x, int y) { Color color = MetalLookAndFeel.getControlDarkShadow(); if (c instanceof JInternalFrame) { JInternalFrame f = (JInternalFrame) c; if (f.isSelected()) color = MetalLookAndFeel.getPrimaryControlShadow(); } g.setColor(color); g.drawLine(x + 9, y + 1, x + 10, y + 1); g.fillRect(x + 11, y + 1, 3, 3); g.fillRect(x + 12, y + 4, 2, 2); g.drawLine(x + 10, y + 3, x + 10, y + 3); g.drawLine(x + 9, y + 4, x + 10, y + 4); g.drawLine(x + 1, y + 5, x + 9, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 12); g.drawLine(x + 9, y + 6, x + 9, y + 12); g.drawLine(x + 1, y + 13, x + 9, y + 13); // fill g.drawLine(x + 7, y + 6, x + 8, y + 6); g.drawLine(x + 6, y + 7, x + 8, y + 7); g.drawLine(x + 5, y + 8, x + 6, y + 8); g.drawLine(x + 4, y + 9, x + 5, y + 9); g.drawLine(x + 3, y + 10, x + 4, y + 10); g.drawLine(x + 2, y + 11, x + 3, y + 11); g.drawLine(x + 2, y + 12, x + 4, y + 12); g.drawLine(x + 8, y + 8, x + 8, y + 8); // draw black g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x + 8, y, x + 13, y); g.drawLine(x + 8, y + 1, x + 8, y + 1); g.drawLine(x + 10, y + 2, x + 9, y + 3); g.drawLine(x, y + 4, x + 8, y + 4); g.drawLine(x, y + 5, x, y + 13); g.drawLine(x + 2, y + 10, x + 6, y + 6); g.drawLine(x + 8, y + 9, x + 8, y + 11); g.drawLine(x + 5, y + 12, x + 8, y + 12); // draw white g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 2, y + 6, x + 5, y + 6); g.drawLine(x + 2, y + 7, x + 2, y + 9); g.drawLine(x + 4, y + 11, x + 7, y + 8); g.drawLine(x + 1, y + 14, x + 10, y + 14); g.drawLine(x + 10, y + 5, x + 10, y + 13); g.drawLine(x + 9, y + 2, x + 9, y + 2); g.drawLine(x + 11, y + 4, x + 11, y + 5); g.drawLine(x + 13, y + 6, x + 14, y + 6); g.drawLine(x + 14, y + 1, x + 14, y + 5); } |
g.drawLine(x + 2, y + 6, x + 5, y + 6); g.drawLine(x + 2, y + 7, x + 2, y + 9); g.drawLine(x + 4, y + 11, x + 7, y + 8); | if (!b.getModel().isPressed()) { g.drawLine(x + 2, y + 6, x + 5, y + 6); g.drawLine(x + 2, y + 7, x + 2, y + 9); g.drawLine(x + 4, y + 11, x + 7, y + 8); } | public void paintIcon(Component c, Graphics g, int x, int y) { Color color = MetalLookAndFeel.getControlDarkShadow(); if (c instanceof JInternalFrame) { JInternalFrame f = (JInternalFrame) c; if (f.isSelected()) color = MetalLookAndFeel.getPrimaryControlShadow(); } g.setColor(color); g.drawLine(x + 9, y + 1, x + 10, y + 1); g.fillRect(x + 11, y + 1, 3, 3); g.fillRect(x + 12, y + 4, 2, 2); g.drawLine(x + 10, y + 3, x + 10, y + 3); g.drawLine(x + 9, y + 4, x + 10, y + 4); g.drawLine(x + 1, y + 5, x + 9, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 12); g.drawLine(x + 9, y + 6, x + 9, y + 12); g.drawLine(x + 1, y + 13, x + 9, y + 13); // fill g.drawLine(x + 7, y + 6, x + 8, y + 6); g.drawLine(x + 6, y + 7, x + 8, y + 7); g.drawLine(x + 5, y + 8, x + 6, y + 8); g.drawLine(x + 4, y + 9, x + 5, y + 9); g.drawLine(x + 3, y + 10, x + 4, y + 10); g.drawLine(x + 2, y + 11, x + 3, y + 11); g.drawLine(x + 2, y + 12, x + 4, y + 12); g.drawLine(x + 8, y + 8, x + 8, y + 8); // draw black g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x + 8, y, x + 13, y); g.drawLine(x + 8, y + 1, x + 8, y + 1); g.drawLine(x + 10, y + 2, x + 9, y + 3); g.drawLine(x, y + 4, x + 8, y + 4); g.drawLine(x, y + 5, x, y + 13); g.drawLine(x + 2, y + 10, x + 6, y + 6); g.drawLine(x + 8, y + 9, x + 8, y + 11); g.drawLine(x + 5, y + 12, x + 8, y + 12); // draw white g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 2, y + 6, x + 5, y + 6); g.drawLine(x + 2, y + 7, x + 2, y + 9); g.drawLine(x + 4, y + 11, x + 7, y + 8); g.drawLine(x + 1, y + 14, x + 10, y + 14); g.drawLine(x + 10, y + 5, x + 10, y + 13); g.drawLine(x + 9, y + 2, x + 9, y + 2); g.drawLine(x + 11, y + 4, x + 11, y + 5); g.drawLine(x + 13, y + 6, x + 14, y + 6); g.drawLine(x + 14, y + 1, x + 14, y + 5); } |
g.setColor(savedColor); | public void paintIcon(Component c, Graphics g, int x, int y) { Color color = MetalLookAndFeel.getControlDarkShadow(); if (c instanceof JInternalFrame) { JInternalFrame f = (JInternalFrame) c; if (f.isSelected()) color = MetalLookAndFeel.getPrimaryControlShadow(); } g.setColor(color); g.drawLine(x + 9, y + 1, x + 10, y + 1); g.fillRect(x + 11, y + 1, 3, 3); g.fillRect(x + 12, y + 4, 2, 2); g.drawLine(x + 10, y + 3, x + 10, y + 3); g.drawLine(x + 9, y + 4, x + 10, y + 4); g.drawLine(x + 1, y + 5, x + 9, y + 5); g.drawLine(x + 1, y + 6, x + 1, y + 12); g.drawLine(x + 9, y + 6, x + 9, y + 12); g.drawLine(x + 1, y + 13, x + 9, y + 13); // fill g.drawLine(x + 7, y + 6, x + 8, y + 6); g.drawLine(x + 6, y + 7, x + 8, y + 7); g.drawLine(x + 5, y + 8, x + 6, y + 8); g.drawLine(x + 4, y + 9, x + 5, y + 9); g.drawLine(x + 3, y + 10, x + 4, y + 10); g.drawLine(x + 2, y + 11, x + 3, y + 11); g.drawLine(x + 2, y + 12, x + 4, y + 12); g.drawLine(x + 8, y + 8, x + 8, y + 8); // draw black g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x + 8, y, x + 13, y); g.drawLine(x + 8, y + 1, x + 8, y + 1); g.drawLine(x + 10, y + 2, x + 9, y + 3); g.drawLine(x, y + 4, x + 8, y + 4); g.drawLine(x, y + 5, x, y + 13); g.drawLine(x + 2, y + 10, x + 6, y + 6); g.drawLine(x + 8, y + 9, x + 8, y + 11); g.drawLine(x + 5, y + 12, x + 8, y + 12); // draw white g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 2, y + 6, x + 5, y + 6); g.drawLine(x + 2, y + 7, x + 2, y + 9); g.drawLine(x + 4, y + 11, x + 7, y + 8); g.drawLine(x + 1, y + 14, x + 10, y + 14); g.drawLine(x + 10, y + 5, x + 10, y + 13); g.drawLine(x + 9, y + 2, x + 9, y + 2); g.drawLine(x + 11, y + 4, x + 11, y + 5); g.drawLine(x + 13, y + 6, x + 14, y + 6); g.drawLine(x + 14, y + 1, x + 14, y + 5); } |
|
Color color = MetalLookAndFeel.getControlDarkShadow(); if (c instanceof JInternalFrame) { JInternalFrame f = (JInternalFrame) c; if (f.isSelected()) color = MetalLookAndFeel.getPrimaryControlShadow(); } g.setColor(color); | Color savedColor = g.getColor(); AbstractButton b = (AbstractButton) c; if (b.getModel().isPressed()) g.setColor(MetalLookAndFeel.getBlack()); else g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); | public void paintIcon(Component c, Graphics g, int x, int y) { Color color = MetalLookAndFeel.getControlDarkShadow(); if (c instanceof JInternalFrame) { JInternalFrame f = (JInternalFrame) c; if (f.isSelected()) color = MetalLookAndFeel.getPrimaryControlShadow(); } g.setColor(color); g.drawLine(x + 12, y + 1, x + 13, y + 1); g.drawLine(x + 11, y + 2, x + 12, y + 2); g.drawLine(x + 10, y + 3, x + 11, y + 3); g.drawLine(x + 8, y + 2, x + 8, y + 3); g.fillRect(x + 8, y + 4, 3, 3); g.drawLine(x + 11, y + 6, x + 12, y + 6); g.drawLine(x + 1, y + 8, x + 6, y + 8); g.drawLine(x + 1, y + 9, x + 1, y + 12); g.drawLine(x + 6, y + 9, x + 6, y + 12); g.drawLine(x + 1, y + 13, x + 6, y + 13); g.drawLine(x + 5, y + 9, x + 5, y + 9); g.drawLine(x + 2, y + 12, x + 2, y + 12); g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x + 12, y, x + 9, y + 3); g.drawLine(x + 7, y + 1, x + 8, y + 1); g.drawLine(x + 7, y + 2, x + 7, y + 6); g.drawLine(x, y + 7, x + 6, y + 7); g.drawLine(x, y + 8, x, y + 13); g.drawLine(x + 3, y + 12, x + 5, y + 12); g.drawLine(x + 5, y + 10, x + 5, y + 11); g.drawLine(x + 11, y + 5, x + 12, y + 5); g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 9, y + 2, x + 9, y + 2); g.drawLine(x + 11, y + 4, x + 13, y + 2); g.drawLine(x + 13, y + 6, x + 13, y + 6); g.drawLine(x + 8, y + 7, x + 13, y + 7); g.drawLine(x + 2, y + 9, x + 4, y + 9); g.drawLine(x + 2, y + 10, x + 2, y + 11); g.drawLine(x + 7, y + 9, x + 7, y + 13); g.drawLine(x + 1, y + 14, x + 7, y + 14); } |
g.drawLine(x + 2, y + 9, x + 4, y + 9); g.drawLine(x + 2, y + 10, x + 2, y + 11); | public void paintIcon(Component c, Graphics g, int x, int y) { Color color = MetalLookAndFeel.getControlDarkShadow(); if (c instanceof JInternalFrame) { JInternalFrame f = (JInternalFrame) c; if (f.isSelected()) color = MetalLookAndFeel.getPrimaryControlShadow(); } g.setColor(color); g.drawLine(x + 12, y + 1, x + 13, y + 1); g.drawLine(x + 11, y + 2, x + 12, y + 2); g.drawLine(x + 10, y + 3, x + 11, y + 3); g.drawLine(x + 8, y + 2, x + 8, y + 3); g.fillRect(x + 8, y + 4, 3, 3); g.drawLine(x + 11, y + 6, x + 12, y + 6); g.drawLine(x + 1, y + 8, x + 6, y + 8); g.drawLine(x + 1, y + 9, x + 1, y + 12); g.drawLine(x + 6, y + 9, x + 6, y + 12); g.drawLine(x + 1, y + 13, x + 6, y + 13); g.drawLine(x + 5, y + 9, x + 5, y + 9); g.drawLine(x + 2, y + 12, x + 2, y + 12); g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x + 12, y, x + 9, y + 3); g.drawLine(x + 7, y + 1, x + 8, y + 1); g.drawLine(x + 7, y + 2, x + 7, y + 6); g.drawLine(x, y + 7, x + 6, y + 7); g.drawLine(x, y + 8, x, y + 13); g.drawLine(x + 3, y + 12, x + 5, y + 12); g.drawLine(x + 5, y + 10, x + 5, y + 11); g.drawLine(x + 11, y + 5, x + 12, y + 5); g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 9, y + 2, x + 9, y + 2); g.drawLine(x + 11, y + 4, x + 13, y + 2); g.drawLine(x + 13, y + 6, x + 13, y + 6); g.drawLine(x + 8, y + 7, x + 13, y + 7); g.drawLine(x + 2, y + 9, x + 4, y + 9); g.drawLine(x + 2, y + 10, x + 2, y + 11); g.drawLine(x + 7, y + 9, x + 7, y + 13); g.drawLine(x + 1, y + 14, x + 7, y + 14); } |
|
if (b.getModel().isPressed()) { g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); g.fillRect(x + 2, y + 9, 3, 3); } else { g.drawLine(x + 2, y + 9, x + 4, y + 9); g.drawLine(x + 2, y + 10, x + 2, y + 11); } g.setColor(savedColor); | public void paintIcon(Component c, Graphics g, int x, int y) { Color color = MetalLookAndFeel.getControlDarkShadow(); if (c instanceof JInternalFrame) { JInternalFrame f = (JInternalFrame) c; if (f.isSelected()) color = MetalLookAndFeel.getPrimaryControlShadow(); } g.setColor(color); g.drawLine(x + 12, y + 1, x + 13, y + 1); g.drawLine(x + 11, y + 2, x + 12, y + 2); g.drawLine(x + 10, y + 3, x + 11, y + 3); g.drawLine(x + 8, y + 2, x + 8, y + 3); g.fillRect(x + 8, y + 4, 3, 3); g.drawLine(x + 11, y + 6, x + 12, y + 6); g.drawLine(x + 1, y + 8, x + 6, y + 8); g.drawLine(x + 1, y + 9, x + 1, y + 12); g.drawLine(x + 6, y + 9, x + 6, y + 12); g.drawLine(x + 1, y + 13, x + 6, y + 13); g.drawLine(x + 5, y + 9, x + 5, y + 9); g.drawLine(x + 2, y + 12, x + 2, y + 12); g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x + 12, y, x + 9, y + 3); g.drawLine(x + 7, y + 1, x + 8, y + 1); g.drawLine(x + 7, y + 2, x + 7, y + 6); g.drawLine(x, y + 7, x + 6, y + 7); g.drawLine(x, y + 8, x, y + 13); g.drawLine(x + 3, y + 12, x + 5, y + 12); g.drawLine(x + 5, y + 10, x + 5, y + 11); g.drawLine(x + 11, y + 5, x + 12, y + 5); g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 9, y + 2, x + 9, y + 2); g.drawLine(x + 11, y + 4, x + 13, y + 2); g.drawLine(x + 13, y + 6, x + 13, y + 6); g.drawLine(x + 8, y + 7, x + 13, y + 7); g.drawLine(x + 2, y + 9, x + 4, y + 9); g.drawLine(x + 2, y + 10, x + 2, y + 11); g.drawLine(x + 7, y + 9, x + 7, y + 13); g.drawLine(x + 1, y + 14, x + 7, y + 14); } |
|
g.setColor(MetalLookAndFeel.getBlack()); | if (b.isEnabled()) g.setColor(MetalLookAndFeel.getBlack()); else g.setColor(MetalLookAndFeel.getControlDisabled()); | public void paintIcon(Component c, Graphics g, int x, int y) { Color savedColor = g.getColor(); JRadioButton b = (JRadioButton) c; // draw outer circle if (b.isEnabled()) g.setColor(MetalLookAndFeel.getControlDarkShadow()); else g.setColor(MetalLookAndFeel.getControlDisabled()); g.drawLine(x + 2, y + 1, x + 3, y + 1); g.drawLine(x + 4, y, x + 7, y); g.drawLine(x + 8, y + 1, x + 9, y + 1); g.drawLine(x + 10, y + 2, x + 10, y + 3); g.drawLine(x + 11, y + 4, x + 11, y + 7); g.drawLine(x + 10, y + 8, x + 10, y + 9); g.drawLine(x + 8, y + 10, x + 9, y + 10); g.drawLine(x + 4, y + 11, x + 7, y + 11); g.drawLine(x + 2, y + 10, x + 3, y + 10); g.drawLine(x + 1, y + 9, x + 1, y + 8); g.drawLine(x, y + 7, x, y + 4); g.drawLine(x + 1, y + 2, x + 1, y + 3); if (b.getModel().isArmed()) { g.setColor(MetalLookAndFeel.getControlShadow()); g.drawLine(x + 4, y + 1, x + 7, y + 1); g.drawLine(x + 4, y + 10, x + 7, y + 10); g.drawLine(x + 1, y + 4, x + 1, y + 7); g.drawLine(x + 10, y + 4, x + 10, y + 7); g.fillRect(x + 2, y + 2, 8, 8); } else { // only draw inner highlight if not filled if (b.isEnabled()) { g.setColor(MetalLookAndFeel.getWhite()); g.drawLine(x + 2, y + 8, x + 2, y + 9); g.drawLine(x + 1, y + 4, x + 1, y + 7); g.drawLine(x + 2, y + 2, x + 2, y + 3); g.drawLine(x + 3, y + 2, x + 3, y + 2); g.drawLine(x + 4, y + 1, x + 7, y + 1); g.drawLine(x + 8, y + 2, x + 9, y + 2); } } // draw outer highlight if (b.isEnabled()) { g.setColor(MetalLookAndFeel.getWhite()); // outer g.drawLine(x + 10, y + 1, x + 10, y + 1); g.drawLine(x + 11, y + 2, x + 11, y + 3); g.drawLine(x + 12, y + 4, x + 12, y + 7); g.drawLine(x + 11, y + 8, x + 11, y + 9); g.drawLine(x + 10, y + 10, x + 10, y + 10); g.drawLine(x + 8, y + 11, x + 9, y + 11); g.drawLine(x + 4, y + 12, x + 7, y + 12); g.drawLine(x + 2, y + 11, x + 3, y + 11); } if (b.isSelected()) { g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x + 4, y + 3, x + 7, y + 3); g.fillRect(x + 3, y + 4, 6, 4); g.drawLine(x + 4, y + 8, x + 7, y + 8); } g.setColor(savedColor); } |
toUse = SwingUtilities.getOwnerFrame(); | toUse = (Frame) SwingUtilities.getOwnerFrame(null); | protected JDialog createDialog(Component parent) throws HeadlessException { Frame toUse = (Frame) SwingUtilities.getAncestorOfClass(Frame.class, parent); if (toUse == null) toUse = SwingUtilities.getOwnerFrame(); JDialog dialog = new JDialog(toUse); setSelectedFile(null); dialog.getContentPane().add(this); dialog.setModal(true); dialog.invalidate(); dialog.repaint(); return dialog; } |
Insets i = d.getInsets(); d.setSize(500 + i.top + i.bottom, d.getPreferredSize().height); | d.pack(); | public int showDialog(Component parent, String approveButtonText) throws HeadlessException { JDialog d = createDialog(parent); setApproveButtonText(approveButtonText); setDialogType(CUSTOM_DIALOG); retval = ERROR_OPTION; Insets i = d.getInsets(); d.setSize(500 + i.top + i.bottom, d.getPreferredSize().height); d.show(); return retval; } |
Insets i = d.getInsets(); d.setSize(500 + i.top + i.bottom, d.getPreferredSize().height); | d.pack(); | public int showOpenDialog(Component parent) throws HeadlessException { JDialog d = createDialog(parent); // FIXME: Remove when we get ancestor property d.setTitle("Open"); setDialogType(OPEN_DIALOG); retval = ERROR_OPTION; Insets i = d.getInsets(); d.setSize(500 + i.top + i.bottom, d.getPreferredSize().height); d.show(); return retval; } |
Insets i = d.getInsets(); d.setSize(500 + i.top + i.bottom, d.getPreferredSize().height); | d.pack(); | public int showSaveDialog(Component parent) throws HeadlessException { JDialog d = createDialog(parent); setDialogType(SAVE_DIALOG); retval = ERROR_OPTION; Insets i = d.getInsets(); d.setSize(500 + i.top + i.bottom, d.getPreferredSize().height); d.show(); return retval; } |
Rectangle repaintRec = rec0.union(rec1); | Rectangle repaintRec = SwingUtilities.computeUnion(rec0.x, rec0.y, rec0.width, rec0.height, rec1); | protected void damageLineRange (int line0, int line1, Shape a, Component host) { if (a == null) return; Rectangle rec0 = lineToRect(a, line0); Rectangle rec1 = lineToRect(a, line1); if (rec0 == null || rec1 == null) // something went wrong, repaint the entire host to be safe host.repaint(); else { Rectangle repaintRec = rec0.union(rec1); host.repaint(repaintRec.x, repaintRec.y, repaintRec.width, repaintRec.height); } } |
paintComponent(g); | void paintSimple(Graphics g) { Point pos = getViewPosition(); Component view = getView(); boolean translated = false; try { g.translate(-pos.x, -pos.y); translated = true; view.paint(g); } finally { if (translated) g.translate (pos.x, pos.y); } } |
|
return ch.getPlainSocketImpl().getNativeFD(); | try { return ch.getVMChannel().getState().getNativeFD(); } catch (IOException ioe) { return 0; } | public int getNativeFD() { return ch.getPlainSocketImpl().getNativeFD(); } |
} catch (ThreadDeath death) { throw death; | public String get(String key, String defaultVal) { if (key.length() > MAX_KEY_LENGTH) throw new IllegalArgumentException(key); synchronized(lock) { if (isRemoved()) throw new IllegalStateException("Node removed"); String value; try { value = getSpi(key); } catch (Throwable t) { value = null; } if (value != null) { return value; } else { return defaultVal; } } } |
|
final byte[] buf = new byte[length + ofsMisAlign + (alignment - lenMisAlign)]; | final byte[] buf = new byte[(length / alignment) + alignment]; | public void read(long devOffset, byte[] dest, int destOffset, int length) throws IOException { if (length == 0) { return; } final int ofsMisAlign = (int)(devOffset % alignment); final int lenMisAlign = (length % alignment); /*log.debug("devOffset =" + devOffset); log.debug("length =" + length); log.debug("ofsMisAlign=" + ofsMisAlign); log.debug("lenMisAlign=" + lenMisAlign);*/ if ((ofsMisAlign != 0) || (lenMisAlign != 0)) { final byte[] buf = new byte[length + ofsMisAlign + (alignment - lenMisAlign)]; parentApi.read(devOffset - ofsMisAlign, buf, 0, buf.length); if (ofsMisAlign != 0) { System.arraycopy(buf, alignment - ofsMisAlign, dest, destOffset, length); } else { System.arraycopy(buf, 0, dest, destOffset, length); } } else { // Aligned call, pass on parentApi.read(devOffset, dest, destOffset, length); } } |
return (String) getAttribute(NameAttribute); | return (String) getAttribute(StyleConstants.NameAttribute); | public String getName() { return (String) getAttribute(NameAttribute); } |
ElementSpec element = new ElementSpec(null, ElementSpec.EndTagType); | DefaultStyledDocument.ElementSpec element; element = new DefaultStyledDocument.ElementSpec(null, DefaultStyledDocument.ElementSpec.EndTagType); | protected void blockClose(HTML.Tag t) { printBuffer(); ElementSpec element = new ElementSpec(null, ElementSpec.EndTagType); parseBuffer.addElement(element); printBuffer(); } |
ElementSpec element = new ElementSpec(attr.copyAttributes(), ElementSpec.StartTagType); | DefaultStyledDocument.ElementSpec element; element = new DefaultStyledDocument.ElementSpec(attr.copyAttributes(), DefaultStyledDocument.ElementSpec.StartTagType); | protected void blockOpen(HTML.Tag t, MutableAttributeSet attr) { printBuffer(); ElementSpec element = new ElementSpec(attr.copyAttributes(), ElementSpec.StartTagType); parseBuffer.addElement(element); printBuffer(); } |
ElementSpec[] elements = new ElementSpec[parseBuffer.size()]; | DefaultStyledDocument.ElementSpec[] elements; elements = new DefaultStyledDocument.ElementSpec[parseBuffer.size()]; | public void flush() throws BadLocationException { ElementSpec[] elements = new ElementSpec[parseBuffer.size()]; parseBuffer.copyInto(elements); parseBuffer.removeAllElements(); insert(offset, elements); offset += HTMLDocument.this.getLength() - offset; } |
return getElement(child, attribute, value); | Element grandChild = getElement(child, attribute, value); if (grandChild != null) return grandChild; | public Element getElement(Element e, Object attribute, Object value) { if (e != null) { if (e.getAttributes().containsAttribute(attribute, value)) return e; int count = e.getElementCount(); for (int j = 0; j < count; j++) { Element child = e.getElement(j); if (child.getAttributes().containsAttribute(attribute, value)) return child; return getElement(child, attribute, value); } } return null; } |
public JFileChooser() { } | public JFileChooser() { setup(null); setCurrentDirectory(null); } | public JFileChooser() { // TODO } // JFileChooser() |
public boolean accept(File file) { return false; } | public boolean accept(File f) { if (f == null) return false; return getFileFilter().accept(f); } | public boolean accept(File file) { return false; // TODO } // accept() |
public void addActionListener(ActionListener listener) | public void addActionListener(ActionListener l) | public void addActionListener(ActionListener listener) { listenerList.add (ActionListener.class, listener); } |
listenerList.add (ActionListener.class, listener); | listenerList.add(ActionListener.class, l); | public void addActionListener(ActionListener listener) { listenerList.add (ActionListener.class, listener); } |
public void addChoosableFileFilter(FileFilter filter) { } | public void addChoosableFileFilter(FileFilter filter) { FileFilter[] old = getChoosableFileFilters(); choosableFilters.add(filter); FileFilter[] newFilters = getChoosableFileFilters(); firePropertyChange(CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY, old, newFilters); } | public void addChoosableFileFilter(FileFilter filter) { // TODO } // addChoosableFileFilter() |
public void approveSelection() { } | public void approveSelection() { retval = APPROVE_OPTION; fireActionPerformed(APPROVE_SELECTION); } | public void approveSelection() { // TODO } // approveSelection() |
public void cancelSelection() { } | public void cancelSelection() { retval = CANCEL_OPTION; fireActionPerformed(CANCEL_SELECTION); } | public void cancelSelection() { // TODO } // cancelSelection() |
public void changeToParentDirectory() { } | public void changeToParentDirectory() { setCurrentDirectory(fsv.getParentDirectory(currentDir)); } | public void changeToParentDirectory() { // TODO } // changeToParentDirectory() |
public void ensureFileIsVisible(File file) { } | public void ensureFileIsVisible(File f) { getUI().ensureFileIsVisible(this, f); } | public void ensureFileIsVisible(File file) { // TODO } // ensureFileIsVisible() |
protected void fireActionPerformed(String command) { } | protected void fireActionPerformed(String command) { ActionListener[] list = getActionListeners(); ActionEvent event = new ActionEvent(this, ActionEvent.ACTION_PERFORMED, command); for (int i = 0; i < list.length; i++) list[i].actionPerformed(event); } | protected void fireActionPerformed(String command) { // TODO } // fireActionPerformed() |
public FileFilter getAcceptAllFileFilter() { return null; } | public FileFilter getAcceptAllFileFilter() { return getUI().getAcceptAllFileFilter(this); } | public FileFilter getAcceptAllFileFilter() { return null; // TODO } // getAcceptAllFileFilter() |
if (accessibleContext == null) accessibleContext = new AccessibleJFileChooser(); return accessibleContext; | return null; | public AccessibleContext getAccessibleContext() { if (accessibleContext == null) accessibleContext = new AccessibleJFileChooser(); return accessibleContext; } |
public JComponent getAccessory() { return null; } | public JComponent getAccessory() { return accessory; } | public JComponent getAccessory() { return null; // TODO } // getAccessory() |
return (ActionListener[]) listenerList.getListeners (ActionListener.class); | return (ActionListener[]) getListeners(ActionListener.class); | public ActionListener[] getActionListeners() { return (ActionListener[]) listenerList.getListeners (ActionListener.class); } |
public int getApproveButtonMnemonic() { return 0; } | public int getApproveButtonMnemonic() { return approveButtonMnemonic; } | public int getApproveButtonMnemonic() { return 0; // TODO } // getApproveButtonMnemonic() |
public String getApproveButtonText() { return null; } | public String getApproveButtonText() { return approveButtonText; } | public String getApproveButtonText() { return null; // TODO } // getApproveButtonText() |
public String getApproveButtonToolTipText() { return null; } | public String getApproveButtonToolTipText() { return approveButtonToolTipText; } | public String getApproveButtonToolTipText() { return null; // TODO } // getApproveButtonToolTipText() |
public FileFilter[] getChoosableFileFilters() { return null; } | public FileFilter[] getChoosableFileFilters() { return (FileFilter[]) choosableFilters.toArray(new FileFilter[0]); } | public FileFilter[] getChoosableFileFilters() { return null; // TODO } // getChoosableFileFilters() |
public boolean getControlButtonsAreShown() { return false; } | public boolean getControlButtonsAreShown() { return controlButtonsShown; } | public boolean getControlButtonsAreShown() { return false; // TODO } // getControlButtonsAreShown() |
public File getCurrentDirectory() { return null; } | public File getCurrentDirectory() { return currentDir; } | public File getCurrentDirectory() { return null; // TODO } // getCurrentDirectory() |
public String getDescription(File file) { return null; } | public String getDescription(File f) { return getInternalFileView().getDescription(f); } | public String getDescription(File file) { return null; // TODO } // getDescription() |
public String getDialogTitle() { return null; } | public String getDialogTitle() { return dialogTitle; } | public String getDialogTitle() { return null; // TODO } // getDialogTitle() |
public int getDialogType() { return 0; } | public int getDialogType() { return dialogType; } | public int getDialogType() { return 0; // TODO } // getDialogType() |
public FileFilter getFileFilter() { return null; } | public FileFilter getFileFilter() { return currentFilter; } | public FileFilter getFileFilter() { return null; // TODO } // getFileFilter() |
public int getFileSelectionMode() { return 0; } | public int getFileSelectionMode() { return fileSelectionMode; } | public int getFileSelectionMode() { return 0; // TODO } // getFileSelectionMode() |
public FileSystemView getFileSystemView() { return null; } | public FileSystemView getFileSystemView() { return fsv; } | public FileSystemView getFileSystemView() { return null; // TODO } // getFileSystemView() |
public FileView getFileView() { return null; } | public FileView getFileView() { return fv; } | public FileView getFileView() { return null; // TODO } // getFileView() |
public Icon getIcon(File file) { return null; } | public Icon getIcon(File f) { return getInternalFileView().getIcon(f); } | public Icon getIcon(File file) { return null; // TODO } // getIcon() |
public String getName(File file) { return null; } | public String getName(File f) { return getInternalFileView().getName(f); } | public String getName(File file) { return null; // TODO } // getName() |
public File getSelectedFile() { return null; } | public File getSelectedFile() { return selectedFile; } | public File getSelectedFile() { return null; // TODO } // getSelectedFile() |
public File[] getSelectedFiles() { return null; } | public File[] getSelectedFiles() { return selectedFiles; } | public File[] getSelectedFiles() { return null; // TODO } // getSelectedFiles() |
public String getTypeDescription(File file) { return null; } | public String getTypeDescription(File f) { return getInternalFileView().getTypeDescription(f); } | public String getTypeDescription(File file) { return null; // TODO } // getTypeDescription() |
public String getUIClassID() { return uiClassID; } | public String getUIClassID() { return "FileChooserUI"; } | public String getUIClassID() { return uiClassID; } // getUIClassID() |
public boolean isAcceptAllFileFilterUsed() { return false; } | public boolean isAcceptAllFileFilterUsed() { return isAcceptAll; } | public boolean isAcceptAllFileFilterUsed() { return false; // TODO } // isAcceptAllFileFilterUsed() |
public boolean isDirectorySelectionEnabled() { return false; } | public boolean isDirectorySelectionEnabled() { return (fileSelectionMode == DIRECTORIES_ONLY || fileSelectionMode == FILES_AND_DIRECTORIES); } | public boolean isDirectorySelectionEnabled() { return false; // TODO } // isDirectorySelectionEnabled() |
public boolean isFileHidingEnabled() { return false; } | public boolean isFileHidingEnabled() { return fileHiding; } | public boolean isFileHidingEnabled() { return false; // TODO } // isFileHidingEnabled() |
public boolean isFileSelectionEnabled() { return false; } | public boolean isFileSelectionEnabled() { return (fileSelectionMode == FILES_ONLY || fileSelectionMode == FILES_AND_DIRECTORIES); } | public boolean isFileSelectionEnabled() { return false; // TODO } // isFileSelectionEnabled() |
public boolean isMultiSelectionEnabled() { return false; } | public boolean isMultiSelectionEnabled() { return multiSelection; } | public boolean isMultiSelectionEnabled() { return false; // TODO } // isMultiSelectionEnabled() |
public boolean isTraversable(File file) { return false; } | public boolean isTraversable(File f) { return getFileSystemView().isTraversable(f).booleanValue(); } | public boolean isTraversable(File file) { return false; // TODO } // isTraversable() |
protected String paramString() { return null; } | protected String paramString() { return "JFileChooser"; } | protected String paramString() { return null; // TODO } // paramString() |
public void removeActionListener(ActionListener listener) | public void removeActionListener(ActionListener l) { try { listenerList.remove(ActionListener.class, l); } catch (IllegalArgumentException e) | public void removeActionListener(ActionListener listener) { listenerList.remove (ActionListener.class, listener); } |
listenerList.remove (ActionListener.class, listener); | e.printStackTrace(); } | public void removeActionListener(ActionListener listener) { listenerList.remove (ActionListener.class, listener); } |
public boolean removeChoosableFileFilter(FileFilter filter) { return false; } | public boolean removeChoosableFileFilter(FileFilter f) { FileFilter[] old = getChoosableFileFilters(); if (! choosableFilters.remove(f)) return false; FileFilter[] newFilters = getChoosableFileFilters(); firePropertyChange(CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY, old, newFilters); return true; } | public boolean removeChoosableFileFilter(FileFilter filter) { return false; // TODO } // removeChoosableFileFilter() |
public void rescanCurrentDirectory() { } | public void rescanCurrentDirectory() { getUI().rescanCurrentDirectory(this); } | public void rescanCurrentDirectory() { // TODO } // rescanCurrentDirectory() |
public void resetChoosableFileFilters() { } | public void resetChoosableFileFilters() { choosableFilters.clear(); choosableFilters.add(getUI().getAcceptAllFileFilter(this)); setFileFilter((FileFilter) choosableFilters.get(0)); } | public void resetChoosableFileFilters() { // TODO } // resetChoosableFileFilters() |
public void setAcceptAllFileFilterUsed(boolean value) { } | public void setAcceptAllFileFilterUsed(boolean b) { if (isAcceptAll != b) { isAcceptAll = b; firePropertyChange(ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY, ! isAcceptAll, isAcceptAll); } } | public void setAcceptAllFileFilterUsed(boolean value) { // TODO } // setAcceptAllFileFilterUsed() |
public void setAccessory(JComponent accessory) { } | public void setAccessory(JComponent newAccessory) { if (accessory != newAccessory) { JComponent old = accessory; accessory = newAccessory; firePropertyChange(ACCESSORY_CHANGED_PROPERTY, old, accessory); } } | public void setAccessory(JComponent accessory) { // TODO } // setAccessory() |
public void setApproveButtonMnemonic(int mnemonic) { } | public void setApproveButtonMnemonic(int mnemonic) { if (approveButtonMnemonic != mnemonic) { int oldMnemonic = approveButtonMnemonic; approveButtonMnemonic = mnemonic; firePropertyChange(APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY, oldMnemonic, approveButtonMnemonic); } } | public void setApproveButtonMnemonic(int mnemonic) { // TODO } // setApproveButtonMnemonic() |
public void setApproveButtonText(String text) { } | public void setApproveButtonText(String approveButtonText) { if (this.approveButtonText != approveButtonText) { String oldText = this.approveButtonText; this.approveButtonText = approveButtonText; firePropertyChange(APPROVE_BUTTON_TEXT_CHANGED_PROPERTY, oldText, this.approveButtonText); } } | public void setApproveButtonText(String text) { // TODO } // setApproveButtonText() |
public void setApproveButtonToolTipText(String text) { } | public void setApproveButtonToolTipText(String toolTipText) { if (approveButtonToolTipText != toolTipText) { String oldText = approveButtonToolTipText; approveButtonToolTipText = toolTipText; firePropertyChange(APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY, oldText, approveButtonToolTipText); } } | public void setApproveButtonToolTipText(String text) { // TODO } // setApproveButtonToolTipText() |
public void setControlButtonsAreShown(boolean value) { } | public void setControlButtonsAreShown(boolean b) { if (controlButtonsShown != b) { controlButtonsShown = b; firePropertyChange(CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY, ! controlButtonsShown, controlButtonsShown); } } | public void setControlButtonsAreShown(boolean value) { // TODO } // setControlButtonsAreShown() |
public void setCurrentDirectory(File directory) { } | public void setCurrentDirectory(File dir) { if (currentDir != dir || dir == null) { if (dir == null) dir = fsv.getDefaultDirectory(); File old = currentDir; currentDir = dir; firePropertyChange(DIRECTORY_CHANGED_PROPERTY, old, currentDir); } } | public void setCurrentDirectory(File directory) { // TODO } // setCurrentDirectory() |
public void setDialogTitle(String title) { } | public void setDialogTitle(String dialogTitle) { if (this.dialogTitle != dialogTitle) { String old = this.dialogTitle; this.dialogTitle = dialogTitle; firePropertyChange(DIALOG_TITLE_CHANGED_PROPERTY, old, this.dialogTitle); } } | public void setDialogTitle(String title) { // TODO } // setDialogTitle() |
public void setDialogType(int type) { } | public void setDialogType(int dialogType) { if (dialogType != OPEN_DIALOG && dialogType != SAVE_DIALOG && dialogType != CUSTOM_DIALOG) throw new IllegalArgumentException("Choose allowable dialogType."); if (this.dialogType != dialogType) { int old = this.dialogType; this.dialogType = dialogType; firePropertyChange(DIALOG_TYPE_CHANGED_PROPERTY, old, this.dialogType); } } | public void setDialogType(int type) { // TODO } // setDialogType() |
public void setFileFilter(FileFilter filter) { } | public void setFileFilter(FileFilter filter) { if (currentFilter != filter) { FileFilter old = currentFilter; currentFilter = filter; firePropertyChange(FILE_FILTER_CHANGED_PROPERTY, old, currentFilter); } } | public void setFileFilter(FileFilter filter) { // TODO } // setFileFilter() |
public void setFileHidingEnabled(boolean enabled) { } | public void setFileHidingEnabled(boolean b) { if (fileHiding != b) { fileHiding = b; firePropertyChange(FILE_HIDING_CHANGED_PROPERTY, ! fileHiding, fileHiding); } } | public void setFileHidingEnabled(boolean enabled) { // TODO } // setFileHidingEnabled() |
public void setFileSelectionMode(int mode) { } | public void setFileSelectionMode(int mode) { if (mode != FILES_ONLY && mode != DIRECTORIES_ONLY && mode != FILES_AND_DIRECTORIES) throw new IllegalArgumentException("Choose a correct file selection mode."); if (fileSelectionMode != mode) { int old = fileSelectionMode; fileSelectionMode = mode; firePropertyChange(FILE_SELECTION_MODE_CHANGED_PROPERTY, old, fileSelectionMode); } } | public void setFileSelectionMode(int mode) { // TODO } // setFileSelectionMode() |
public void setFileSystemView(FileSystemView fsv) { } | public void setFileSystemView(FileSystemView fsv) { if (this.fsv != fsv) { FileSystemView old = this.fsv; this.fsv = fsv; firePropertyChange(FILE_SYSTEM_VIEW_CHANGED_PROPERTY, old, this.fsv); } } | public void setFileSystemView(FileSystemView fsv) { // TODO } // setFileSystemView() |
public void setFileView(FileView view) { } | public void setFileView(FileView fileView) { if (fv != fileView) { FileView old = fv; fv = fileView; firePropertyChange(FILE_VIEW_CHANGED_PROPERTY, old, fv); } } | public void setFileView(FileView view) { // TODO } // setFileView() |
public void setMultiSelectionEnabled(boolean enabled) { } | public void setMultiSelectionEnabled(boolean b) { if (multiSelection != b) { multiSelection = b; firePropertyChange(MULTI_SELECTION_ENABLED_CHANGED_PROPERTY, ! multiSelection, multiSelection); } } | public void setMultiSelectionEnabled(boolean enabled) { // TODO } // setMultiSelectionEnabled() |
public void setSelectedFile(File file) { } | public void setSelectedFile(File file) { if (selectedFile != file) { File old = selectedFile; selectedFile = file; firePropertyChange(SELECTED_FILE_CHANGED_PROPERTY, old, selectedFile); } } | public void setSelectedFile(File file) { // TODO } // setSelectedFile() |
public void setSelectedFiles(File[] files) { } | public void setSelectedFiles(File[] selectedFiles) { if (this.selectedFiles != selectedFiles) { File[] old = this.selectedFiles; this.selectedFiles = selectedFiles; firePropertyChange(SELECTED_FILES_CHANGED_PROPERTY, old, selectedFiles); } if (selectedFiles != null) setSelectedFile(selectedFiles[0]); } | public void setSelectedFiles(File[] files) { // TODO } // setSelectedFiles() |
protected void setup(FileSystemView view) { } | protected void setup(FileSystemView view) { if (view == null) view = FileSystemView.getFileSystemView(); setFileSystemView(view); updateUI(); } | protected void setup(FileSystemView view) { // TODO } // setup() |
public int showDialog(Component parent, String approveButtonText) { return CANCEL_OPTION; } | public int showDialog(Component parent, String approveButtonText) throws HeadlessException { JDialog d = createDialog(parent); setApproveButtonText(approveButtonText); setDialogType(CUSTOM_DIALOG); retval = ERROR_OPTION; d.pack(); d.show(); return retval; } | public int showDialog(Component parent, String approveButtonText) { return CANCEL_OPTION; // TODO } // showDialog() |
public int showOpenDialog(Component parent) { return CANCEL_OPTION; } | public int showOpenDialog(Component parent) throws HeadlessException { JDialog d = createDialog(parent); d.setTitle("Open"); setDialogType(OPEN_DIALOG); retval = ERROR_OPTION; d.pack(); d.show(); return retval; } | public int showOpenDialog(Component parent) { return CANCEL_OPTION; // TODO } // showOpenDialog() |
public int showSaveDialog(Component parent) { return CANCEL_OPTION; } | public int showSaveDialog(Component parent) throws HeadlessException { JDialog d = createDialog(parent); setDialogType(SAVE_DIALOG); retval = ERROR_OPTION; d.pack(); d.show(); return retval; } | public int showSaveDialog(Component parent) { return CANCEL_OPTION; // TODO } // showSaveDialog() |
public void updateUI() { setUI((FileChooserUI) UIManager.get(this)); invalidate(); } | public void updateUI() { setUI((FileChooserUI) UIManager.getUI(this)); revalidate(); } | public void updateUI() { setUI((FileChooserUI) UIManager.get(this)); invalidate(); } // updateUI() |
int ffw0 = bk.getNextByte(); if (!isAttribute(ffw0)) { ffw1 = bk.getNextByte(); fcw1 = bk.getNextByte(); | int ffw0 = bk.getNextByte() & 0xff; if ((ffw0 & 0x40) == 0x40) { ffw1 = bk.getNextByte() & 0xff; fcw1 = bk.getNextByte() & 0xff; | private boolean writeToDisplay(boolean controlsExist) { int pos = 0; boolean error=false; boolean done=false; int attr; byte nextOne; byte control0 = 0; byte control1 = 0; int saRows = screen52.getRows(); int saCols = screen52.getCols(); try { if (controlsExist) { control0 = bk.getNextByte(); control1 = bk.getNextByte(); processCC0(control0); } while (bk.hasNext() && !done) {// pos = bk.getCurrentPos();// int rowc = screen52.getCurrentRow();// int colc = screen52.getCurrentCol(); switch (bk.getNextByte()) { case 1: // SOH - Start of Header Order error = processSOH(); break; case 02: // RA - Repeat to address int row = screen52.getCurrentRow(); int col = screen52.getCurrentCol(); int toRow = bk.getNextByte(); int toCol = bk.getNextByte() & 0xff; if (toRow >= row) { int repeat = bk.getNextByte(); // a little intelligence here I hope if (row == 1 && col == 2 && toRow == screen52.getRows() && toCol == screen52.getCols()) screen52.clearScreen(); else { if (repeat != 0) repeat = getASCIIChar(repeat); int times = ((toRow * screen52.getCols()) + toCol) - ((row * screen52.getCols()) + col); while (times-- >= 0) { screen52.setChar(repeat); } } } else { sendNegResponse(NR_REQUEST_ERROR,0x05,0x01,0x23," RA invalid"); error =true; } break; case 03: // EA - Erase to address int EArow = screen52.getCurrentRow(); int EAcol = screen52.getCurrentCol(); int toEARow = bk.getNextByte(); int toEACol = bk.getNextByte() & 0xff; int EALength = bk.getNextByte() & 0xff; while (--EALength > 0) { bk.getNextByte(); } char EAAttr = (char)0; // a little intelligence here I hope if (EArow == 1 && EAcol == 2 && toEARow == screen52.getRows() && toEACol == screen52.getCols()) screen52.clearScreen(); else { int times = ((toEARow * screen52.getCols()) + toEACol) - ((EArow * screen52.getCols()) + EAcol); while (times-- >= 0) { screen52.setChar(EAAttr); } } break; case 04: // Command - Escape done = true; break; case 16: // TD - Transparent Data bk.getNextByte(); int j = bk.getNextByte(); // length while (j-- > 0) bk.getNextByte(); break; case 17: // SBA - set buffer address order (row column) int saRow = bk.getNextByte(); int saCol = bk.getNextByte() & 0xff; // make sure it is in bounds if (saRow >= 0 && saRow <= screen52.getRows() && saCol >= 0 && saCol <= screen52.getCols()) { screen52.goto_XY(saRow,saCol); // now set screen position for output } else { sendNegResponse(NR_REQUEST_ERROR,0x05,0x01,0x22,"invalid row/col order" + " saRow = " + saRow + " saRows = " + screen52.getRows() + " saCol = " + saCol); error = true; } break; case 18: // WEA - Extended Attribute bk.getNextByte(); bk.getNextByte(); break; case 19: // IC - Insert Cursor case 20: // MC - Move Cursor int icX = bk.getNextByte(); int icY = bk.getNextByte() & 0xff; if (icX >= 0 && icX <= saRows && icY >= 0 && icY <= saCols)// System.out.println(" IC " + icX + " " + icY); screen52.setPendingInsert(true,icX,icY); else { sendNegResponse(NR_REQUEST_ERROR,0x05,0x01,0x22," IC/IM position invalid "); error = true; } break; case 21: // WTDSF - Write To Display Structured Field order error = writeToDisplayStructuredField(); break; case 29: // SF - Start of Field int fcw1 = 0; int fcw2 = 0; int ffw1 = 0; int ffw0 = bk.getNextByte(); // FFW if (!isAttribute(ffw0)) { ffw1 = bk.getNextByte(); // FFW 1 fcw1 = bk.getNextByte(); // check for field control word if (!isAttribute(fcw1)) { fcw2 = bk.getNextByte(); // FCW 2 attr = bk.getNextByte(); // attribute field } else { attr = fcw1; // attribute of field fcw1 = 0; } } else { attr = ffw0; } int fLength = (bk.getNextByte() & 0xff) << 8 | bk.getNextByte() & 0xff; screen52.addField(attr,fLength, ffw0,ffw1,fcw1,fcw2); break; default: // all others must be output to screen byte byte0 = bk.getByteOffset(-1); if (isAttribute(byte0)) { screen52.setAttr(byte0); } else { if (!screen52.isStatusErrorCode()) { if (!isData(byte0)) {// if (byte0 == 255) {// sendNegResponse(NR_REQUEST_ERROR,0x05,0x01,0x42,// " Attempt to send FF to screen");// }// else screen52.setChar(byte0); } else// screen52.setChar(getASCIIChar(byte0)); screen52.setChar(codePage.ebcdic2uni(byte0)); } else { if (byte0 == 0) screen52.setChar(byte0); else screen52.setChar(getASCIIChar(byte0)); } } break; } if (error) done = true; } } catch (Exception e) { System.out.println("write to display " + e.getMessage()); }; processCC1(control1); return error; } |
fcw2 = bk.getNextByte(); attr = bk.getNextByte(); | fcw2 = bk.getNextByte() & 0xff; attr = bk.getNextByte() & 0xff; | private boolean writeToDisplay(boolean controlsExist) { int pos = 0; boolean error=false; boolean done=false; int attr; byte nextOne; byte control0 = 0; byte control1 = 0; int saRows = screen52.getRows(); int saCols = screen52.getCols(); try { if (controlsExist) { control0 = bk.getNextByte(); control1 = bk.getNextByte(); processCC0(control0); } while (bk.hasNext() && !done) {// pos = bk.getCurrentPos();// int rowc = screen52.getCurrentRow();// int colc = screen52.getCurrentCol(); switch (bk.getNextByte()) { case 1: // SOH - Start of Header Order error = processSOH(); break; case 02: // RA - Repeat to address int row = screen52.getCurrentRow(); int col = screen52.getCurrentCol(); int toRow = bk.getNextByte(); int toCol = bk.getNextByte() & 0xff; if (toRow >= row) { int repeat = bk.getNextByte(); // a little intelligence here I hope if (row == 1 && col == 2 && toRow == screen52.getRows() && toCol == screen52.getCols()) screen52.clearScreen(); else { if (repeat != 0) repeat = getASCIIChar(repeat); int times = ((toRow * screen52.getCols()) + toCol) - ((row * screen52.getCols()) + col); while (times-- >= 0) { screen52.setChar(repeat); } } } else { sendNegResponse(NR_REQUEST_ERROR,0x05,0x01,0x23," RA invalid"); error =true; } break; case 03: // EA - Erase to address int EArow = screen52.getCurrentRow(); int EAcol = screen52.getCurrentCol(); int toEARow = bk.getNextByte(); int toEACol = bk.getNextByte() & 0xff; int EALength = bk.getNextByte() & 0xff; while (--EALength > 0) { bk.getNextByte(); } char EAAttr = (char)0; // a little intelligence here I hope if (EArow == 1 && EAcol == 2 && toEARow == screen52.getRows() && toEACol == screen52.getCols()) screen52.clearScreen(); else { int times = ((toEARow * screen52.getCols()) + toEACol) - ((EArow * screen52.getCols()) + EAcol); while (times-- >= 0) { screen52.setChar(EAAttr); } } break; case 04: // Command - Escape done = true; break; case 16: // TD - Transparent Data bk.getNextByte(); int j = bk.getNextByte(); // length while (j-- > 0) bk.getNextByte(); break; case 17: // SBA - set buffer address order (row column) int saRow = bk.getNextByte(); int saCol = bk.getNextByte() & 0xff; // make sure it is in bounds if (saRow >= 0 && saRow <= screen52.getRows() && saCol >= 0 && saCol <= screen52.getCols()) { screen52.goto_XY(saRow,saCol); // now set screen position for output } else { sendNegResponse(NR_REQUEST_ERROR,0x05,0x01,0x22,"invalid row/col order" + " saRow = " + saRow + " saRows = " + screen52.getRows() + " saCol = " + saCol); error = true; } break; case 18: // WEA - Extended Attribute bk.getNextByte(); bk.getNextByte(); break; case 19: // IC - Insert Cursor case 20: // MC - Move Cursor int icX = bk.getNextByte(); int icY = bk.getNextByte() & 0xff; if (icX >= 0 && icX <= saRows && icY >= 0 && icY <= saCols)// System.out.println(" IC " + icX + " " + icY); screen52.setPendingInsert(true,icX,icY); else { sendNegResponse(NR_REQUEST_ERROR,0x05,0x01,0x22," IC/IM position invalid "); error = true; } break; case 21: // WTDSF - Write To Display Structured Field order error = writeToDisplayStructuredField(); break; case 29: // SF - Start of Field int fcw1 = 0; int fcw2 = 0; int ffw1 = 0; int ffw0 = bk.getNextByte(); // FFW if (!isAttribute(ffw0)) { ffw1 = bk.getNextByte(); // FFW 1 fcw1 = bk.getNextByte(); // check for field control word if (!isAttribute(fcw1)) { fcw2 = bk.getNextByte(); // FCW 2 attr = bk.getNextByte(); // attribute field } else { attr = fcw1; // attribute of field fcw1 = 0; } } else { attr = ffw0; } int fLength = (bk.getNextByte() & 0xff) << 8 | bk.getNextByte() & 0xff; screen52.addField(attr,fLength, ffw0,ffw1,fcw1,fcw2); break; default: // all others must be output to screen byte byte0 = bk.getByteOffset(-1); if (isAttribute(byte0)) { screen52.setAttr(byte0); } else { if (!screen52.isStatusErrorCode()) { if (!isData(byte0)) {// if (byte0 == 255) {// sendNegResponse(NR_REQUEST_ERROR,0x05,0x01,0x42,// " Attempt to send FF to screen");// }// else screen52.setChar(byte0); } else// screen52.setChar(getASCIIChar(byte0)); screen52.setChar(codePage.ebcdic2uni(byte0)); } else { if (byte0 == 0) screen52.setChar(byte0); else screen52.setChar(getASCIIChar(byte0)); } } break; } if (error) done = true; } } catch (Exception e) { System.out.println("write to display " + e.getMessage()); }; processCC1(control1); return error; } |
System.out.println("\ndoRenameVariables block: " + block); | private void doRenameVariables(IRBasicBlock block) { System.out.println("\ndoRenameVariables block: " + block); Iterator it = block.getQuads().iterator(); while (it.hasNext()) { Quad q = (Quad) it.next(); Operand[] refs = q.getReferencedOps(); if (refs != null) { int n = refs.length; for (int i=0; i<n; i+=1) { SSAStack st = getStack(refs[i]); if (st != null) { refs[i] = st.peek(); } } } if (q instanceof AssignQuad) { AssignQuad aq = (AssignQuad) q; SSAStack st = getStack(aq.getLHS()); aq.setLHS(st.getNewVariable()); } } } |
|
System.out.println("\nplacePhiFunctions"); | private void placePhiFunctions() { System.out.println("\nplacePhiFunctions"); for (int i=0; i<bblocks.length; i+=1) { IRBasicBlock b = bblocks[i]; BootableArrayList defList = b.getDefList(); for (int j=0; j<defList.size(); j+=1) { Variable def = (Variable) defList.get(j); List df = b.getDominanceFrontier(); Iterator it = df.iterator(); while (it.hasNext()) { IRBasicBlock dfb = (IRBasicBlock) it.next(); dfb.add(new PhiAssignQuad(dfb, def.getIndex())); } } } } |
|
System.out.println("\npopVariables block: " + block); | private void popVariables(IRBasicBlock block) { System.out.println("\npopVariables block: " + block); Iterator it = block.getQuads().iterator(); while (it.hasNext()) { Quad q = (Quad) it.next(); if (q instanceof AssignQuad) { AssignQuad aq = (AssignQuad) q; SSAStack st = getStack(aq.getLHS()); st.pop(); } } } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.