rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
if (! (comp instanceof AlphaComposite)) { SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkPermission(new AWTPermission("readDisplayPixels")); } | public void setComposite(Composite comp) { composite = comp; if (! (comp.equals(AlphaComposite.SrcOver))) isOptimized = false; else updateOptimization(); } | |
public void intersect(Area a) | public void intersect(Area area) | public void intersect(Area a) { // XXX Implement. throw new Error("not implemented"); } |
throw new Error("not implemented"); | if (isEmpty() || area.isEmpty()) { reset(); return; } if (equals(area)) return; Vector pathA = new Vector(); Area B = (Area) area.clone(); pathA.addAll(solids); pathA.addAll(holes); Vector pathB = new Vector(); pathB.addAll(B.solids); pathB.addAll(B.holes); int nNodes = 0; for (int i = 0; i < pathA.size(); i++) { ... | public void intersect(Area a) { // XXX Implement. throw new Error("not implemented"); } |
public GlyphVector createGlyphVector (FontRenderContext ctx, char[] chars) { return peer.createGlyphVector(this, ctx, new StringCharacterIterator(new String(chars))); } | public GlyphVector createGlyphVector(FontRenderContext ctx, String str) { return peer.createGlyphVector(this, ctx, new StringCharacterIterator(str)); } | public GlyphVector createGlyphVector (FontRenderContext ctx, char[] chars){ return peer.createGlyphVector(this, ctx, new StringCharacterIterator(new String(chars)));} |
public int[] getComponents(Object pixel, int[] components, int offset) | public int[] getComponents(int pixel, int[] components, int offset) | public int[] getComponents(Object pixel, int[] components, int offset) { // subclasses has to implement this method. throw new UnsupportedOperationException(); } |
{ new SecureRandom ().nextBytes(sIV); } | getDefaultPRNG().nextBytes(sIV); | private void parseO(final String o) throws AuthenticationException { this.replayDetection = false; boolean integrity = false; boolean confidentiality = false; String option; int i; final StringTokenizer st = new StringTokenizer(o.toLowerCase(), ","); while (st.hasMoreTokens()) { opti... |
new SecureRandom ().nextBytes(sn); | getDefaultPRNG().nextBytes(sn); | private byte[] sendProtocolElements(final byte[] input) throws SaslException { if (DEBUG && debuglevel > 8) debug(TRACE, "==> sendProtocolElements()"); if (DEBUG && debuglevel > 6) debug(TRACE, "C: " + Util.dumpString(input)); // Client send U, I, sid, cn final InputBuffer frameIn = new InputBu... |
AccessController.doPrivileged(new InvokeAction(method, null, args)); | Object obj = null; if(!Modifier.isStatic(method.getModifiers())) { obj = cx.newInstance(); } AccessController.doPrivileged(new InvokeAction(method, obj, args)); | public void run() { try { // System.err.println("Registering shell in new thread."); // to // ensure // access // to // the // command // shell // in /... |
dumpBytes = !dumpBytes; if (dumpBytes) { try { if (fw == null) { fw = new FileOutputStream("log.txt"); dw = new BufferedOutputStream(fw); } } catch (FileNotFoundException fnfe) { System.out.println(fnfe.getMessage()); } } else { try { if (dw != null) dw.close(); if (fw != null) fw.close(); dw = null; fw = null; } ... | producer.toggleDebug(codePage); | protected final void toggleDebug () { dumpBytes = !dumpBytes; if (dumpBytes) { try { if (fw == null) { fw = new FileOutputStream("log.txt"); dw = new BufferedOutputStream(fw); } } catch (FileNotFoundException fnfe) { Syste... |
Color colorBg) { | Color colorBg, Session ses) { | public PrinterThread (ScreenChar[] sc, Font font, int cols, int rows, Color colorBg) { setPriority(1); screen = new ScreenChar[sc.length]; int len = sc.length; for (int x = 0; x < len; x++) { screen[x] = new ScreenChar(sc[x].s); screen[x].setCharAndAttr(s... |
session = ses; | public PrinterThread (ScreenChar[] sc, Font font, int cols, int rows, Color colorBg) { setPriority(1); screen = new ScreenChar[sc.length]; int len = sc.length; for (int x = 0; x < len; x++) { screen[x] = new ScreenChar(sc[x].s); screen[x].setCharAndAttr(s... | |
g2.setColor (colorBg); | g2.setColor (Color.black); | public int print (Graphics g, PageFormat pageFormat, int page) { Graphics2D g2; //--- Validate the page number, we only print the first page if (page == 0) { //--- Create a graphic2D object and set the default parameters g2 = (Graphics2D) g; g2.setColor (colorBg); //---... |
else { session.requestFocus(); } session = null; | public void run () { //--- Create a printerJob object PrinterJob printJob = PrinterJob.getPrinterJob (); printJob.setJobName("tn5250j"); //--- Set the printable class to this one since we //--- are implementing the Printable interface printJob.setPrintable (this); //--- Show a prin... | |
public AWTEvent(Object source, int id) | public AWTEvent(Event event) | public AWTEvent(Object source, int id) { super(source); this.id = id; } |
super(source); this.id = id; | this(event.target, event.id); consumed = event.consumed; | public AWTEvent(Object source, int id) { super(source); this.id = id; } |
loadSessions(); | My5250 () { splash = new TN5250jSplashScreen(createImageIcon("tn5250jSplash.jpg")); splash.setSteps(4); splash.setVisible(true); focused = createImageIcon("focused.gif"); unfocused = createImageIcon("unfocused.gif"); tnicon = createImageIcon("tnicon.jpg"); try { UIManager.... | |
loadSessions(); | loadDefaultSession(); | private String getConnectSession () { Connect sc = new Connect(frame1,LangTool.getString("ss.title"),sessions); // load the new session information from the session property file loadSessions(); return sc.getConnectKey(); } |
if (isSpecified("-MDI",args)) { | initConfig(args); if (sesProps.getProperty(GUI_MDI_TYPE) != null) { | static public void main(String[] args) { if (isSpecified("-MDI",args)) { useMDIFrames = true; } if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap de... |
if (!isSpecified("-nc",args)) { | if (sesProps.getProperty(NO_CHECK_RUNNING) != null) { | static public void main(String[] args) { if (isSpecified("-MDI",args)) { useMDIFrames = true; } if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap de... |
if (isSpecified("-d",args)) { | if (sesProps.getProperty(START_MONITOR_THREAD) != null) { | static public void main(String[] args) { if (isSpecified("-MDI",args)) { useMDIFrames = true; } if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap de... |
if (args.length > 0) { | int width = m.frame1.getWidth(); int height = m.frame1.getHeight(); | static public void main(String[] args) { if (isSpecified("-MDI",args)) { useMDIFrames = true; } if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap de... |
if (isSpecified("-width",args) || isSpecified("-height",args)) { int width = m.frame1.getWidth(); int height = m.frame1.getHeight(); if (isSpecified("-width",args)) { width = Integer.parseInt(m.getParm("-width",args)); } if (isSpecified("-height",args)) { height = Integer.parseInt(m.getParm("-height",args)); } m.fram... | if (sesProps.getProperty(GUI_FRAME_WIDTH) != null) { width = Integer.parseInt(sesProps.getProperty(GUI_FRAME_WIDTH)); | static public void main(String[] args) { if (isSpecified("-MDI",args)) { useMDIFrames = true; } if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap de... |
else { LangTool.init(); m.sessionArgs = null; | if (sesProps.getProperty(GUI_FRAME_HEIGHT) != null) { height = Integer.parseInt(sesProps.getProperty(GUI_FRAME_HEIGHT)); | static public void main(String[] args) { if (isSpecified("-MDI",args)) { useMDIFrames = true; } if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap de... |
if (m.sessionArgs != null) { | m.frame1.setSize(width,height); m.frame1.centerFrame(); | static public void main(String[] args) { if (isSpecified("-MDI",args)) { useMDIFrames = true; } if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap de... |
if (sesProps.getProperty(SESSION_LOCALE) != null) Locale.setDefault(parseLocal(sesProps.getProperty(SESSION_LOCALE))); m.splash.updateProgress(++m.step); m.frame1.setVisible(true); m.splash.setVisible(false); m.frame1.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); LangTool.init(); if (sesProps.getProp... | static public void main(String[] args) { if (isSpecified("-MDI",args)) { useMDIFrames = true; } if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap de... | |
Properties sesProps = new Properties(); | synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"... | |
String propFileName = null; String session = args[0]; sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpec... | Session s = manager.openSession(sesProps, sesProps.getProperty(SESSION_CONFIG_FILE), sesProps.getProperty(SESSION_TERM_NAME)); | synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"... |
if (isSpecified("-noembed",args)) { | if (sesProps.getProperty(GUI_NO_TAB) != null) { | synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"... |
if (isSpecified("-t",args)) frame1.addSessionView(sel,s); else frame1.addSessionView(session,s); | frame1.addSessionView(sesProps.getProperty(SESSION_TERM_NAME),s); | synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"... |
protected void parseArgs(String theStringList, String[] s) { | static protected void parseArgs(String theStringList, String[] s) { | protected void parseArgs(String theStringList, String[] s) { int x = 0; StringTokenizer tokenizer = new StringTokenizer(theStringList, " "); while (tokenizer.hasMoreTokens()) { s[x++] = tokenizer.nextToken(); } } |
if (sessionArgs != null && !sessionArgs[0].startsWith("-")) sel = sessionArgs[0]; else { sel = getDefaultSession(); } | void startNewSession() { int result = 2; String sel = ""; if (sessionArgs != null && !sessionArgs[0].startsWith("-")) sel = sessionArgs[0]; else { sel = getDefaultSession(); } Sessions sess = manager.getSessions(); if (sel != null && sess.getCount() == 0 ... | |
if (sel != null && sess.getCount() == 0 && sessions.containsKey(sel)){ sessionArgs = new String[NUM_PARMS]; parseArgs((String)sessions.getProperty(sel), sessionArgs); } if (sessionArgs == null || sess.getCount() > 0 || sessions.containsKey("emul.showConnectDialog")) { | if (sess.getCount() > 0 || sessions.containsKey("emul.showConnectDialog")) { | void startNewSession() { int result = 2; String sel = ""; if (sessionArgs != null && !sessionArgs[0].startsWith("-")) sel = sessionArgs[0]; else { sel = getDefaultSession(); } Sessions sess = manager.getSessions(); if (sel != null && sess.getCount() == 0 ... |
newSession(sel,sessionArgs); | newSession(sesProps.getProperty(SESSION_HOST), null); | void startNewSession() { int result = 2; String sel = ""; if (sessionArgs != null && !sessionArgs[0].startsWith("-")) sel = sessionArgs[0]; else { sel = getDefaultSession(); } Sessions sess = manager.getSessions(); if (sel != null && sess.getCount() == 0 ... |
stateMask = stateMask & (~ENABLED); | stateMask = stateMask & (~ENABLED) & (~ARMED) & (~PRESSED); | public void setEnabled(boolean e) { // if this call does not represent a CHANGE in state, then return if ((e && isEnabled()) || (!e && !isEnabled())) return; // make the change if (e) stateMask = stateMask | ENABLED; else stateMask = stateMask & (~ENABLED); // notify interested Chang... |
if (group != g) { | public void setGroup(ButtonGroup g) { if (group != g) { group = g; fireStateChanged(); } } | |
fireStateChanged(); } | public void setGroup(ButtonGroup g) { if (group != g) { group = g; fireStateChanged(); } } | |
public void setRxMode(int rxMode) { this.rxMode = rxMode; | final void setRxMode() { EEPRO100TxFD lastCmd0; byte newRxMode = 0; int flags; int entry; byte[] configData = new byte[22]; if (curTx - dirtyTx >= TX_RING_SIZE - 1) { rxMode = -1; return; } entry = curTx & TX_RING_SIZE - 1; lastCmd0 = lastCmd; lastCmd = txRing[entry]; txRing[entry].setStatus(CmdSuspend | ... | public void setRxMode(int rxMode) { this.rxMode = rxMode; } |
MyFileChooser pcFileChooser = new MyFileChooser(workingDir); | TN5250jFileChooser pcFileChooser = new TN5250jFileChooser(workingDir); | private void getPCFile() { String workingDir = System.getProperty("user.dir"); MyFileChooser pcFileChooser = new MyFileChooser(workingDir); int ret = pcFileChooser.showSaveDialog(new JFrame()); // check to see if something was actually chosen if (ret == JFileChooser.APPROVE_OPTION) { ... |
return AccessibleRole.POPUP_MENU; | return AccessibleRole.COMBO_BOX; | public AccessibleRole getAccessibleRole() { return AccessibleRole.POPUP_MENU; } |
thumbRect.y = contentRect.y; | thumbRect.y = trackRect.y; | protected void calculateThumbLocation() { int value = slider.getValue(); if (slider.getOrientation() == JSlider.HORIZONTAL) { thumbRect.x = xPositionForValue(value) - thumbRect.width / 2; thumbRect.y = contentRect.y; } else { thumbRect.x = contentRect.x; thumbRect.y = yPositionForValue(value)... |
thumbRect.x = contentRect.x; | thumbRect.x = trackRect.x; | protected void calculateThumbLocation() { int value = slider.getValue(); if (slider.getOrientation() == JSlider.HORIZONTAL) { thumbRect.x = xPositionForValue(value) - thumbRect.width / 2; thumbRect.y = contentRect.y; } else { thumbRect.x = contentRect.x; thumbRect.y = yPositionForValue(value)... |
{ if (thumbWidth > contentRect.width) thumbRect.width = contentRect.width / 4; else thumbRect.width = thumbWidth; if (thumbHeight > contentRect.height) thumbRect.height = contentRect.height; else thumbRect.height = thumbHeight; } | thumbRect.y = trackRect.y; | protected void calculateThumbSize() { if (slider.getOrientation() == JSlider.HORIZONTAL) { if (thumbWidth > contentRect.width) thumbRect.width = contentRect.width / 4; else thumbRect.width = thumbWidth; if (thumbHeight > contentRect.height) thumbRect.height = contentRect.height; else thumbRect.height... |
{ if (thumbWidth > contentRect.height) thumbRect.height = contentRect.height / 4; else thumbRect.height = thumbWidth; if (thumbHeight > contentRect.width) thumbRect.width = contentRect.width; else thumbRect.width = thumbHeight; } | thumbRect.x = trackRect.x; | protected void calculateThumbSize() { if (slider.getOrientation() == JSlider.HORIZONTAL) { if (thumbWidth > contentRect.width) thumbRect.width = contentRect.width / 4; else thumbRect.width = thumbWidth; if (thumbHeight > contentRect.height) thumbRect.height = contentRect.height; else thumbRect.height... |
trackBuffer = thumbRect.width; | trackBuffer = thumbRect.width / 2; | protected void calculateTrackBuffer() { if (slider.getOrientation() == JSlider.HORIZONTAL) trackBuffer = thumbRect.width; else trackBuffer = thumbRect.height; } |
trackBuffer = thumbRect.height; | trackBuffer = thumbRect.height / 2; | protected void calculateTrackBuffer() { if (slider.getOrientation() == JSlider.HORIZONTAL) trackBuffer = thumbRect.width; else trackBuffer = thumbRect.height; } |
trackRect.y = contentRect.y; | int h = getThumbSize().height; if (slider.getPaintTicks() && (slider.getMajorTickSpacing() > 0 || slider.getMinorTickSpacing() > 0)) h += getTickLength(); trackRect.y = contentRect.y + (contentRect.height - h) / 2 - 1; | protected void calculateTrackRect() { if (slider.getOrientation() == JSlider.HORIZONTAL) { trackRect.x = contentRect.x + trackBuffer; trackRect.y = contentRect.y; trackRect.width = contentRect.width - 2 * trackBuffer; trackRect.height = thumbRect.height; } else { trackRect.x = contentRect.x; tra... |
trackRect.x = contentRect.x; | int w = getThumbSize().width; if (slider.getPaintTicks() && (slider.getMajorTickSpacing() > 0 || slider.getMinorTickSpacing() > 0)) w += getTickLength(); trackRect.x = contentRect.x + (contentRect.width - w) / 2 - 1; | protected void calculateTrackRect() { if (slider.getOrientation() == JSlider.HORIZONTAL) { trackRect.x = contentRect.x + trackBuffer; trackRect.y = contentRect.y; trackRect.width = contentRect.width - 2 * trackBuffer; trackRect.height = thumbRect.height; } else { trackRect.x = contentRect.x; tra... |
return getPreferredHorizontalSize(); | { int height = getThumbSize().height; if (slider.getPaintTicks() && slider.getMajorTickSpacing() > 0 || slider.getMinorTickSpacing() > 0) height += getTickLength(); if (slider.getPaintLabels()) height += getHeightOfTallestLabel(); height += insets.top + insets.bottom + focusInsets.top + focusInsets.bottom; return ... | public Dimension getMaximumSize(JComponent c) { if (slider.getOrientation() == JSlider.HORIZONTAL) return getPreferredHorizontalSize(); else return getPreferredVerticalSize(); } |
return getPreferredVerticalSize(); | { int width = getThumbSize().width; if (slider.getPaintTicks() && slider.getMajorTickSpacing() > 0 || slider.getMinorTickSpacing() > 0) width += getTickLength(); if (slider.getPaintLabels()) width += getWidthOfWidestLabel(); width += insets.left + insets.right + focusInsets.left + focusInsets.right; return new Dime... | public Dimension getMaximumSize(JComponent c) { if (slider.getOrientation() == JSlider.HORIZONTAL) return getPreferredHorizontalSize(); else return getPreferredVerticalSize(); } |
return getPreferredHorizontalSize(); | Insets insets = slider.getInsets(); int height = getThumbSize().height; if (slider.getPaintTicks() && slider.getMajorTickSpacing() > 0 || slider.getMinorTickSpacing() > 0) height += getTickLength(); if (slider.getPaintLabels()) height += getHeightOfTallestLabel(); height += insets.top + insets.bottom + focusInsets.... | public Dimension getMinimumHorizontalSize() { return getPreferredHorizontalSize(); } |
return getPreferredHorizontalSize(); | return getMinimumHorizontalSize(); | public Dimension getMinimumSize(JComponent c) { if (slider.getOrientation() == JSlider.HORIZONTAL) return getPreferredHorizontalSize(); else return getPreferredVerticalSize(); } |
return getPreferredVerticalSize(); | return getMinimumVerticalSize(); | public Dimension getMinimumSize(JComponent c) { if (slider.getOrientation() == JSlider.HORIZONTAL) return getPreferredHorizontalSize(); else return getPreferredVerticalSize(); } |
return getPreferredVerticalSize(); | Insets insets = slider.getInsets(); int width = getThumbSize().width; if (slider.getPaintTicks() && slider.getMajorTickSpacing() > 0 || slider.getMinorTickSpacing() > 0) width += getTickLength(); if (slider.getPaintLabels()) width += getWidthOfWidestLabel(); width += insets.left + insets.right + focusInsets.left + f... | public Dimension getMinimumVerticalSize() { return getPreferredVerticalSize(); } |
int height = thumbHeight; | int height = getThumbSize().height; | public Dimension getPreferredHorizontalSize() { Insets insets = slider.getInsets(); // The width should cover all the labels (which are usually the // deciding factor of the width) int width = getWidthOfWidestLabel() * (slider.getLabelTable() == null ? 0 ... |
height += tickHeight; | height += getTickLength(); | public Dimension getPreferredHorizontalSize() { Insets insets = slider.getInsets(); // The width should cover all the labels (which are usually the // deciding factor of the width) int width = getWidthOfWidestLabel() * (slider.getLabelTable() == null ? 0 ... |
int width = thumbHeight; | int width = getThumbSize().width; | public Dimension getPreferredVerticalSize() { Insets insets = slider.getInsets(); int height = getHeightOfTallestLabel() * (slider.getLabelTable() == null ? 0 : slider.getLabelTable() .size()); if (... |
width += tickHeight; | width += getTickLength(); | public Dimension getPreferredVerticalSize() { Insets insets = slider.getInsets(); int height = getHeightOfTallestLabel() * (slider.getLabelTable() == null ? 0 : slider.getLabelTable() .size()); if (... |
return thumbRect.getSize(); | if (slider.getOrientation() == JSlider.HORIZONTAL) return new Dimension(11, 20); else return new Dimension(20, 11); | protected Dimension getThumbSize() { // This is really just the bounds box for the thumb. // The thumb will actually be pointed (like a rectangle + triangle at bottom) return thumbRect.getSize(); } |
return tickHeight; | return 8; | protected int getTickLength() { return tickHeight; } |
thumbHeight = defaults.getInt("Slider.thumbHeight"); thumbWidth = defaults.getInt("Slider.thumbWidth"); tickHeight = defaults.getInt("Slider.tickHeight"); | protected void installDefaults(JSlider slider) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); slider.setForeground(defaults.getColor("Slider.foreground")); slider.setBackground(defaults.getColor("Slider.background")); shadowColor = defaults.getColor("Slider.shadow"); highlightColor = defa... | |
int y = tickRect.y + tickRect.height / 4; | int y = tickRect.height / 4; | protected void paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x) { int y = tickRect.y + tickRect.height / 4; Color saved = g.getColor(); g.setColor(Color.BLACK); g.drawLine(x, y, x, y + tickRect.height / 2); g.setColor(saved); } |
int x = tickRect.x + tickRect.width / 4; | int x = tickRect.width / 4; | protected void paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y) { int x = tickRect.x + tickRect.width / 4; Color saved = g.getColor(); g.setColor(Color.BLACK); g.drawLine(x, y, x + tickRect.width / 2, y); g.setColor(saved); } |
int y = tickRect.y + tickRect.height / 4; | int y = tickRect.height / 4; | protected void paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x) { int y = tickRect.y + tickRect.height / 4; Color saved = g.getColor(); g.setColor(Color.BLACK); g.drawLine(x, y, x, y + tickRect.height / 4); g.setColor(saved); } |
int x = tickRect.x + tickRect.width / 4; | int x = tickRect.width / 4; | protected void paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y) { int x = tickRect.x + tickRect.width / 4; Color saved = g.getColor(); g.setColor(Color.BLACK); g.drawLine(x, y, x + tickRect.width / 4, y); g.setColor(saved); } |
Polygon thumb = new Polygon(); | public void paintThumb(Graphics g) { Color saved_color = g.getColor(); Polygon thumb = new Polygon(); Point a = new Point(thumbRect.x, thumbRect.y); Point b = new Point(a); Point c = new Point(a); Point d = new Point(a); Point e = new Point(a); Polygon bright; Polygon dark; Polygon all;... | |
Polygon dark; | Polygon light; Polygon dark; | public void paintThumb(Graphics g) { Color saved_color = g.getColor(); Polygon thumb = new Polygon(); Point a = new Point(thumbRect.x, thumbRect.y); Point b = new Point(a); Point c = new Point(a); Point d = new Point(a); Point e = new Point(a); Polygon bright; Polygon dark; Polygon all;... |
b.translate(thumbRect.width, 0); c.translate(thumbRect.width, turnPoint); d.translate(thumbRect.width / 2, thumbRect.height); | b.translate(thumbRect.width - 1, 0); c.translate(thumbRect.width - 1, turnPoint); d.translate(thumbRect.width / 2 - 1, thumbRect.height - 1); | public void paintThumb(Graphics g) { Color saved_color = g.getColor(); Polygon thumb = new Polygon(); Point a = new Point(thumbRect.x, thumbRect.y); Point b = new Point(a); Point c = new Point(a); Point d = new Point(a); Point e = new Point(a); Polygon bright; Polygon dark; Polygon all;... |
bright = new Polygon(new int[] { b.x, a.x, e.x, d.x }, | bright = new Polygon(new int[] { b.x - 1, a.x, e.x, d.x }, | public void paintThumb(Graphics g) { Color saved_color = g.getColor(); Polygon thumb = new Polygon(); Point a = new Point(thumbRect.x, thumbRect.y); Point b = new Point(a); Point c = new Point(a); Point d = new Point(a); Point e = new Point(a); Polygon bright; Polygon dark; Polygon all;... |
dark = new Polygon(new int[] { b.x, c.x, d.x }, new int[] { b.y, c.y, d.y }, 3); all = new Polygon(new int[] { a.x + 1, b.x, c.x, d.x, e.x + 1 }, new int[] { a.y + 1, b.y + 1, c.y, d.y + 1, e.y }, 5); | dark = new Polygon(new int[] { b.x, c.x, d.x + 1 }, new int[] { b.y, c.y - 1, d.y }, 3); light = new Polygon(new int[] { b.x - 1, c.x - 1, d.x + 1 }, new int[] { b.y + 1, c.y - 1, d.y - 1 }, 3); all = new Polygon(new int[] { a.x + 1, b.x - 2, c.x - 2, d.x, e.x + 1 }, new int[] { a.y + 1, b.y + 1, c.y - 1, d.y - 1, e.... | public void paintThumb(Graphics g) { Color saved_color = g.getColor(); Polygon thumb = new Polygon(); Point a = new Point(thumbRect.x, thumbRect.y); Point b = new Point(a); Point c = new Point(a); Point d = new Point(a); Point e = new Point(a); Polygon bright; Polygon dark; Polygon all;... |
turnPoint = thumbRect.width * 3 / 4; | turnPoint = thumbRect.width * 3 / 4 - 1; | public void paintThumb(Graphics g) { Color saved_color = g.getColor(); Polygon thumb = new Polygon(); Point a = new Point(thumbRect.x, thumbRect.y); Point b = new Point(a); Point c = new Point(a); Point d = new Point(a); Point e = new Point(a); Polygon bright; Polygon dark; Polygon all;... |
c.translate(thumbRect.width, thumbRect.height / 2); d.translate(turnPoint, thumbRect.height); e.translate(0, thumbRect.height); | c.translate(thumbRect.width - 1, thumbRect.height / 2); d.translate(turnPoint, thumbRect.height - 1); e.translate(0, thumbRect.height - 1); | public void paintThumb(Graphics g) { Color saved_color = g.getColor(); Polygon thumb = new Polygon(); Point a = new Point(thumbRect.x, thumbRect.y); Point b = new Point(a); Point c = new Point(a); Point d = new Point(a); Point e = new Point(a); Polygon bright; Polygon dark; Polygon all;... |
bright = new Polygon(new int[] { c.x, b.x, a.x, e.x }, new int[] { c.y, b.y, a.y, e.y }, 4); | bright = new Polygon(new int[] { c.x - 1, b.x, a.x, e.x }, new int[] { c.y - 1, b.y, a.y, e.y - 1 }, 4); | public void paintThumb(Graphics g) { Color saved_color = g.getColor(); Polygon thumb = new Polygon(); Point a = new Point(thumbRect.x, thumbRect.y); Point b = new Point(a); Point c = new Point(a); Point d = new Point(a); Point e = new Point(a); Polygon bright; Polygon dark; Polygon all;... |
dark = new Polygon(new int[] { c.x, d.x, e.x + 1 }, | dark = new Polygon(new int[] { c.x, d.x, e.x }, | public void paintThumb(Graphics g) { Color saved_color = g.getColor(); Polygon thumb = new Polygon(); Point a = new Point(thumbRect.x, thumbRect.y); Point b = new Point(a); Point c = new Point(a); Point d = new Point(a); Point e = new Point(a); Polygon bright; Polygon dark; Polygon all;... |
all = new Polygon(new int[] { a.x + 1, b.x, c.x - 1, d.x, e.x + 1 }, new int[] { a.y + 1, b.y + 1, c.y, d.y, e.y }, 5); | light = new Polygon(new int[] { c.x - 1, d.x, e.x + 1}, new int[] { c.y, d.y - 1, e.y - 1}, 3); all = new Polygon(new int[] { a.x + 1, b.x, c.x - 2, c.x - 2, d.x, e.x + 1 }, new int[] { a.y + 1, b.y + 1, c.y - 1, c.y, d.y - 2, e.y - 2 }, 6); | public void paintThumb(Graphics g) { Color saved_color = g.getColor(); Polygon thumb = new Polygon(); Point a = new Point(thumbRect.x, thumbRect.y); Point b = new Point(a); Point c = new Point(a); Point d = new Point(a); Point e = new Point(a); Polygon bright; Polygon dark; Polygon all;... |
g.drawPolyline(light.xpoints, light.ypoints, light.npoints); g.setColor(Color.LIGHT_GRAY); g.drawPolyline(all.xpoints, all.ypoints, all.npoints); | public void paintThumb(Graphics g) { Color saved_color = g.getColor(); Polygon thumb = new Polygon(); Point a = new Point(thumbRect.x, thumbRect.y); Point b = new Point(a); Point c = new Point(a); Point d = new Point(a); Point e = new Point(a); Polygon bright; Polygon dark; Polygon all;... | |
double loc = tickRect.x; | double loc = tickRect.x + 0.5; | public void paintTicks(Graphics g) { int max = slider.getMaximum(); int min = slider.getMinimum(); int majorSpace = slider.getMajorTickSpacing(); int minorSpace = slider.getMinorTickSpacing(); if (majorSpace > 0) { if (slider.getOrientation() == JSlider.HORIZONTAL) { double loc = tickRect.x... |
: majorSpace * (double) tickRect.width / (max - min); | : majorSpace * (double) (tickRect.width - 1) / (max - min); | public void paintTicks(Graphics g) { int max = slider.getMaximum(); int min = slider.getMinimum(); int majorSpace = slider.getMajorTickSpacing(); int minorSpace = slider.getMinorTickSpacing(); if (majorSpace > 0) { if (slider.getOrientation() == JSlider.HORIZONTAL) { double loc = tickRect.x... |
double loc = tickRect.height + tickRect.y; | double loc = tickRect.height + tickRect.y + 0.5; | public void paintTicks(Graphics g) { int max = slider.getMaximum(); int min = slider.getMinimum(); int majorSpace = slider.getMajorTickSpacing(); int minorSpace = slider.getMinorTickSpacing(); if (majorSpace > 0) { if (slider.getOrientation() == JSlider.HORIZONTAL) { double loc = tickRect.x... |
: -majorSpace * (double) tickRect.height / (max - min); | : -majorSpace * (double) (tickRect.height - 1) / (max - min); | public void paintTicks(Graphics g) { int max = slider.getMaximum(); int min = slider.getMinimum(); int majorSpace = slider.getMajorTickSpacing(); int minorSpace = slider.getMinorTickSpacing(); if (majorSpace > 0) { if (slider.getOrientation() == JSlider.HORIZONTAL) { double loc = tickRect.x... |
loc = tickRect.y; | loc = tickRect.y + 0.5; | public void paintTicks(Graphics g) { int max = slider.getMaximum(); int min = slider.getMinimum(); int majorSpace = slider.getMajorTickSpacing(); int minorSpace = slider.getMinorTickSpacing(); if (majorSpace > 0) { if (slider.getOrientation() == JSlider.HORIZONTAL) { double loc = tickRect.x... |
: minorSpace * (double) tickRect.width / (max - min); | : minorSpace * (double) (tickRect.width - 1) / (max - min); | public void paintTicks(Graphics g) { int max = slider.getMaximum(); int min = slider.getMinimum(); int majorSpace = slider.getMajorTickSpacing(); int minorSpace = slider.getMinorTickSpacing(); if (majorSpace > 0) { if (slider.getOrientation() == JSlider.HORIZONTAL) { double loc = tickRect.x... |
: -minorSpace * (double) tickRect.height / (max - min); | : -minorSpace * (double) (tickRect.height - 1) / (max - min); | public void paintTicks(Graphics g) { int max = slider.getMaximum(); int min = slider.getMinimum(); int majorSpace = slider.getMajorTickSpacing(); int minorSpace = slider.getMinorTickSpacing(); if (majorSpace > 0) { if (slider.getOrientation() == JSlider.HORIZONTAL) { double loc = tickRect.x... |
g.translate(-tickRect.x, 0); | public void paintTicks(Graphics g) { int max = slider.getMaximum(); int min = slider.getMinimum(); int majorSpace = slider.getMajorTickSpacing(); int minorSpace = slider.getMinorTickSpacing(); if (majorSpace > 0) { if (slider.getOrientation() == JSlider.HORIZONTAL) { double loc = tickRect.x... | |
Polygon high; Polygon shadow; | public void paintTrack(Graphics g) { Color saved_color = g.getColor(); int width; int height; Point a = new Point(trackRect.x, trackRect.y); Point b = new Point(a); Point c = new Point(a); Point d = new Point(a); Polygon high; Polygon shadow; if (slider.getOrientation() == JSlider.HORIZ... | |
int extent = slider.getExtent(); int len = trackRect.width; | int len = trackRect.width - 1; | protected int xPositionForValue(int value) { int min = slider.getMinimum(); int max = slider.getMaximum(); int extent = slider.getExtent(); int len = trackRect.width; int xPos = (max == min) ? 0 : (value - min) * len / (max - min); if (! drawInverted()) xPos += trackRect.x; else { xPos... |
xPos = trackRect.width - xPos; | xPos = len - xPos; | protected int xPositionForValue(int value) { int min = slider.getMinimum(); int max = slider.getMaximum(); int extent = slider.getExtent(); int len = trackRect.width; int xPos = (max == min) ? 0 : (value - min) * len / (max - min); if (! drawInverted()) xPos += trackRect.x; else { xPos... |
int extent = slider.getExtent(); int len = trackRect.height; | int len = trackRect.height - 1; | protected int yPositionForValue(int value) { int min = slider.getMinimum(); int max = slider.getMaximum(); int extent = slider.getExtent(); int len = trackRect.height; int yPos = (max == min) ? 0 : (value - min) * len / (max - min); if (! drawInverted()) { yPos = trackRect.height - yPos; yPos ... |
yPos = trackRect.height - yPos; | yPos = len - yPos; | protected int yPositionForValue(int value) { int min = slider.getMinimum(); int max = slider.getMaximum(); int extent = slider.getExtent(); int len = trackRect.height; int yPos = (max == min) ? 0 : (value - min) * len / (max - min); if (! drawInverted()) { yPos = trackRect.height - yPos; yPos ... |
groupObject.removeMemberObj(this); | groupObject.removeMemberObject((Object) this); | public Group removeFromGroup (Group groupObject) { if (groupObject != null) { if (groupMemberHash.contains(groupObject)) { //this object does belong to the indicated Group object groupObject.removeMemberObj(this); groupMemberHash.remove(groupObject); return groupObject; } ... |
Log.error("Weird error: unknown XML attribute type for item:"+item); | Log.errorln("Weird error: unknown XML attribute type for item:"+item); | public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,... |
if (!extendedMode) vk = keys.getKey(scancode).getLowerVirtuelKey(); | if (!extendedMode){ if((flags & InputEvent.ALT_GRAPH_DOWN_MASK) != 0){ vk = keys.getKey(scancode).getAltGrVirtuelKey(); }else if((flags & InputEvent.SHIFT_DOWN_MASK) != 0){ vk = keys.getKey(scancode).getUpperVirtuelKey(); }else{ vk = keys.getKey(scancode).getLowerVirtuelKey(); } } | public final KeyboardEvent interpretScancode(int scancode) { final boolean extendedMode = this.extendedMode; if (scancode == XT_EXTENDED) { this.extendedMode = true; return null; } else { this.extendedMode = false; } final boolean released = ((scancode & XT_RELEASE) != 0); f... |
tabs = t; | if (t != null) tabs = (TabStop[]) t.clone(); else tabs = new TabStop[0]; | public TabSet(TabStop[] t) { tabs = t; } |
if (i < 0 || i >= tabs.length) throw new IllegalArgumentException("Index out of bounds."); | public TabStop getTab(int i) { return tabs[i]; } | |
int idx = -1; for (int i = 0; i < tabs.length; ++i) | for (int i = 0; i < tabs.length; i++) | public int getTabIndexAfter(float location) { int idx = -1; for (int i = 0; i < tabs.length; ++i) { if (location < tabs[i].getPosition()) idx = i; } return idx; } |
if (location < tabs[i].getPosition()) idx = i; | if (location <= tabs[i].getPosition()) return i; | public int getTabIndexAfter(float location) { int idx = -1; for (int i = 0; i < tabs.length; ++i) { if (location < tabs[i].getPosition()) idx = i; } return idx; } |
return idx; | return -1; | public int getTabIndexAfter(float location) { int idx = -1; for (int i = 0; i < tabs.length; ++i) { if (location < tabs[i].getPosition()) idx = i; } return idx; } |
return result; | protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException { if (keySpec instanceof DHPrivateKeySpec) { DHPrivateKeySpec spec = (DHPrivateKeySpec) keySpec; BigInteger p = spec.getP(); BigInteger g = spec.getG(); BigInteger x = spec.getX(); ... | |
return result; | protected PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException { if (keySpec instanceof DHPublicKeySpec) { DHPublicKeySpec spec = (DHPublicKeySpec) keySpec; BigInteger p = spec.getP(); BigInteger g = spec.getG(); BigInteger y = spec.getY(); re... | |
checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); | DerUtil.checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); | public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong Pr... |
checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); | DerUtil.checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); | public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong Pr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.