rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
int MIN = 0; int MAX = 0; int PREF = 0; int[] min = new int[cols.length]; int[] max = new int[cols.length]; int[] pref = new int[cols.length]; for (int i = 0; i < cols.length; ++i)
int average = spill / cols.length; for (int i = 0; i < cols.length; i++)
private void distributeSpill(TableColumn[] cols, int spill) { int MIN = 0; int MAX = 0; int PREF = 0; int[] min = new int[cols.length]; int[] max = new int[cols.length]; int[] pref = new int[cols.length]; for (int i = 0; i < cols.length; ++i) { pref[i] = cols[i].getPreferredWidth(); ...
pref[i] = cols[i].getPreferredWidth(); min[i] = cols[i].getMinWidth(); max[i] = cols[i].getMaxWidth(); PREF += pref[i]; MIN += min[i]; MAX += max[i]; } for (int i = 0; i < cols.length; ++i) { int adj = 0; if (spill > 0) adj = (spill * (pref[i] - min[i])) / (PREF - MIN); else adj = (spill * (max[i] - pref[i])) / (MAX -...
cols[i].setWidth(cols[i].getWidth() + average);
private void distributeSpill(TableColumn[] cols, int spill) { int MIN = 0; int MAX = 0; int PREF = 0; int[] min = new int[cols.length]; int[] max = new int[cols.length]; int[] pref = new int[cols.length]; for (int i = 0; i < cols.length; ++i) { pref[i] = cols[i].getPreferredWidth(); ...
int spill = prefSum - getWidth();
int spill = getWidth() - prefSum;
public void doLayout() { TableColumn resizingColumn = null; int ncols = getColumnCount(); if (ncols < 1) return; int[] pref = new int[ncols]; int prefSum = 0; int rCol = -1; if (tableHeader != null) resizingColumn = tableHeader.getResizingColumn(); for (int i = 0; i < ncols; ++i) ...
Unsafe.die();
public static Throwable systemException(int nr, int address) throws PragmaUninterruptible { //Unsafe.getCurrentProcessor().getArchitecture().getStackReader().debugStackTrace(); String hexAddress = NumberUtils.hex(address, 8); switch (nr) { case EX_NULLPOINTER: return new NullPointerException("NPE at address " + ...
if (view == null) { String name = element.getName(); if (name.equals(AbstractDocument.ContentElementName)) view = new LabelView(element); else if (name.equals(AbstractDocument.ParagraphElementName)) view = new ParagraphView(element); else if (name.equals(AbstractDocument.SectionElementName)) view = new BoxView(element,...
public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute( StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag...
bad.minor = Minor.Any;
public static InconsistentTypeCode extract(Any any) { try { EmptyExceptionHolder h = (EmptyExceptionHolder) any.extract_Streamable(); return (InconsistentTypeCode) h.value; } catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("InconsistentTypeCod...
ndx = new Random ().nextInt (256);
while (ndx < 1 || ndx > 255) ndx = (byte) nextByte();
static final KDF getInstance(final byte[] K) { int ndx = -1; final byte[] keyMaterial; if (K != null) { keyMaterial = K; ndx = 0; } else { keyMaterial = new byte[AES_BLOCK_SIZE]; ndx = new Random ().nextInt (256); // XXX does this need to be secure? } re...
if (! componentToLayer.containsKey (c)) throw new IllegalArgumentException (); return ((Integer) componentToLayer.get(c)).intValue();
Component myComp = c; while(! componentToLayer.containsKey(myComp)) { myComp = myComp.getParent(); if (myComp == null) break; } if (myComp == null) throw new IllegalArgumentException ("component is not in this JLayeredPane"); Integer layerObj = (Integer) componentToLayer.get(myComp); return layerObj.intValue();
public int getLayer(Component c) { if (! componentToLayer.containsKey (c)) throw new IllegalArgumentException (); return ((Integer) componentToLayer.get(c)).intValue(); }
return new ChangeHandler();
return new ChangeHandler((JMenu) c, this);
protected ChangeListener createChangeListener(JComponent c) { return new ChangeHandler(); }
me.yield();
public void run () { boolean keepTrucking = true; while (keepTrucking) { try { bk = (Stream5250)dsq.get(); } catch (InterruptedException ie) { System.out.println(" vt thread interrupted and stopping "); keepTrucking = false; continue; ...
updateChildren(ec, ev, vf);
{ if (! updateChildren(ec, ev, vf)) ec = null; }
public void changedUpdate(DocumentEvent ev, Shape shape, ViewFactory vf) { Element el = getElement(); DocumentEvent.ElementChange ec = ev.getChange(el); if (ec != null) updateChildren(ec, ev, vf); forwardUpdate(ec, ev, shape, vf); updateLayout(ec, ev, shape); }
}
public void changedUpdate(DocumentEvent ev, Shape shape, ViewFactory vf) { Element el = getElement(); DocumentEvent.ElementChange ec = ev.getChange(el); if (ec != null) updateChildren(ec, ev, vf); forwardUpdate(ec, ev, shape, vf); updateLayout(ec, ev, shape); }
int endOffset = startOffset + ev.getLength();
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = get...
int endIndex = getViewIndex(endOffset, Position.Bias.Forward); int index = -1; int addLength = -1; if (ec != null)
if (startIndex == -1 && ev.getType() == DocumentEvent.EventType.REMOVE && startOffset >= getEndOffset())
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = get...
index = ec.getIndex(); addLength = ec.getChildrenAdded().length;
startIndex = getViewCount() - 1;
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = get...
if (startIndex >= 0 && endIndex >= 0)
if (startIndex >= 0)
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = get...
if (index >= 0 && i >= index && i < (index+addLength)) continue;
if (! (i >= startAdded && i <= endAdded)) {
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = get...
forwardUpdateToView(child, ev, shape, vf);
if (child != null) { Shape childAlloc = getChildAllocation(i, shape); forwardUpdateToView(child, ev, childAlloc, vf); }
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); int startIndex = get...
updateChildren(ec, ev, vf);
{ if (! updateChildren(ec, ev, vf)) ec = null; }
public void removeUpdate(DocumentEvent ev, Shape shape, ViewFactory vf) { Element el = getElement(); DocumentEvent.ElementChange ec = ev.getChange(el); if (ec != null) updateChildren(ec, ev, vf); forwardUpdate(ec, ev, shape, vf); updateLayout(ec, ev, shape); }
return java.lang.reflect.Array.getInt(longDataArray.get(longIndex), shortIndex);
return java.lang.reflect.Array.getInt(longDataArray.get(longIndex+1), shortIndex);
public int getIntData (Locator locator) throws NoDataException { int longIndex = getLongArrayIndex(locator); int shortIndex = getShortArrayIndex(locator); try { if (java.lang.reflect.Array.getByte(longDataArray.get(longIndex), shortIndex) !=1) throw new NoDataException();...
return java.lang.reflect.Array.getLong(longDataArray.get(longIndex), shortIndex);
return java.lang.reflect.Array.getLong(longDataArray.get(longIndex+1), shortIndex);
public long getLongData (Locator locator) throws NoDataException { int longIndex = getLongArrayIndex(locator); int shortIndex = getShortArrayIndex(locator); try { if (java.lang.reflect.Array.getByte(longDataArray.get(longIndex), shortIndex) !=1) throw new NoDataException()...
return java.lang.reflect.Array.getShort(longDataArray.get(longIndex), shortIndex);
return java.lang.reflect.Array.getShort(longDataArray.get(longIndex+1), shortIndex);
public short getShortData (Locator locator) throws NoDataException { int longIndex = getLongArrayIndex(locator); int shortIndex = getShortArrayIndex(locator); try { if (java.lang.reflect.Array.getByte(longDataArray.get(longIndex), shortIndex) !=1) throw new NoDataException...
if (isShowing ()) {
protected void addImpl(Component comp, Object constraints, int index) { synchronized (getTreeLock ()) { if (index > ncomponents || (index < 0 && index != -1) || comp instanceof Window || (comp instanceof Container && ((Container) comp).isAncestorOf(this)...
}
protected void addImpl(Component comp, Object constraints, int index) { synchronized (getTreeLock ()) { if (index > ncomponents || (index < 0 && index != -1) || comp instanceof Window || (comp instanceof Container && ((Container) comp).isAncestorOf(this)...
if (isShowing ()) {
public void remove(int index) { synchronized (getTreeLock ()) { Component r = component[index]; r.removeNotify(); System.arraycopy(component, index + 1, component, index, ncomponents - index - 1); component[--ncomponents] = null; invalidate(); ...
}
public void remove(int index) { synchronized (getTreeLock ()) { Component r = component[index]; r.removeNotify(); System.arraycopy(component, index + 1, component, index, ncomponents - index - 1); component[--ncomponents] = null; invalidate(); ...
jComponent.getContentPane().setLayout(new SwingFrameLayout(this));
jComponent.getContentPane().setLayout(new SwingContainerLayout(this));
public SwingFramePeer(SwingToolkit toolkit, JDesktopPane desktopPane, Frame awtFrame) { super(toolkit, awtFrame, new SwingFrame(awtFrame)); jComponent.initialize(this); SwingToolkit.copyAwtProperties(awtFrame, this.jComponent); jComponent.getContentPane().setLayout(new SwingFrameLayout(this)); ...
lock.notify();
lock.notifyAll();
public void clear() { synchronized (lock) { vector.clear(); lock.notify(); } }
while (isEmpty())
while (isEmpty()) {
public Object get() throws InterruptedException { synchronized (lock) { // wait until there is something to read while (isEmpty()) lock.wait(); /** * @todo here is the throttling code to look at * * just something here to try. OK it works but we nee...
}
public Object get() throws InterruptedException { synchronized (lock) { // wait until there is something to read while (isEmpty()) lock.wait(); /** * @todo here is the throttling code to look at * * just something here to try. OK it works but we nee...
lock.notify();
lock.notifyAll();
public void put(Object o) { synchronized (lock) { vector.addElement(o);// if (vector.size() > 5)// System.out.println(vector.size()); // tell waiting threads to wake up lock.notify(); } }
void visitParameter(Parameter p);
public void visitParameter(Parameter p);
void visitParameter(Parameter p);
String visitValue(String s, boolean last, int tokenType);
public String visitValue(String s, boolean last, int tokenType);
String visitValue(String s, boolean last, int tokenType);
this.param = p; String s = p.getName(); if( !Parameter.ANONYMOUS.equals(s) ) { line += "-" + s + " "; } }
this.param = p; if (!p.isAnonymous()) { line += "-" + p.getName() + " "; } }
public void visitParameter(Parameter p) { this.param = p; String s = p.getName(); if( !Parameter.ANONYMOUS.equals(s) ) { line += "-" + s + " "; } }
private void clearArguments() { for (int i = 0; i < params.length; i++) if (params[i].hasArgument()) params[i].getArgument().clear(); }
final void clearArguments() { for (int i = 0; i < params.length; i++) if (params[ i].hasArgument()) params[ i].getArgument().clear(); }
private void clearArguments() { for (int i = 0; i < params.length; i++) if (params[i].hasArgument()) params[i].getArgument().clear(); }
CompletionVisitor visitor = new CompletionVisitor(); try { visitCommandLine(partial, visitor); } catch(SyntaxError ex) { throw new CompletionException(ex.getMessage()); } return visitor.getCompletedLine(); }
CompletionVisitor visitor = new CompletionVisitor(); try { visitCommandLine(partial, visitor); } catch (SyntaxErrorException ex) { throw new CompletionException(ex.getMessage()); } return visitor.getCompletedLine(); }
public String complete(CommandLine partial) throws CompletionException { CompletionVisitor visitor = new CompletionVisitor(); try { visitCommandLine(partial, visitor); } catch(SyntaxError ex) { throw new CompletionException(ex.getMessage()); } return visitor.getCompletedLine(); }
synchronized ParsedArguments parse(String[] args) throws SyntaxError { if (params.length == 0) { if( args.length == 0 ) return new ParsedArguments(new HashMap()); throw new SyntaxError("Syntax takes no parameter"); }
synchronized ParsedArguments parse(String[] args) throws SyntaxErrorException { if (params.length == 0) { if (args.length == 0) { return new ParsedArguments(new HashMap()); } throw new SyntaxErrorException("Syntax takes no parameter"); }
synchronized ParsedArguments parse(String[] args) throws SyntaxError { if (params.length == 0) { if( args.length == 0 ) return new ParsedArguments(new HashMap()); throw new SyntaxError("Syntax takes no parameter"); } CommandLine cmdLine = new CommandLine(args); ParseVisitor visitor = new ParseVisitor(); vi...
CommandLine cmdLine = new CommandLine(args); ParseVisitor visitor = new ParseVisitor(); visitCommandLine(cmdLine, visitor); ParsedArguments result = new ParsedArguments(visitor.getArgumentMap());
final CommandLine cmdLine = new CommandLine(args); final ParseVisitor visitor = new ParseVisitor(); visitCommandLine(cmdLine, visitor); final ParsedArguments result = new ParsedArguments(visitor .getArgumentMap());
synchronized ParsedArguments parse(String[] args) throws SyntaxError { if (params.length == 0) { if( args.length == 0 ) return new ParsedArguments(new HashMap()); throw new SyntaxError("Syntax takes no parameter"); } CommandLine cmdLine = new CommandLine(args); ParseVisitor visitor = new ParseVisitor(); vi...
for( int i = 0; i < params.length; i++ ) if( !params[i].isOptional() && !params[i].isSet(result) ) throw new SyntaxError("Mandatory parameter " + params[i].getName() + " not set"); return result; }
for (int i = 0; i < params.length; i++) { final Parameter p = params[ i]; if (!p.isOptional()) { if (!p.isSet(result)) { throw new SyntaxErrorException( "Mandatory parameter " + p.getName() + " not set"); } } } return result; }
synchronized ParsedArguments parse(String[] args) throws SyntaxError { if (params.length == 0) { if( args.length == 0 ) return new ParsedArguments(new HashMap()); throw new SyntaxError("Syntax takes no parameter"); } CommandLine cmdLine = new CommandLine(args); ParseVisitor visitor = new ParseVisitor(); vi...
private synchronized void visitCommandLine(CommandLine cmdLine, CommandLineVisitor visitor) { clearArguments(); Parameter param = null; do { String s = ""; if( cmdLine.hasNext() ) s = cmdLine.next();
private synchronized void visitCommandLine(CommandLine cmdLine, CommandLineVisitor visitor) throws SyntaxErrorException { clearArguments(); Parameter param = null; final AnonymousIterator anonIterator = new AnonymousIterator(); do { String s = ""; if (cmdLine.hasNext()) s = cmdLine.next();
private synchronized void visitCommandLine(CommandLine cmdLine, CommandLineVisitor visitor) { clearArguments(); Parameter param = null; do { String s = ""; if( cmdLine.hasNext() ) s = cmdLine.next(); // TODO: it didn't handle correctly the parameters starting with "-" /*if (s.startsWit...
/*if (s.startsWith("-") && (cmdLine.getTokenType() == CommandLine.LITERAL)) { if (param != null) throw new SyntaxError("Unexpected Parameter " + s);
private synchronized void visitCommandLine(CommandLine cmdLine, CommandLineVisitor visitor) { clearArguments(); Parameter param = null; do { String s = ""; if( cmdLine.hasNext() ) s = cmdLine.next(); // TODO: it didn't handle correctly the parameters starting with "-" /*if (s.startsWit...
param = getParameter(s.substring(1)); if (param == null) throw new SyntaxError("Unknown Parameter \"" + s + "\""); visitor.visitParameter(param); } else { if (param == null) { param = getAnonymousParameter(); if (param == null) { throw new SyntaxError("Unexpected argument \"" + s + "\""); } else { visitor.visitParamete...
if (param == null) { if (anonIterator.hasNext()) { param = (Parameter) anonIterator.next(); visitor.visitParameter(param); } else { throw new SyntaxErrorException("Unexpected argument \"" + s + "\""); }
private synchronized void visitCommandLine(CommandLine cmdLine, CommandLineVisitor visitor) { clearArguments(); Parameter param = null; do { String s = ""; if( cmdLine.hasNext() ) s = cmdLine.next(); // TODO: it didn't handle correctly the parameters starting with "-" /*if (s.startsWit...
Argument arg = param.getArgument(); String value = visitor.visitValue(s, !cmdLine.hasNext(), cmdLine.getTokenType()); if( value != null ) arg.setValue(value); } if (param.isSatisfied()) param = null; } while (cmdLine.hasNext()); }
final boolean last = !cmdLine.hasNext(); Argument arg = param.getArgument(); String value = visitor.visitValue(s, last, cmdLine.getTokenType()); if (value != null) { if (visitor.isValueValid(arg, value, last)) { arg.setValue(value); } else { throw new SyntaxErrorException("Invalid value for argument"); } } } if (param....
private synchronized void visitCommandLine(CommandLine cmdLine, CommandLineVisitor visitor) { clearArguments(); Parameter param = null; do { String s = ""; if( cmdLine.hasNext() ) s = cmdLine.next(); // TODO: it didn't handle correctly the parameters starting with "-" /*if (s.startsWit...
try { helper.getVmClass(child); } catch (NullPointerException ex) { Unsafe.debug("\nObject type "); Unsafe.debug(vmClass.getName()); Unsafe.debug("\nChild addr "); Unsafe.debug(helper.addressOf32(child)); Unsafe.debug("\nField offset "); Unsafe.debug(offset); Unsafe.debug("\nC.IsObject? "); Unsafe.debug(heapManage...
private void markObject(Object object, VmNormalClass vmClass) { final int[] referenceOffsets = vmClass.getReferenceOffsets(); final int cnt = referenceOffsets.length; final int size = vmClass.getObjectSize(); for (int i = 0; i < cnt; i++) { int offset = referenceOffsets[ i]; ...
stack.push(child);
try { helper.getVmClass(child); stack.push(child); } catch (NullPointerException ex) { Unsafe.debug("\nObject address "); Unsafe.debug(helper.addressOf32(child)); Unsafe.debug("\nObject TIB "); Unsafe.debug(helper.addressOf32(helper.getTib(child))); helper.die("NPE in processChild; probably corrupted heap"); }
private void processChild(Object child) { final int gcColor = helper.getObjectColor(child); if (gcColor <= GC_WHITE) { // Yellow or White helper.atomicChangeObjectColor(child, gcColor, GC_GREY); stack.push(child); } }
try { helper.getVmClass(object); } catch (NullPointerException ex) { Unsafe.debug("\nObject address "); Unsafe.debug(helper.addressOf32(object)); Unsafe.debug("\nObject TIB "); Unsafe.debug(helper.addressOf32(helper.getTib(object))); helper.die("NPE in processChild; probably corrupted heap"); }
public boolean visit(Object object) { // Be very paranoia for now /* * if (!heapManager.isObject(helper.addressOf(object))) { * Unsafe.debug("visit got non-object"); * Unsafe.debug(helper.addressToLong(helper.addressOf(object))); * Unsafe.getCurrentProcessor().getArchit...
if (result == null) { throw new IllegalStateException("Null object found on GCStack"); }
public Object pop() { if (stackPtr == 0) { return null; } else { stackPtr--; Object result = stack[stackPtr]; stack[stackPtr] = null; return result; } }
public void changedUpdate(DocumentEvent ev, Shape a, ViewFactory fv)
public void changedUpdate(DocumentEvent ev, Shape a, ViewFactory vf)
public void changedUpdate(DocumentEvent ev, Shape a, ViewFactory fv) { setPropertiesFromAttributes(); }
layoutChanged(X_AXIS); layoutChanged(Y_AXIS); super.changedUpdate(ev, a, vf);
public void changedUpdate(DocumentEvent ev, Shape a, ViewFactory fv) { setPropertiesFromAttributes(); }
align = super.getAlignment(axis);
align = 0.5F;
public float getAlignment(int axis) { float align; if (axis == X_AXIS) align = super.getAlignment(axis); else if (getViewCount() > 0) { float prefHeight = getPreferredSpan(Y_AXIS); float firstRowHeight = getView(0).getPreferredSpan(Y_AXIS); align = (firstRowHeight / 2.F) / pre...
align = 0.0F;
align = 0.5F;
public float getAlignment(int axis) { float align; if (axis == X_AXIS) align = super.getAlignment(axis); else if (getViewCount() > 0) { float prefHeight = getPreferredSpan(Y_AXIS); float firstRowHeight = getView(0).getPreferredSpan(Y_AXIS); align = (firstRowHeight / 2.F) / pre...
throw new IllegalArgumentException("classname: " + e.getMessage());
IllegalArgumentException iae; iae = new IllegalArgumentException("mimeString: " + mimeString + " classLoader: " + classLoader); iae.initCause(e); throw iae;
private static Class getRepresentationClassFromMime(String mimeString, ClassLoader classLoader) { String classname = getParameter("class", mimeString); if (classname != null) { try { return tryToLoadClass(classna...
return(Class.forName(className));
return Class.forName(className);
protected static final Class tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException { try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(cla...
catch(Exception e) { ; } /*
catch(ClassNotFoundException cnfe) { }
protected static final Class tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException { try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(cla...
return(className.getClass().getClassLoader().findClass(className));
ClassLoader loader = ClassLoader.getSystemClassLoader(); return Class.forName(className, true, loader); } catch(ClassNotFoundException cnfe) {
protected static final Class tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException { try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(cla...
catch(Exception e) { ; }
protected static final Class tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException { try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(cla...
return(ClassLoader.getSystemClassLoader().findClass(className));
ClassLoader loader = Thread.currentThread().getContextClassLoader(); return Class.forName(className, true, loader); } catch(ClassNotFoundException cnfe) {
protected static final Class tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException { try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(cla...
catch(Exception e) { ; } */
protected static final Class tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException { try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(cla...
return(classLoader.loadClass(className)); else
return Class.forName(className, true, classLoader);
protected static final Class tryToLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException { try { return(Class.forName(className)); } catch(Exception e) { ; } // Commented out for Java 1.1 /* try { return(cla...
FSDriverUtils.getIDEDeviceFactory();
IDEDriverUtils.getIDEDeviceFactory();
public void init(TestConfig config, MockObjectTestCase testCase) throws NameAlreadyBoundException, NamingException, IllegalArgumentException, DriverException, ResourceNotFreeException { IDEDiskDriver driver = new IDEDiskDriver(); // set the current testCase for our factory ...
Class cls = Class.forName(toolkit_name);
ClassLoader cl = Thread.currentThread().getContextClassLoader(); Class cls = cl.loadClass(toolkit_name);
public static Toolkit getDefaultToolkit() { if (toolkit != null) return toolkit; String toolkit_name = System.getProperty("awt.toolkit", default_toolkit_name); try { Class cls = Class.forName(toolkit_name); Object obj = cls.newInstance(); if (!(obj...
System.out.println("args IS -------------'" + args);
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"...
System.out.println("DNNAME IS -------------'" + dnParam);
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"...
System.out.println("Got param" + getParm("-dn",args));
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"...
else if (tag.equals(HTML.Tag.TABLE)) view = new TableView(element);
public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute(StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag.equals(HTML.Tag.P) ...
if (view == null) { System.err.println("missing tag->view mapping for: " + element); view = new NullView(element); }
public View create(Element element) { View view = null; Object attr = element.getAttributes().getAttribute(StyleConstants.NameAttribute); if (attr instanceof HTML.Tag) { HTML.Tag tag = (HTML.Tag) attr; if (tag.equals(HTML.Tag.IMPLIED) || tag.equals(HTML.Tag.P) ...
if (editorPane != null)
public void read(Reader in, Document doc, int pos) throws IOException, BadLocationException { if (doc instanceof HTMLDocument) { Parser parser = getParser(); if (pos < 0 || pos > doc.getLength()) throw new BadLocationException("Bad location", pos); if (parser == null) ...
validateFileCache();
public BasicDirectoryModel(JFileChooser filechooser) { this.filechooser = filechooser; filechooser.addPropertyChangeListener(this); listingMode = filechooser.getFileSelectionMode(); contents = new Vector(); }
Vector tmp = new Vector(); for (int i = 0; i < directories; i++) tmp.add(contents.get(i)); return tmp;
synchronized (contents) { Vector dirs = directories; if (dirs == null) { getFiles(); dirs = directories; } return dirs; }
public Vector getDirectories() { Vector tmp = new Vector(); for (int i = 0; i < directories; i++) tmp.add(contents.get(i)); return tmp; }
if (listingMode == JFileChooser.FILES_ONLY) return contents.get(directories + index); else
public Object getElementAt(int index) { if (index > getSize() - 1) return null; if (listingMode == JFileChooser.FILES_ONLY) return contents.get(directories + index); else return contents.elementAt(index); }
Vector tmp = new Vector(); for (int i = directories; i < getSize(); i++) tmp.add(contents.get(i)); return tmp;
synchronized (contents) { Vector f = files; if (f == null) { f = new Vector(); Vector d = new Vector(); for (Iterator i = contents.iterator(); i.hasNext();) { File file = (File) i.next(); if (filechooser.isTraversable(file)) d.add(file); else f.add(file); } files = f; directories = d; } return f; }
public Vector getFiles() { Vector tmp = new Vector(); for (int i = directories; i < getSize(); i++) tmp.add(contents.get(i)); return tmp; }
if (listingMode == JFileChooser.DIRECTORIES_ONLY) return directories; else if (listingMode == JFileChooser.FILES_ONLY) return contents.size() - directories;
public int getSize() { if (listingMode == JFileChooser.DIRECTORIES_ONLY) return directories; else if (listingMode == JFileChooser.FILES_ONLY) return contents.size() - directories; return contents.size(); }
if (listingMode == JFileChooser.FILES_ONLY) return contents.indexOf(o) - directories;
public int indexOf(Object o) { if (listingMode == JFileChooser.FILES_ONLY) return contents.indexOf(o) - directories; return contents.indexOf(o); }
if (e.getPropertyName().equals(JFileChooser.FILE_SELECTION_MODE_CHANGED_PROPERTY)) listingMode = filechooser.getFileSelectionMode();
String property = e.getPropertyName(); if (property.equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY) || property.equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY) || property.equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY) || property.equals(JFileChooser.FILE_SELECTION_MODE_CHANGED_PROPERTY) || property.equals(JFileCh...
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JFileChooser.FILE_SELECTION_MODE_CHANGED_PROPERTY)) listingMode = filechooser.getFileSelectionMode(); }
return false;
return oldFile.renameTo( newFile );
public boolean renameFile(File oldFile, File newFile) { // FIXME: implement return false; }
Enumeration e = Collections.enumeration(v); Vector tmp = new Vector(); for (; e.hasMoreElements();) tmp.add(e.nextElement()); contents = tmp;
protected void sort(Vector v) { Collections.sort(v, comparator); Enumeration e = Collections.enumeration(v); Vector tmp = new Vector(); for (; e.hasMoreElements();) tmp.add(e.nextElement()); contents = tmp; }
contents.clear(); directories = 0; FileSystemView fsv = filechooser.getFileSystemView(); File[] list = fsv.getFiles(filechooser.getCurrentDirectory(), filechooser.isFileHidingEnabled()); if (list == null) return; for (int i = 0; i < list.length; i++)
File dir = filechooser.getCurrentDirectory(); if (dir != null)
public void validateFileCache() { contents.clear(); directories = 0; FileSystemView fsv = filechooser.getFileSystemView(); File[] list = fsv.getFiles(filechooser.getCurrentDirectory(), filechooser.isFileHidingEnabled()); if (list == null) return; for (int i = 0; i...
if (list[i] == null) continue; if (filechooser.accept(list[i]))
if (loadThread != null)
public void validateFileCache() { contents.clear(); directories = 0; FileSystemView fsv = filechooser.getFileSystemView(); File[] list = fsv.getFiles(filechooser.getCurrentDirectory(), filechooser.isFileHidingEnabled()); if (list == null) return; for (int i = 0; i...
contents.add(list[i]); if (filechooser.isTraversable(list[i])) directories++;
loadThread.interrupt(); loadThread.cancelPending();
public void validateFileCache() { contents.clear(); directories = 0; FileSystemView fsv = filechooser.getFileSystemView(); File[] list = fsv.getFiles(filechooser.getCurrentDirectory(), filechooser.isFileHidingEnabled()); if (list == null) return; for (int i = 0; i...
sort(contents); filechooser.revalidate(); filechooser.repaint();
public void validateFileCache() { contents.clear(); directories = 0; FileSystemView fsv = filechooser.getFileSystemView(); File[] list = fsv.getFiles(filechooser.getCurrentDirectory(), filechooser.isFileHidingEnabled()); if (list == null) return; for (int i = 0; i...
new SecureRandom ().nextBytes(cIV);
getDefaultPRNG().nextBytes(cIV);
private String createO(final String aol) throws AuthenticationException { if (DEBUG && debuglevel > 8) debug(TRACE, "==> createO(\"" + aol + "\")"); boolean replaydetectionAvailable = false; boolean integrityAvailable = false; boolean confidentialityAvailable = false; String option, mandatory = S...
cn = new SecureRandom ().generateSeed (16);
cn = new byte[16]; getDefaultPRNG().nextBytes(cn);
private byte[] sendIdentities() throws SaslException { if (DEBUG && debuglevel > 8) debug(TRACE, "==> sendIdentities()"); // If necessary, prompt the client for the username and password getUsernameAndPassword(); if (DEBUG && debuglevel > 6) debug(TRACE, "Password: \"" + new String(password.get...
invalidate(); RepaintManager.currentManager(this).addInvalidComponent(this);
if (! EventQueue.isDispatchThread()) SwingUtilities.invokeLater(new Runnable() { public void run() { revalidate(); } }); else { invalidate(); RepaintManager.currentManager(this).addInvalidComponent(this); }
public void revalidate() { invalidate(); RepaintManager.currentManager(this).addInvalidComponent(this); }
Container parent = getParent(); if (parent != null) parent.repaint(getX(), getY(), getWidth(), getHeight()); revalidate();
public void setVisible(boolean v) { super.setVisible(v); }
public abstract FileLock lock(long position, long size, boolean shared) throws IOException;
public final FileLock lock() throws IOException { return lock(0, Long.MAX_VALUE, false); }
public abstract FileLock lock(long position, long size, boolean shared) throws IOException;
public abstract int read(ByteBuffer dst) throws IOException;
public abstract long read(ByteBuffer[] dsts, int offset, int length) throws IOException;
public abstract int read(ByteBuffer dst) throws IOException;
public abstract FileLock tryLock(long position, long size, boolean shared) throws IOException;
public final FileLock tryLock() throws IOException { return tryLock(0, Long.MAX_VALUE, false); }
public abstract FileLock tryLock(long position, long size, boolean shared) throws IOException;
public abstract int write(ByteBuffer src) throws IOException;
public final long write(ByteBuffer[] srcs) throws IOException { long result = 0; for (int i = 0; i < srcs.length; i++) result += write(srcs[i]); return result; }
public abstract int write(ByteBuffer src) throws IOException;
buf.append(Thread.currentThread().hashCode()); buf.append('@');
HTTPConnection getConnection(String host, int port, boolean secure) throws IOException { HTTPConnection connection; if (keepAlive) { StringBuffer buf = new StringBuffer(secure ? "https://" : "http://"); buf.append(host); buf.append(':'); buf.append(port); String key =...
getContentPane().add(interfacePanel,BorderLayout.NORTH);
void jbInit() throws Exception { // make it non resizable setResizable(true); this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); // create some reusable borders and layouts Border etchedBorder = BorderFactory.createEtchedBorder(); BorderLayout borderLayout = new BorderLayout(); ...
if (e.getPropertyName().equals(JTabbedPane.TAB_LAYOUT_POLICY_CHANGED_PROPERTY))
if (e.getPropertyName().equals("tabLayoutPolicy"))
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JTabbedPane.TAB_LAYOUT_POLICY_CHANGED_PROPERTY)) { layoutManager = createLayoutManager(); tabPane.setLayout(layoutManager); } else if (e.getPropertyName().equals(JTabbedPane.TAB_PLACEMENT_CHANGED_PROPERTY) ...
else if (e.getPropertyName().equals(JTabbedPane.TAB_PLACEMENT_CHANGED_PROPERTY)
else if (e.getPropertyName().equals("tabPlacement")
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JTabbedPane.TAB_LAYOUT_POLICY_CHANGED_PROPERTY)) { layoutManager = createLayoutManager(); tabPane.setLayout(layoutManager); } else if (e.getPropertyName().equals(JTabbedPane.TAB_PLACEMENT_CHANGED_PROPERTY) ...
public LayoutManager createLayoutManager()
protected LayoutManager createLayoutManager()
public LayoutManager createLayoutManager() { if (tabPane.getTabLayoutPolicy() == JTabbedPane.WRAP_TAB_LAYOUT) return new TabbedPaneLayout(); else { incrButton = createIncreaseButton(); decrButton = createDecreaseButton(); viewport = new ScrollingViewport(); viewport.setLayout(null); panel = new Scrol...
public void addAccessibleSelection(int value0) throws NotImplementedException
public void addAccessibleSelection(int index)
public void addAccessibleSelection(int value0) throws NotImplementedException { // TODO: Implement this properly. }
setSelectedIndex(index);
public void addAccessibleSelection(int value0) throws NotImplementedException { // TODO: Implement this properly. }
setSelectedIndex(-1);
public void clearAccessibleSelection() throws NotImplementedException { // TODO: Implement this properly. }
public boolean doAccessibleAction(int value0) throws NotImplementedException
public boolean doAccessibleAction(int actionIndex)
public boolean doAccessibleAction(int value0) throws NotImplementedException { return false; }
return false;
boolean actionPerformed = false; if (actionIndex == 0) { setPopupVisible(! isPopupVisible()); actionPerformed = true; } return actionPerformed;
public boolean doAccessibleAction(int value0) throws NotImplementedException { return false; }
throws NotImplementedException
public AccessibleAction getAccessibleAction() throws NotImplementedException { return null; }
return null;
return this;
public AccessibleAction getAccessibleAction() throws NotImplementedException { return null; }