rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
if (!isInitialized()) { | if (!isInitialized() && !isInitializing()) { | public final void initialize() { if (!isInitialized()) { linkAndInitialize(); } } |
Unsafe.debug("loadFromBootClassArray"); | Unsafe.debug("[loadFromBootClassArray:"); | protected static void loadFromBootClassArray(VmType[] bootClasses) { Unsafe.debug("loadFromBootClassArray"); final int count = bootClasses.length; for (int i = 0; i < count; i++) { final VmType<?> vmClass = bootClasses[i]; final String name = vmClass.name; if (vmClass.isPrimitive()) { if (name.equals("bool... |
Unsafe.debug('\n'); | Unsafe.debug("]\n"); | protected static void loadFromBootClassArray(VmType[] bootClasses) { Unsafe.debug("loadFromBootClassArray"); final int count = bootClasses.length; for (int i = 0; i < count; i++) { final VmType<?> vmClass = bootClasses[i]; final String name = vmClass.name; if (vmClass.isPrimitive()) { if (name.equals("bool... |
public LinkageError(String s) { super(s); | public LinkageError() { | public LinkageError(String s) { super(s); } |
public ExceptionInInitializerError(String s) { super(s); exception = null; | public ExceptionInInitializerError() { this((String) null); | public ExceptionInInitializerError(String s) { super(s); exception = null; } |
public Object getAny(int index) { | public final Object getAny(int index) { | public Object getAny(int index) { return get(index); } |
return(parent.getAlignmentX()); | return 0.5F; | public float getLayoutAlignmentX(Container parent) { return(parent.getAlignmentX()); } |
return(parent.getAlignmentY()); | return 0.5F; | public float getLayoutAlignmentY(Container parent) { return(parent.getAlignmentY()); } |
if (treeModelListener == null) treeModelListener = createTreeModelListener(); model.addTreeModelListener(treeModelListener); | public void setModel(TreeModel model) { if (treeModel == model) return; TreeModel oldValue = treeModel; treeModel = model; firePropertyChange(TREE_MODEL_PROPERTY, oldValue, model); } | |
if (name.getTagClass() != DER.APPLICATION) throw new IOException("malformed GeneralName"); | int tagClass = name.getTagClass(); if (tagClass != DER.CONTEXT) throw new IOException("malformed GeneralName: Tag class is " + tagClass); | public GeneralNames(final byte[] encoded) throws IOException { names = new LinkedList(); DERReader der = new DERReader(encoded); DERValue nameList = der.read(); if (!nameList.isConstructed()) throw new IOException("malformed GeneralNames"); int len = 0; while (len < nameList.getLength()) ... |
namePair.add(new X500DistinguishedName(b).toString()); | DERReader r = new DERReader (b); r.read (); namePair.add(new X500Principal(r.read ().getEncoded ()).toString()); | public GeneralNames(final byte[] encoded) throws IOException { names = new LinkedList(); DERReader der = new DERReader(encoded); DERValue nameList = der.read(); if (!nameList.isConstructed()) throw new IOException("malformed GeneralNames"); int len = 0; while (len < nameList.getLength()) ... |
public X500DistinguishedName(byte[] encoded) throws IOException | public X500DistinguishedName(String name) | public X500DistinguishedName(byte[] encoded) throws IOException { this(new ByteArrayInputStream(encoded)); } |
this(new ByteArrayInputStream(encoded)); | if (name == null) throw new NullPointerException(); try { parseDN(name, true); } catch (Exception e) { parseDN(name, false); } | public X500DistinguishedName(byte[] encoded) throws IOException { this(new ByteArrayInputStream(encoded)); } |
else { System.err.println("WARNING: Tried to replace elements "); System.err.print("beyond boundaries: elementCount: "); System.err.println(e.getElementCount()); System.err.print("index: " + curr.index); System.err.println(", removed.length: " + removed.length); } } | public void insert(int offset, int length, ElementSpec[] data, DefaultDocumentEvent ev) { if (length == 0) return; this.offset = offset; this.pos = offset; this.endOffset = offset + length; this.length = length; documentEvent = ev; edits... | |
rb.append ('\n'); | public void parseFields(byte[] cByte, ArrayList ffd, StringBuffer rb) { FileFieldDef f; // write out the html record information for each field that is selected for (int x = 0; x < ffd.size(); x++) { f = (FileFieldDef)ffd.get(x); if (f.isWriteField()) { switch (f.getFieldTyp... | |
try { FileFieldDef f; StringBuffer sb = new StringBuffer(); for (int x = 0; x < ffd.size(); x++) { f = (FileFieldDef)ffd.get(x); if (f.isWriteField()) { sb.append(f.getFieldName()); } } fout.write (sb.toString().getBytes()); fout.write ('\n'); } catch (IOException ioe) { } | public void writeHeader(String fileName, String host, ArrayList ffd, char decChar) { try { FileFieldDef f; StringBuffer sb = new StringBuffer(); // loop through each of the fields and write out the field name for // each selected field ... | |
synchronized (f) | JPanel modalInterceptor = new JPanel(); modalInterceptor.setOpaque(false); JLayeredPane lp = JLayeredPane.getLayeredPaneAbove(f); lp.setLayer(modalInterceptor, JLayeredPane.MODAL_LAYER.intValue()); modalInterceptor.setBounds(0, 0, lp.getWidth(), lp.getHeight()); modalInterceptor.addMouseListener(new MouseAdapter(){}); ... | private static void startModal(JInternalFrame f) { synchronized (f) { final JInternalFrame tmp = f; tmp.toFront(); f.addInternalFrameListener(new InternalFrameAdapter() { public void internalFrameClosed(InternalFrameEvent e) { synchronized (tmp) { tmp.removeInternalFrameListener(this... |
final JInternalFrame tmp = f; tmp.toFront(); f.addInternalFrameListener(new InternalFrameAdapter() | while (! f.isClosed()) | private static void startModal(JInternalFrame f) { synchronized (f) { final JInternalFrame tmp = f; tmp.toFront(); f.addInternalFrameListener(new InternalFrameAdapter() { public void internalFrameClosed(InternalFrameEvent e) { synchronized (tmp) { tmp.removeInternalFrameListener(this... |
public void internalFrameClosed(InternalFrameEvent e) | if (EventQueue.isDispatchThread()) | private static void startModal(JInternalFrame f) { synchronized (f) { final JInternalFrame tmp = f; tmp.toFront(); f.addInternalFrameListener(new InternalFrameAdapter() { public void internalFrameClosed(InternalFrameEvent e) { synchronized (tmp) { tmp.removeInternalFrameListener(this... |
synchronized (tmp) | AWTEvent ev = queue.getNextEvent(); if (ev instanceof ActiveEvent) ((ActiveEvent) ev).dispatch(); else if (ev.getSource() instanceof Component) ((Component) ev.getSource()).dispatchEvent(ev); else if (ev.getSource() instanceof MenuComponent) ((MenuComponent) ev.getSource()).dispatchEvent(ev); } else | private static void startModal(JInternalFrame f) { synchronized (f) { final JInternalFrame tmp = f; tmp.toFront(); f.addInternalFrameListener(new InternalFrameAdapter() { public void internalFrameClosed(InternalFrameEvent e) { synchronized (tmp) { tmp.removeInternalFrameListener(this... |
tmp.removeInternalFrameListener(this); tmp.notifyAll(); | Thread.yield(); | private static void startModal(JInternalFrame f) { synchronized (f) { final JInternalFrame tmp = f; tmp.toFront(); f.addInternalFrameListener(new InternalFrameAdapter() { public void internalFrameClosed(InternalFrameEvent e) { synchronized (tmp) { tmp.removeInternalFrameListener(this... |
}); try | } catch (InterruptedException ex) | private static void startModal(JInternalFrame f) { synchronized (f) { final JInternalFrame tmp = f; tmp.toFront(); f.addInternalFrameListener(new InternalFrameAdapter() { public void internalFrameClosed(InternalFrameEvent e) { synchronized (tmp) { tmp.removeInternalFrameListener(this... |
while (! f.isClosed()) f.wait(); | private static void startModal(JInternalFrame f) { synchronized (f) { final JInternalFrame tmp = f; tmp.toFront(); f.addInternalFrameListener(new InternalFrameAdapter() { public void internalFrameClosed(InternalFrameEvent e) { synchronized (tmp) { tmp.removeInternalFrameListener(this... | |
catch (InterruptedException ignored) { } | finally { lp.remove(modalInterceptor); Container parent = f.getParent(); if (parent != null) parent.remove(f); | private static void startModal(JInternalFrame f) { synchronized (f) { final JInternalFrame tmp = f; tmp.toFront(); f.addInternalFrameListener(new InternalFrameAdapter() { public void internalFrameClosed(InternalFrameEvent e) { synchronized (tmp) { tmp.removeInternalFrameListener(this... |
while (next_in == next_out) wait(); | ClasspathToolkit tk = ((ClasspathToolkit) Toolkit.getDefaultToolkit()); long curr = System.currentTimeMillis(); | public synchronized AWTEvent getNextEvent() throws InterruptedException { if (next != null) return next.getNextEvent(); while (next_in == next_out) wait(); AWTEvent res = queue[next_out]; if (++next_out == queue.length) next_out = 0; return res; } |
AWTEvent res = queue[next_out]; | if (!tk.nativeQueueEmpty() && (curr - lastNativeQueueAccess > humanLatencyThreshold)) { tk.iterateNativeQueue(this, false); lastNativeQueueAccess = curr; } | public synchronized AWTEvent getNextEvent() throws InterruptedException { if (next != null) return next.getNextEvent(); while (next_in == next_out) wait(); AWTEvent res = queue[next_out]; if (++next_out == queue.length) next_out = 0; return res; } |
if (++next_out == queue.length) next_out = 0; return res; } | while (next_in == next_out) { if (isDispatchThread()) { if (isShutdown()) throw new InterruptedException(); tk.iterateNativeQueue(this, true); lastNativeQueueAccess = System.currentTimeMillis(); } else { try { wait(); } catch (InterruptedException ie) { } } } AWTEvent res = queue[next_out]; if (++next_... | public synchronized AWTEvent getNextEvent() throws InterruptedException { if (next != null) return next.getNextEvent(); while (next_in == next_out) wait(); AWTEvent res = queue[next_out]; if (++next_out == queue.length) next_out = 0; return res; } |
public void dispatch(); | void dispatch(); | public void dispatch(); |
{ | { Event oldStyleEvent = Component.translateEvent(event); if (oldStyleEvent != null) { postEvent(oldStyleEvent); } | public final void dispatchEvent(AWTEvent event){ // See comment in Component.dispatchEvent(). dispatchEventImpl(event);} |
textComponent.setCaretPosition(caretPos - ev.getLength()); | textComponent.setCaretPosition(ev.getOffset()); | public void removeUpdate(DocumentEvent ev) { Dimension size = textComponent.getSize(); rootView.removeUpdate(ev, new Rectangle(0, 0, size.width, size.height), BasicTextUI.this); int caretPos = textComponent.getCaretPosition(); if (caretPos >= ev.getOffset()) ... |
bad.minor = Minor.Any; | public static NameDynAnyPair[] extract(Any any) { try { return ((NameDynAnyPairSeqHolder) any.extract_Streamable()).value; } catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("NameDynAnyPairSeq expected"); bad.initCause(cex); throw bad; } } | |
try { throw new MARSHAL("The read/write are not applicable for " + Id); } catch (Exception e) { throw new MARSHAL(); } | MARSHAL m = new MARSHAL("The read/write are not applicable for " + Id); m.minor = Minor.Inappropriate; throw m; | static String not_applicable(String Id) { try { throw new MARSHAL("The read/write are not applicable for " + Id); } catch (Exception e) { throw new MARSHAL(); } } |
for (int i = 0; i < syntaxes.length; i++) { try { return syntaxes[i].complete(partial.getRemainder()); } catch (CompletionException ex) { } } System.out.println(); usage(); throw new CompletionException("Invalid command syntax"); } | String max = ""; for (int i = 0; i < syntaxes.length; i++) { try { final String s = syntaxes[ i].complete(partial .getRemainder()); if (s.length() > max.length()) { max = s; } } catch (CompletionException ex) { } } if (max.length() > 0) { return max; } else { System.out.println(); usage(); throw new CompletionExc... | public String complete(CommandLine partial) throws CompletionException { //System.out.println("completing \"" + partial + "\""); for (int i = 0; i < syntaxes.length; i++) { try { return syntaxes[i].complete(partial.getRemainder()); } catch (CompletionException ex) { // this syntax is not fitting ... |
public void help() { Help.getHelp().help(this); } | public void help() throws HelpException { Help.getHelp().help(this); } | public void help() { Help.getHelp().help(this); } |
public ParsedArguments parse(String[] args) throws SyntaxError { for (int i = 0; i < syntaxes.length; i++) { try { return syntaxes[i].parse(args); } catch (SyntaxError ex) { } } | public ParsedArguments parse(String[] args) throws SyntaxErrorException { for (int i = 0; i < syntaxes.length; i++) { final Syntax s = syntaxes[ i]; try { return s.parse(args); } catch (SyntaxErrorException ex) { s.clearArguments(); } } | public ParsedArguments parse(String[] args) throws SyntaxError { for (int i = 0; i < syntaxes.length; i++) { try { return syntaxes[i].parse(args); } catch (SyntaxError ex) { // debug output to debug syntax finding mechanism //System.err.println(ex.toString()); //ex.printStackTrace(System.out);... |
throw new SyntaxError("No matching syntax found"); } | throw new SyntaxErrorException("No matching syntax found"); } | public ParsedArguments parse(String[] args) throws SyntaxError { for (int i = 0; i < syntaxes.length; i++) { try { return syntaxes[i].parse(args); } catch (SyntaxError ex) { // debug output to debug syntax finding mechanism //System.err.println(ex.toString()); //ex.printStackTrace(System.out);... |
Help.getHelp().usage(this); } | try { Help.getHelp().usage(this); } catch (HelpException ex) { ex.printStackTrace(); } } | public void usage() { Help.getHelp().usage(this); } |
if (!up || pause) | if (!isUp() || pause) | public void keyPressed(KeyEvent e) { int kc = e.getKeyCode(); if (kc == KeyEvent.VK_N) { newGame(); return; } if (kc == KeyEvent.VK_P) { flipPause(); return; } if (!up || pause) return; switch (e.getKeyCode()) { case KeyEvent.VK_UP: rot(1); break; case KeyEvent.VK_LEFT: trans(-1); break; ca... |
if (thread != null) { up = false; | setUp(false); if (thread != null) { | public void newGame() { if (thread != null) { up = false; if (pause) { flipPause(); } try { thread.join(); } catch (InterruptedException ignore) { } } for (int i = 0; i < WIDTH_C + 2; i++) { for (int j = 0; j < HEIGHT_C + 2; j++) { if (i == 0 || j == 0 || i == WIDTH_C + 1 || j == HEIGHT_C + 1... |
up = true; | public void newGame() { if (thread != null) { up = false; if (pause) { flipPause(); } try { thread.join(); } catch (InterruptedException ignore) { } } for (int i = 0; i < WIDTH_C + 2; i++) { for (int j = 0; j < HEIGHT_C + 2; j++) { if (i == 0 || j == 0 || i == WIDTH_C + 1 || j == HEIGHT_C + 1... | |
stop: while (up) { | stop: while (isUp()) { | public void newGame() { if (thread != null) { up = false; if (pause) { flipPause(); } try { thread.join(); } catch (InterruptedException ignore) { } } for (int i = 0; i < WIDTH_C + 2; i++) { for (int j = 0; j < HEIGHT_C + 2; j++) { if (i == 0 || j == 0 || i == WIDTH_C + 1 || j == HEIGHT_C + 1... |
if (!up) | if (!isUp()) | public void newGame() { if (thread != null) { up = false; if (pause) { flipPause(); } try { thread.join(); } catch (InterruptedException ignore) { } } for (int i = 0; i < WIDTH_C + 2; i++) { for (int j = 0; j < HEIGHT_C + 2; j++) { if (i == 0 || j == 0 || i == WIDTH_C + 1 || j == HEIGHT_C + 1... |
up = false; | setUp(false); | public void newGame() { if (thread != null) { up = false; if (pause) { flipPause(); } try { thread.join(); } catch (InterruptedException ignore) { } } for (int i = 0; i < WIDTH_C + 2; i++) { for (int j = 0; j < HEIGHT_C + 2; j++) { if (i == 0 || j == 0 || i == WIDTH_C + 1 || j == HEIGHT_C + 1... |
thread.start(); | setUp(true); thread.start(); | public void newGame() { if (thread != null) { up = false; if (pause) { flipPause(); } try { thread.join(); } catch (InterruptedException ignore) { } } for (int i = 0; i < WIDTH_C + 2; i++) { for (int j = 0; j < HEIGHT_C + 2; j++) { if (i == 0 || j == 0 || i == WIDTH_C + 1 || j == HEIGHT_C + 1... |
up = true; | public void run() { try { up = true; long before, after, sleep; stop: while (up) { before = System.currentTimeMillis(); synchronized (Tetris.class) { while (pause) { try { System.out.println("waiting"); Tetris.class.wait(); System.out.println("back from w... | |
stop: while (up) { | stop: while (isUp()) { | public void run() { try { up = true; long before, after, sleep; stop: while (up) { before = System.currentTimeMillis(); synchronized (Tetris.class) { while (pause) { try { System.out.println("waiting"); Tetris.class.wait(); System.out.println("back from w... |
if (!up) | if (!isUp()) | public void run() { try { up = true; long before, after, sleep; stop: while (up) { before = System.currentTimeMillis(); synchronized (Tetris.class) { while (pause) { try { System.out.println("waiting"); Tetris.class.wait(); System.out.println("back from w... |
up = false; | setUp(false); | public void run() { try { up = true; long before, after, sleep; stop: while (up) { before = System.currentTimeMillis(); synchronized (Tetris.class) { while (pause) { try { System.out.println("waiting"); Tetris.class.wait(); System.out.println("back from w... |
if (up) { | if (isUp()) { | public void paint(Graphics g) { if (img == null) { img = createImage(DIM.width, DIM.height); } Graphics g2 = img.getGraphics(); g2.setColor(COLORS[0]); g2.fillRect(0, 0, DIM.width, DIM.height); for (int i = 0; i < WIDTH_C + 2; i++) { for (int j = 0; j < HEIGHT_C + 2; j++) { int ci = WORLD[i][j]; if (ci... |
super(toolkit, choice, new JComboBox()); this.choice = choice; final JComboBox combo = (JComboBox)jComponent; combo.setModel(new DefaultComboBoxModel()); | super(toolkit, choice, new SwingChoice(choice)); final JComboBox combo = (JComboBox) jComponent; combo.setModel(new DefaultComboBoxModel()); | public SwingChoicePeer(SwingToolkit toolkit, Choice choice) { super(toolkit, choice, new JComboBox()); this.choice = choice; final JComboBox combo = (JComboBox)jComponent; combo.setModel(new DefaultComboBoxModel()); SwingToolkit.add(choice, combo); SwingToolkit.copyAwtProperties(choice, combo);... |
public abstract void addItem(String item, int index); | void addItem (String item, int index); | public abstract void addItem(String item, int index); |
public static final DateFormat getTimeInstance (int style, Locale loc) | public static final DateFormat getTimeInstance () | public static final DateFormat getTimeInstance (int style, Locale loc) { return computeInstance (style, loc, false, true); } |
return computeInstance (style, loc, false, true); | return getTimeInstance (DEFAULT, Locale.getDefault()); | public static final DateFormat getTimeInstance (int style, Locale loc) { return computeInstance (style, loc, false, true); } |
public static Locale[] getAvailableLocales() | public static synchronized Locale[] getAvailableLocales() | public static Locale[] getAvailableLocales() { /* I only return those for which localized language * or country information exists. * XXX - remove hard coded list, and implement more locales (Sun's JDK 1.4 * has 148 installed locales!). */ return new Locale[] { ENGLISH, FRENCH, GERMAN, ... |
return new Locale[] | if (availableLocales == null) | public static Locale[] getAvailableLocales() { /* I only return those for which localized language * or country information exists. * XXX - remove hard coded list, and implement more locales (Sun's JDK 1.4 * has 148 installed locales!). */ return new Locale[] { ENGLISH, FRENCH, GERMAN, ... |
ENGLISH, FRENCH, GERMAN, new Locale("ga", "") }; | String[] localeNames = LocaleData.localeNames; availableLocales = new Locale[localeNames.length]; for (int i = 0; i < localeNames.length; i++) { String language; String region = ""; String variant = ""; String name = localeNames[i]; language = name.substring(0, 2); if (name.length() > 2) region = name.substring(3); ... | public static Locale[] getAvailableLocales() { /* I only return those for which localized language * or country information exists. * XXX - remove hard coded list, and implement more locales (Sun's JDK 1.4 * has 148 installed locales!). */ return new Locale[] { ENGLISH, FRENCH, GERMAN, ... |
empty = false; | void clear(int index) { offset = index; this.index = 0; for (int i = 0; i < start.length; i++) { start[i] = end[i] = -1; } next = null; // cut off alternates empty = false; } | |
} | public void menuDeselected(MenuEvent e) { JMenu menu = (JMenu) menuItem; if (menu.isTopLevelMenu()) ((JMenuBar) menu.getParent()).getSelectionModel().clearSelection(); else ((JPopupMenu) menu.getParent()).getSelectionModel().clearSelection(); } | |
lookup_time = System.currentTimeMillis(); | InetAddress(byte[] ipaddr, String hostname) { addr = (null == ipaddr) ? null : (byte[]) ipaddr.clone(); hostName = hostname; lookup_time = System.currentTimeMillis(); family = 2; /* AF_INET */ } | |
if (hostname == null) | if (hostname == null || hostname.equals("")) | public static InetAddress[] getAllByName(String hostname) throws UnknownHostException { SecurityManager s = System.getSecurityManager(); if (s != null) s.checkConnect(hostname, -1); InetAddress[] addresses; // Default to current host if necessary if (hostname == null) { addresses = new In... |
addresses = checkCacheFor(hostname); if (addresses != null) return addresses; | public static InetAddress[] getAllByName(String hostname) throws UnknownHostException { SecurityManager s = System.getSecurityManager(); if (s != null) s.checkConnect(hostname, -1); InetAddress[] addresses; // Default to current host if necessary if (hostname == null) { addresses = new In... | |
addToCache(hostname, addresses); | public static InetAddress[] getAllByName(String hostname) throws UnknownHostException { SecurityManager s = System.getSecurityManager(); if (s != null) s.checkConnect(hostname, -1); InetAddress[] addresses; // Default to current host if necessary if (hostname == null) { addresses = new In... | |
inaddr_any.hostName = inaddr_any.getHostName(); | static InetAddress getInaddrAny() throws UnknownHostException { if (inaddr_any == null) { byte[] tmp = VMInetAddress.lookupInaddrAny(); inaddr_any = new Inet4Address(tmp, null); } return inaddr_any; } | |
Inet4Address(byte[] addr, String host) | Inet4Address(byte[] addr) | Inet4Address(byte[] addr, String host) { this(addr, host, null); } |
this(addr, host, null); | this(addr, null, null); | Inet4Address(byte[] addr, String host) { this(addr, host, null); } |
optionPane.removeAll(); messageAreaContainer = createMessageArea(); optionPane.add(messageAreaContainer); optionPane.add(buttonContainer); | optionPane.remove(messageAreaContainer); messageAreaContainer = createMessageArea(); optionPane.add(messageAreaContainer); Container newButtons = createButtonArea(); optionPane.remove(buttonContainer); optionPane.add(newButtons); buttonContainer = newButtons; optionPane.add(buttonContainer); | public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JOptionPane.ICON_PROPERTY) || e.getPropertyName().equals(JOptionPane.MESSAGE_TYPE_PROPERTY)) addIcon(messageAreaContainer); else if (e.getPropertyName().equals(JOptionPane.INITIAL_SELECTION_VALUE_PROPERTY)) rese... |
rightSide.setBorder(BorderFactory.createEmptyBorder(0, 11, 17, 0)); | rightSide.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); | protected Container createMessageArea() { JPanel messageArea = new JPanel(); messageArea.setLayout(new BorderLayout()); addIcon(messageArea); JPanel rightSide = new JPanel(); rightSide.setBorder(BorderFactory.createEmptyBorder(0, 11, 17, 0)); rightSide.setLayout(new GridBagLayout()); GridBagCons... |
messageArea.add(rightSide, BorderLayout.EAST); | messageArea.add(rightSide, BorderLayout.CENTER); | protected Container createMessageArea() { JPanel messageArea = new JPanel(); messageArea.setLayout(new BorderLayout()); addIcon(messageArea); JPanel rightSide = new JPanel(); rightSide.setBorder(BorderFactory.createEmptyBorder(0, 11, 17, 0)); rightSide.setLayout(new GridBagLayout()); GridBagCons... |
return new Object[] { OK_STRING, CANCEL_STRING }; | return (optionPane.getWantsInput() ) ? new Object[] { OK_STRING, CANCEL_STRING } : ( optionPane.getMessageType() == JOptionPane.QUESTION_MESSAGE ) ? new Object[] { YES_STRING, NO_STRING, CANCEL_STRING } : new Object[] { OK_STRING }; | protected Object[] getButtons() { if (optionPane.getOptions() != null) return optionPane.getOptions(); switch (optionPane.getOptionType()) { case JOptionPane.YES_NO_OPTION: return new Object[] { YES_STRING, NO_STRING }; case JOptionPane.YES_NO_CANCEL_OPTION: return new Object[] { YES_STRING... |
minimumWidth = minimumSize.width; minimumHeight = minimumSize.height; | protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); optionPane.setFont(defaults.getFont("OptionPane.font")); optionPane.setBackground(defaults.getColor("OptionPane.background")); optionPane.setForeground(defaults.getColor("OptionPane.foreground")); optionPane.s... | |
output.write(Constants.NEW_LINE.getBytes()); | public static void debug(String msg) { if (priority > Priority.DEBUG) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.debug()"); e.printStackTrace(); } } | |
output.write(Constants.NEW_LINE.getBytes()); | public static void error(String msg) { if (priority > Priority.ERROR) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.error()"); e.printStackTrace(); } } | |
output.write(Constants.NEW_LINE.getBytes()); | public static void info(String msg) { if (priority > Priority.INFO) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.info()"); e.printStackTrace(); } } | |
output.write(Constants.NEW_LINE.getBytes()); | public static void warn(String msg) { if (priority > Priority.WARN) return; try { output.write(msg.getBytes()); output.write(Constants.NEW_LINE.getBytes()); } catch (IOException e) { System.err.println("error in Log.warn()"); e.printStackTrace(); } } | |
switch (buffer[offset]) | char c = buffer[offset]; if (len > 0 && (c == '\t' || c == '\n')) { g.drawChars(buffer, pos, len, pixelX, pixelY + ascent); pixelX += pixelWidth; pixelWidth = 0; pos = offset+1; len = 0; } switch (c) | public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x and y pixel coordinates. int pixelX = x; int pixelY = y; // The font... |
g.drawChars(buffer, offset, 1, pixelX, y); | public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x and y pixel coordinates. int pixelX = x; int pixelY = y; // The font... | |
g.drawChars(buffer, offset, 1, pixelX, pixelY + ascent); pixelX += metrics.charWidth(buffer[offset]); | ++len; pixelWidth += metrics.charWidth(buffer[offset]); | public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x and y pixel coordinates. int pixelX = x; int pixelY = y; // The font... |
if (len > 0) g.drawChars(buffer, pos, len, pixelX, pixelY + ascent); | public static final int drawTabbedText(Segment s, int x, int y, Graphics g, TabExpander e, int startOffset) { // This buffers the chars to be drawn. char[] buffer = s.array; // The current x and y pixel coordinates. int pixelX = x; int pixelY = y; // The font... | |
super(toolkit, panel, new JPanel()); final JPanel jPanel = (JPanel)jComponent; this.panel = panel; | super(toolkit, panel, new SwingPanel(panel)); final SwingPanel jPanel = (SwingPanel) jComponent; | public SwingPanelPeer(SwingToolkit toolkit, Panel panel) { super(toolkit, panel, new JPanel()); final JPanel jPanel = (JPanel)jComponent; this.panel = panel; SwingToolkit.add(panel, jPanel); SwingToolkit.copyAwtProperties(panel, jPanel); } |
Throwable throwable = record.getThrown(); if (throwable != null) { StringWriter sink = new StringWriter(); throwable.printStackTrace(new PrintWriter(sink, true)); buf.append(sink.toString()); } | public String format(LogRecord record) { StringBuffer buf = new StringBuffer(180); if (dateFormat == null) dateFormat = DateFormat.getDateTimeInstance(); buf.append(dateFormat.format(new Date(record.getMillis()))); buf.append(' '); buf.append(record.getSourceClassName()); buf.append(' '); b... | |
Dimension e = minSize(editor); Dimension n = minSize(next); Dimension p = minSize(previous); | Dimension e = prefSize(editor); Dimension n = prefSize(next); Dimension p = prefSize(previous); | public void layoutContainer(Container parent) { synchronized (parent.getTreeLock()) { Insets i = parent.getInsets(); boolean l2r = parent.getComponentOrientation().isLeftToRight(); /* -------------- -------------- | | n | | n | | | e | - | or | - | e | ... |
int h = Math.max(p.height, n.height); h = Math.max(h, e.height / 2); int e_width = s.width - w; | int h = e.height / 2; int e_width = s.width - w - i.left - i.right; | public void layoutContainer(Container parent) { synchronized (parent.getTreeLock()) { Insets i = parent.getInsets(); boolean l2r = parent.getComponentOrientation().isLeftToRight(); /* -------------- -------------- | | n | | n | | | e | - | or | - | e | ... |
setBounds(editor, x, y + (s.height - e.height) / 2, e_width, e.height); | setBounds(editor, x, y, e_width, 2 * h); | public void layoutContainer(Container parent) { synchronized (parent.getTreeLock()) { Insets i = parent.getInsets(); boolean l2r = parent.getComponentOrientation().isLeftToRight(); /* -------------- -------------- | | n | | n | | | e | - | or | - | e | ... |
setBounds(previous, x, y, w, h); | setBounds(previous, x, y + (s.height - e.height) / 2, w, h); | public void layoutContainer(Container parent) { synchronized (parent.getTreeLock()) { Insets i = parent.getInsets(); boolean l2r = parent.getComponentOrientation().isLeftToRight(); /* -------------- -------------- | | n | | n | | | e | - | or | - | e | ... |
int otherHeight = 0; | public Dimension minimumLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getMinimumSize(); d.width += tmp.width; d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHeight = 0; if (... | |
otherHeight += tmp.height; | public Dimension minimumLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getMinimumSize(); d.width += tmp.width; d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHeight = 0; if (... | |
d.height = Math.max(d.height, otherHeight); | public Dimension minimumLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getMinimumSize(); d.width += tmp.width; d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHeight = 0; if (... | |
int otherHeight = 0; | public Dimension preferredLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getPreferredSize(); d.width += Math.max(tmp.width, 40); d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHei... | |
otherHeight += tmp.height; | public Dimension preferredLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getPreferredSize(); d.width += Math.max(tmp.width, 40); d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHei... | |
d.height = Math.max(d.height, otherHeight); | public Dimension preferredLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getPreferredSize(); d.width += Math.max(tmp.width, 40); d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHei... | |
Insets insets = parent.getInsets(); d.width = d.width + insets.left + insets.right; d.height = d.height + insets.top + insets.bottom; | public Dimension preferredLayoutSize(Container parent) { Dimension d = new Dimension(); if (editor != null) { Dimension tmp = editor.getPreferredSize(); d.width += Math.max(tmp.width, 40); d.height = tmp.height; } int nextWidth = 0; int previousWidth = 0; int otherHei... | |
public void propertyChange(PropertyChangeEvent evt) | public void propertyChange(PropertyChangeEvent event) | protected PropertyChangeListener createPropertyChangeListener() { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { // FIXME: Add check for enabled property change. Need to // disable the buttons. if ("editor".equals(evt.getPropertyName())) BasicSpinnerUI.t... |
if ("editor".equals(evt.getPropertyName())) BasicSpinnerUI.this.replaceEditor((JComponent) evt.getOldValue(), (JComponent) evt.getNewValue()); | if ("editor".equals(event.getPropertyName())) BasicSpinnerUI.this.replaceEditor((JComponent) event.getOldValue(), (JComponent) event.getNewValue()); | protected PropertyChangeListener createPropertyChangeListener() { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { // FIXME: Add check for enabled property change. Need to // disable the buttons. if ("editor".equals(evt.getPropertyName())) BasicSpinnerUI.t... |
public void propertyChange(PropertyChangeEvent evt) | public void propertyChange(PropertyChangeEvent event) | public void propertyChange(PropertyChangeEvent evt) { // FIXME: Add check for enabled property change. Need to // disable the buttons. if ("editor".equals(evt.getPropertyName())) BasicSpinnerUI.this.replaceEditor((JComponent) evt.getOldValue(), (JComponent) evt.getNewVal... |
if ("editor".equals(evt.getPropertyName())) BasicSpinnerUI.this.replaceEditor((JComponent) evt.getOldValue(), (JComponent) evt.getNewValue()); | if ("editor".equals(event.getPropertyName())) BasicSpinnerUI.this.replaceEditor((JComponent) event.getOldValue(), (JComponent) event.getNewValue()); | public void propertyChange(PropertyChangeEvent evt) { // FIXME: Add check for enabled property change. Need to // disable the buttons. if ("editor".equals(evt.getPropertyName())) BasicSpinnerUI.this.replaceEditor((JComponent) evt.getOldValue(), (JComponent) evt.getNewVal... |
JComponent e = spinner.getEditor(); if (e instanceof JSpinner.DefaultEditor) { JSpinner.DefaultEditor de = (JSpinner.DefaultEditor) e; de.getTextField().setBorder(null); } | protected void installDefaults() { LookAndFeel.installColorsAndFont(spinner, "Spinner.background", "Spinner.foreground", "Spinner.font"); LookAndFeel.installBorder(spinner, "Spinner.border"); spinner.setLayout(createLayout()); spinner.setOpaque(true); } | |
boolean niceOutput = sPrettyXDFOutput; | boolean niceOutput = Specification.getInstance().isPrettyXDFOutput(); | protected void specificIOStyleToXDF( OutputStream outputstream,String indent) { boolean niceOutput = sPrettyXDFOutput; //write out the tags info String[] tags = getAxisTags(); List axisList = parentArray.getAxisList(); String axisId; String tag; int stop = axisList.size(); synchronized (axisL... |
ICC_ProfileGray() | ICC_ProfileGray(int cspace) | ICC_ProfileGray() { super(ColorSpace.CS_GRAY); } |
super(ColorSpace.CS_GRAY); | super(cspace); whitePoint = getXYZData(icSigMediaWhitePointTag); | ICC_ProfileGray() { super(ColorSpace.CS_GRAY); } |
return 0; | short[] data = getCurve(icSigGrayTRCTag); if (data == null) throw new IllegalArgumentException("Couldn't read Gray TRC data."); if (data.length != 1) throw new ProfileDataException("TRC is a table, not a gamma value."); double gamma = (double) (data[0] & (0xFFFF)) / 256.0; return (float) gamma; | public float getGamma() { return 0; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.