rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
void setDocumentProperties(Dictionary x)
public void setDocumentProperties(Dictionary x)
void setDocumentProperties(Dictionary x) { }
if (listener == null) return;
public void addFlavorListener(FlavorListener listener) { synchronized(listeners) { listeners.add(listener); } }
if (listener == null) return;
public void removeFlavorListener(FlavorListener listener) { synchronized(listeners) { listeners.remove(listener); } }
return attributes.getAttribute(key);
Object result = attributes.getAttribute(key); if (result == null && element_parent != null) { AttributeSet parentSet = element_parent.getAttributes(); if (parentSet != null) result = parentSet.getAttribute(key); } return result;
public Object getAttribute(Object key) { return attributes.getAttribute(key); }
instanceOfClass(refr, (VmClassType) resolvedType, tmpr, null,
instanceOfClass(refr, (VmClassType<?>) resolvedType, tmpr, null,
public final void visit_checkcast(VmConstClass classRef) { // Resolve classRef classRef.resolve(loader); final VmType<?> resolvedType = classRef.getResolvedVmClass(); if (resolvedType.isInterface() || resolvedType.isArray()) { // ClassRef is an interface or array, do the slow test // Pre-claim ECX L1AHelper....
instanceOfClass(refr, (VmClassType) classRef.getResolvedVmClass(),
instanceOfClass(refr, (VmClassType<?>) classRef.getResolvedVmClass(),
public final void visit_instanceof(VmConstClass classRef) { // Resolve the classRef classRef.resolve(loader); // Prepare final X86RegisterPool pool = eContext.getGPRPool(); final VmType<?> resolvedType = classRef.getResolvedVmClass(); if (resolvedType.isInterface() || resolvedType.isArray()) { // It is an inte...
System.out.println("(" + x + "," + y + ") " + v + ", si " + si);
public Raster createGlyphRaster(int fontSize) { final double scale = (double)sumAreaTable.getHeight() / (double)fontSize; final int width = (int)(sumAreaTable.getWidth() / scale); final ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_GRAY); final int[] nBits = { 8 }; final ComponentColorModel cm = new Compon...
d.width = d.width + arrowIcon.getIconWidth() + defaultTextArrowIconGap;
if (!((JMenu) c).isTopLevelMenu()) d.width += arrowIcon.getIconWidth() + m.getParent().getWidth(); else d.width += MenuGap;
protected Dimension getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap) { JMenuItem m = (JMenuItem) c; Dimension d = BasicGraphicsUtils.getPreferredButtonSize(m, ...
LookAndFeel.installBorder(menuItem, "MenuItem.border"); LookAndFeel.installColorsAndFont(menuItem, "MenuItem.background", "MenuItem.foreground", "MenuItem.font"); menuItem.setMargin(UIManager.getInsets("MenuItem.margin")); acceleratorFont = UIManager.getFont("MenuItem.acceleratorFont"); acceleratorForeground = UIManage...
String prefix = getPropertyPrefix(); LookAndFeel.installBorder(menuItem, prefix + ".border"); LookAndFeel.installColorsAndFont(menuItem, prefix + ".background", prefix + ".foreground", prefix + ".font"); menuItem.setMargin(UIManager.getInsets(prefix + ".margin")); acceleratorFont = UIManager.getFont(prefix + ".accelera...
protected void installDefaults() { LookAndFeel.installBorder(menuItem, "MenuItem.border"); LookAndFeel.installColorsAndFont(menuItem, "MenuItem.background", "MenuItem.foreground", "MenuItem.font"); menuItem.setMargin(UIManager.getInsets("MenuItem.margin")); accelerator...
decRefCount(false);
protected FramePeer createFrame(Frame target) { setTop(target); final int rc = incRefCount(); if (!initialized) { log.debug("createFrame:desktopFramePeer(" + target + ")"); // Only desktop is real frame initialized = true; decRefCount(false); ...
else if (s.isClosed())
else if (not_reusable(s))
public static Socket get_socket(Object key) { Socket s = (Socket) sockets.get(key); if (s == null) return null; else if (s.isClosed()) { sockets.remove(key); return null; } else { sockets.remove(key); try { // Set one minute time out tha...
sockets.remove(key);
public static Socket get_socket(Object key) { Socket s = (Socket) sockets.get(key); if (s == null) return null; else if (s.isClosed()) { sockets.remove(key); return null; } else { sockets.remove(key); try { // Set one minute time out tha...
}
public static Socket get_socket(Object key) { Socket s = (Socket) sockets.get(key); if (s == null) return null; else if (s.isClosed()) { sockets.remove(key); return null; } else { sockets.remove(key); try { // Set one minute time out tha...
gc(); }
public static void put_socket(Object key, Socket s) { sockets.put(key, s); }
{
public void layoutContainer(Container parent) { // The way to interpret this function is basically to ignore the names // of methods it calls, and focus on the variable names here. getViewRect // doesn't, for example, return the view; it returns the port bounds in // view space. Likwise setViewPosition ...
if ( !(view instanceof Scrollable) || ((Scrollable)view).getScrollableTracksViewportHeight()) viewPref.height = portBounds.height; }
public void layoutContainer(Container parent) { // The way to interpret this function is basically to ignore the names // of methods it calls, and focus on the variable names here. getViewRect // doesn't, for example, return the view; it returns the port bounds in // view space. Likwise setViewPosition ...
if ( !(view instanceof Scrollable) || ((Scrollable)view).getScrollableTracksViewportWidth()) viewPref.width = portBounds.width; }
public void layoutContainer(Container parent) { // The way to interpret this function is basically to ignore the names // of methods it calls, and focus on the variable names here. getViewRect // doesn't, for example, return the view; it returns the port bounds in // view space. Likwise setViewPosition ...
private static final DateFormat computeInstance (int style, Locale loc, boolean use_date, boolean use_time)
private static DateFormat computeInstance (int style, Locale loc, boolean use_date, boolean use_time)
private static final DateFormat computeInstance (int style, Locale loc, boolean use_date, boolean use_time) { return computeInstance (style, style, loc, use_date, use_time); }
ext.add (new DERValue (DER.BOOLEAN, new Boolean (critical)));
ext.add (new DERValue (DER.BOOLEAN, Boolean.valueOf (critical)));
public DERValue getDerValue() { List ext = new ArrayList (3); ext.add (new DERValue (DER.OBJECT_IDENTIFIER, oid)); ext.add (new DERValue (DER.BOOLEAN, new Boolean (critical))); ext.add (new DERValue (DER.OCTET_STRING, value.getEncoded())); return new DERValue (DER.CONSTRUCTED|DER.SEQUENCE, ext); }
else super.setText("");
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { if (value != null) { i...
if (Configuration.DEBUG)
Parser getParser() { log.entering(this.getClass().getName(), "getParser"); //$NON-NLS-1$ Parser result = new ClasspathToolParser(Main.GENKEY_CMD, true); result.setHeader(Messages.getString("GenKeyCmd.57")); //$NON-NLS-1$ result.setFooter(Messages.getString("GenKeyCmd.58")); //$NON-NLS-1$ OptionGroup o...
if (Configuration.DEBUG)
private void setDName(String name) throws IOException, UnsupportedCallbackException { if (name != null && name.trim().length() > 0) name = name.trim(); else { // prompt user to provide one String dnTxt = Messages.getString("GenKeyCmd.0"); //$NON-NLS-1$ String oDefault = Mes...
setKeyStoreParams(_providerClassName, _ksType, _ksPassword, _ksURL);
setKeyStoreParams(true, _providerClassName, _ksType, _ksPassword, _ksURL);
void setup() throws Exception { setKeyStoreParams(_providerClassName, _ksType, _ksPassword, _ksURL); setAliasParam(_alias); setKeyPasswordParam(_password); setAlgorithmParams(_keyAlgorithm, _sigAlgorithm); setKeySize(_keySizeStr); setDName(_dName); setValidityParam(_validityStr); log.finer("-...
log.finer("-genkey handler will use the following options:"); log.finer(" -alias=" + alias); log.finer(" -keyalg=" + keyPairGenerator.getAlgorithm()); log.finer(" -keysize=" + keySize); log.finer(" -sigalg=" + signatureAlgorithm.getAlgorithm()); log.finer(" -dname=" + distinguishedName); log.finer(" -validity=" +...
if (Configuration.DEBUG) { log.fine("-genkey handler will use the following options:"); log.fine(" -alias=" + alias); log.fine(" -keyalg=" + keyPairGenerator.getAlgorithm()); log.fine(" -keysize=" + keySize); log.fine(" -sigalg=" + signatureAlgorithm.getAlgorithm()); log.fine(" -dname=" + distinguishedName); log.f...
void setup() throws Exception { setKeyStoreParams(_providerClassName, _ksType, _ksPassword, _ksURL); setAliasParam(_alias); setKeyPasswordParam(_password); setAlgorithmParams(_keyAlgorithm, _sigAlgorithm); setKeySize(_keySizeStr); setDName(_dName); setValidityParam(_validityStr); log.finer("-...
log.fine("About to generate key-pair..."); }
void start() throws CertificateException, KeyStoreException, InvalidKeyException, SignatureException, IOException, NoSuchAlgorithmException { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ // 1. generate a new key-pair log.finer("About to generate key-pair..."); //$NON-NLS-1$ k...
log.finer("About to generate key-pair...");
void start() throws CertificateException, KeyStoreException, InvalidKeyException, SignatureException, IOException, NoSuchAlgorithmException { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ // 1. generate a new key-pair log.finer("About to generate key-pair..."); //$NON-NLS-1$ k...
log.finer("About to generate a self-signed certificate...");
if (Configuration.DEBUG) log.fine("About to generate a self-signed certificate...");
void start() throws CertificateException, KeyStoreException, InvalidKeyException, SignatureException, IOException, NoSuchAlgorithmException { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ // 1. generate a new key-pair log.finer("About to generate key-pair..."); //$NON-NLS-1$ k...
log.finest(Util.dumpString(derBytes, "derBytes "));
if (Configuration.DEBUG) log.fine(Util.dumpString(derBytes, "derBytes "));
void start() throws CertificateException, KeyStoreException, InvalidKeyException, SignatureException, IOException, NoSuchAlgorithmException { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ // 1. generate a new key-pair log.finer("About to generate key-pair..."); //$NON-NLS-1$ k...
log.finest("certificate = " + certificate);
if (Configuration.DEBUG) log.fine("certificate = " + certificate);
void start() throws CertificateException, KeyStoreException, InvalidKeyException, SignatureException, IOException, NoSuchAlgorithmException { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ // 1. generate a new key-pair log.finer("About to generate key-pair..."); //$NON-NLS-1$ k...
log.finest("About to store newly generated material in key store...");
if (Configuration.DEBUG) log.fine("About to store newly generated material in key store...");
void start() throws CertificateException, KeyStoreException, InvalidKeyException, SignatureException, IOException, NoSuchAlgorithmException { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ // 1. generate a new key-pair log.finer("About to generate key-pair..."); //$NON-NLS-1$ k...
if (Configuration.DEBUG)
void start() throws CertificateException, KeyStoreException, InvalidKeyException, SignatureException, IOException, NoSuchAlgorithmException { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ // 1. generate a new key-pair log.finer("About to generate key-pair..."); //$NON-NLS-1$ k...
setTableHeader(createDefaultTableHeader());
protected void initializeLocalVars() { this.autoCreateColumnsFromModel = false; if (columnModel == null) { this.autoCreateColumnsFromModel = true; createColumnsFromModel(); } this.columnModel.addColumnModelListener(this); this.defaultRenderersByColumnClass = new Hashtable(); ...
if (tableHeader != null) tableHeader.setColumnModel(c);
public void setColumnModel(TableColumnModel c) { if (c == null) throw new IllegalArgumentException(); TableColumnModel tmp = columnModel; if (tmp != null) tmp.removeColumnModelListener(this); if (c != null) c.addColumnModelListener(this); columnModel = c; if (dataModel != null && col...
if ((event.getFirstRow() ==TableModelEvent.HEADER_ROW) && autoCreateColumnsFromModel) createColumnsFromModel();
public void tableChanged (TableModelEvent event) { repaint(); }
return activeWindow;
return (Window) getGlobalObject (currentActiveWindows);
protected Window getGlobalActiveWindow() { // XXX Need a way to test if this thread is in the context of the focus // owner, and throw a SecurityException if that is the case. // XXX Implement. return activeWindow; }
return focusCycleRoot;
return (Container) getGlobalObject (currentFocusCycleRoots);
protected Container getGlobalCurrentFocusCycleRoot() { // XXX Need a way to test if this thread is in the context of the focus // owner, and throw a SecurityException if that is the case. // XXX Implement. return focusCycleRoot; }
return new UTF_16Encoder (this, UTF_16Encoder.LITTLE_ENDIAN, true);
return new UTF_16Encoder (this, UTF_16Encoder.LITTLE_ENDIAN, false);
public CharsetEncoder newEncoder () { return new UTF_16Encoder (this, UTF_16Encoder.LITTLE_ENDIAN, true); }
Insets margin = b.getMargin();
public static Dimension getPreferredButtonSize(AbstractButton b, int textIconGap) { Rectangle contentRect; Rectangle viewRect; Rectangle iconRect = new Rectangle(); Rectangle textRect = new Rectangle(); Insets insets = b.getInsets(); Insets margin = b...
return new Dimension(insets.left + margin.left
return new Dimension(insets.left
public static Dimension getPreferredButtonSize(AbstractButton b, int textIconGap) { Rectangle contentRect; Rectangle viewRect; Rectangle iconRect = new Rectangle(); Rectangle textRect = new Rectangle(); Insets insets = b.getInsets(); Insets margin = b...
+ insets.right + margin.right, insets.top + margin.top
+ insets.right, insets.top
public static Dimension getPreferredButtonSize(AbstractButton b, int textIconGap) { Rectangle contentRect; Rectangle viewRect; Rectangle iconRect = new Rectangle(); Rectangle textRect = new Rectangle(); Insets insets = b.getInsets(); Insets margin = b...
+ insets.bottom + margin.bottom);
+ insets.bottom);
public static Dimension getPreferredButtonSize(AbstractButton b, int textIconGap) { Rectangle contentRect; Rectangle viewRect; Rectangle iconRect = new Rectangle(); Rectangle textRect = new Rectangle(); Insets insets = b.getInsets(); Insets margin = b...
return (addr == null ? hostname : addr.getHostName()) + ":" + port;
return (addr == null ? hostname : addr.toString()) + ":" + port;
public String toString() { return (addr == null ? hostname : addr.getHostName()) + ":" + port; }
raf.read(magicBuf);
boolean validRead = true;
private void checkZipFile() throws IOException, ZipException { byte[] magicBuf = new byte[4]; raf.read(magicBuf); if (readLeInt(magicBuf, 0) != LOCSIG) { raf.close(); throw new ZipException("Not a valid zip file"); } }
if (readLeInt(magicBuf, 0) != LOCSIG)
try { raf.readFully(magicBuf); } catch (EOFException eof) { validRead = false; } if (validRead == false || readLeInt(magicBuf, 0) != LOCSIG)
private void checkZipFile() throws IOException, ZipException { byte[] magicBuf = new byte[4]; raf.read(magicBuf); if (readLeInt(magicBuf, 0) != LOCSIG) { raf.close(); throw new ZipException("Not a valid zip file"); } }
if (axis == X_AXIS) return spansX[childIndex]; else return spansY[childIndex];
if (axis != X_AXIS && axis != Y_AXIS) throw new IllegalArgumentException("Illegal axis argument"); return spans[axis][childIndex];
protected int getSpan(int axis, int childIndex) { if (axis == X_AXIS) return spansX[childIndex]; else return spansY[childIndex]; }
a.x += offsetsX[index]; a.y += offsetsY[index]; a.width = spansX[index]; a.height = spansY[index];
a.x += offsets[X_AXIS][index]; a.y += offsets[Y_AXIS][index]; a.width = spans[X_AXIS][index]; a.height = spans[Y_AXIS][index];
protected void childAllocation(int index, Rectangle a) { if (! isAllocationValid()) layout(a.width, a.height); a.x += offsetsX[index]; a.y += offsetsY[index]; a.width = spansX[index]; a.height = spansY[index]; }
}
public void connect() throws IOException { if (connected) { return; } String protocol = url.getProtocol(); boolean secure = "https".equals(protocol); String host = url.getHost(); int port = url.getPort(); if (port < 0) { port = secure ? HTTPConnection.HTTPS_PORT : ...
id.setReference (ref);
public static ReferenceTypeId newReferenceTypeId (SoftReference ref) { ReferenceTypeId id; Class clazz = (Class) ref.get (); if (clazz == null) return null; if (clazz.isArray ()) id = new ArrayReferenceTypeId (); else if (clazz.isInterface ()) id = new InterfaceReferenceTypeId (); e...
TreePath start = BasicTreeUI.this.tree.getLeadSelectionPath(); DefaultMutableTreeNode last = null; if (start != null) last = (DefaultMutableTreeNode) start.getLastPathComponent(); if (last != null) { if (e.getKeyCode() == KeyEvent.VK_DOWN) { DefaultMutableTreeNode next = (DefaultMutableTreeNode) BasicTreeUI.this.getNe...
public void keyPressed(KeyEvent e) { }
if (BasicTreeUI.this.tree.isVisible(path))
if (clickCount == 2)
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = ((int) click.getY() / getRowHeight()) - 1; TreePath path = BasicTreeUI.this.tree.getPathForRow(row); if (path == null) { // nothing should be selected if user clicks outside of tree BasicT...
if (BasicTreeUI.this.tree.isRowSelected(row)) BasicTreeUI.this.tree.removeSelectionRow(row); else if (BasicTreeUI.this.tree.getSelectionModel() .getSelectionMode() == TreeSelectionModel.SINGLE_TREE_SELECTION) { BasicTreeUI.this.tree.getSelectionModel().clearSelection(); BasicTreeUI.this.tree.addSelectionRow(row);
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = ((int) click.getY() / getRowHeight()) - 1; TreePath path = BasicTreeUI.this.tree.getPathForRow(row); if (path == null) { // nothing should be selected if user clicks outside of tree BasicT...
else if (BasicTreeUI.this.tree.getSelectionModel() .getSelectionMode() == TreeSelectionModel.CONTIGUOUS_TREE_SELECTION) { } else { BasicTreeUI.this.tree.getSelectionModel().setSelectionMode( TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION); BasicTreeUI.this.tree.addSelectionRow(row); }
BasicTreeUI.this.selectPath(BasicTreeUI.this.tree, path);
public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = ((int) click.getY() / getRowHeight()) - 1; TreePath path = BasicTreeUI.this.tree.getPathForRow(row); if (path == null) { // nothing should be selected if user clicks outside of tree BasicT...
return new Rectangle(x, y, SwingUtilities.computeStringWidth(fm, s), fm.getHeight());
return new Rectangle(x, y, SwingUtilities.computeStringWidth(fm, s) + 22, fm.getHeight());
private Rectangle getCellBounds(int x, int y, Object cell) { if (cell != null) { String s = cell.toString(); Font f = tree.getFont(); FontMetrics fm = tree.getToolkit().getFontMetrics(tree.getFont()); return new Rectangle(x, y, SwingUtilities.computeStringWidth(fm, s), fm.getHeight(...
reindent(doc, ctx, offset + 1);
reindent(doc, ctx, offset);
void reindent(Document doc, Node node, int offset) { if (node.hasChildNodes()) { boolean markupContent = false; boolean textContent = false; List children = new LinkedList(); Node ctx = node.getFirstChild(); while (ctx != null) { switch (ctx.getNodeType(...
ws = buf.toString();
void reindent(Document doc, Node node, int offset) { if (node.hasChildNodes()) { boolean markupContent = false; boolean textContent = false; List children = new LinkedList(); Node ctx = node.getFirstChild(); while (ctx != null) { switch (ctx.getNodeType(...
ws = buf.toString();
void reindent(Document doc, Node node, int offset) { if (node.hasChildNodes()) { boolean markupContent = false; boolean textContent = false; List children = new LinkedList(); Node ctx = node.getFirstChild(); while (ctx != null) { switch (ctx.getNodeType(...
private static void log(Level level, String msg, Object param, Throwable t)
static void log(Level level, String msg, Object param, Throwable t)
private static void log(Level level, String msg, Object param, Throwable t) { LogRecord rec; // Return quickly if no log message will be produced. if (!LOGGER.isLoggable(level)) return; rec = new LogRecord(level, msg); if (param != null && param.getClass().isArray()) rec.setParameters((Objec...
this(null);
tab = new Hashtable();
public SimpleAttributeSet() { this(null); }
return (tab.containsKey(name) && tab.get(name).equals(value)) || (getResolveParent() != null && getResolveParent(). containsAttribute(name, value));
if (value == null) throw new NullPointerException("Null 'value' argument."); if (tab.containsKey(name)) return tab.get(name).equals(value); else { AttributeSet p = getResolveParent(); if (p != null) return p.containsAttribute(name, value); else return false; }
public boolean containsAttribute(Object name, Object value) { return (tab.containsKey(name) && tab.get(name).equals(value)) || (getResolveParent() != null && getResolveParent(). containsAttribute(name, value)); }
Object p = getResolveParent(); if (p != null && p instanceof AttributeSet) return (((AttributeSet)p).getAttribute(name));
AttributeSet p = getResolveParent(); if (p != null) return p.getAttribute(name);
public Object getAttribute(Object name) { Object val = tab.get(name); if (val != null) return val; Object p = getResolveParent(); if (p != null && p instanceof AttributeSet) return (((AttributeSet)p).getAttribute(name)); return null; }
activeObjectMap.Obj record = orb.rootPOA.findObject((org.omg.CORBA.Object) target);
AOM.Obj record = orb.rootPOA.findObject((org.omg.CORBA.Object) target);
public void unexportObject(Remote target) throws NoSuchObjectException { synchronized (m_Ties) { synchronized (m_Targets) { TieTargetRecord r = ((TieTargetRecord) m_Targets.get(target)); if (r != null) { if (target instanceof org.omg.CORBA....
generalTypeCode t = new generalTypeCode(TCKind.tk_abstract_interface);
GeneralTypeCode t = new GeneralTypeCode(TCKind.tk_abstract_interface);
public void writeAny(OutputStream output, Object object) { Any any = output.orb().create_any(); if (object == null) { generalTypeCode t = new generalTypeCode(TCKind.tk_abstract_interface); t.setId("IDL:omg.org/CORBA/AbstractBase:1.0"); t.setName(""); any.type(t); output....
generalTypeCode t = new generalTypeCode(TCKind.tk_objref);
GeneralTypeCode t = new GeneralTypeCode(TCKind.tk_objref);
void writeAnyAsRemote(OutputStream output, Object object) { generalTypeCode t = new generalTypeCode(TCKind.tk_objref); t.setId(m_ValueHandler.getRMIRepositoryID(object.getClass())); t.setName(object.getClass().getName()); // Writing Any (typecode, followed by value). output.write_TypeCode(t); write...
treeModel = createTreeModel(null);
this(createTreeModel(null));
public JTree() { treeModel = createTreeModel(null); }
return null;
return new DefaultTreeModel(new DynamicUtilTreeNode(value, value));
protected static TreeModel createTreeModel(Object value) { // FIXME: Implement this. return null; }
firePropertyChange(CELL_EDITOR_PROPERTY, oldValue, editor);
public void setCellEditor(TreeCellEditor editor) { cellEditor = editor; }
firePropertyChange(CELL_RENDERER_PROPERTY, oldValue, newRenderer);
public void setCellRenderer(TreeCellRenderer newRenderer) { cellRenderer = newRenderer; }
firePropertyChange("editable", oldValue, editable);
firePropertyChange(EDITABLE_PROPERTY, oldValue, editable);
public void setEditable(boolean flag) { if (editable == flag) return; boolean oldValue = editable; editable = flag; firePropertyChange("editable", oldValue, editable); }
firePropertyChange(INVOKES_STOP_CELL_EDITING_PROPERTY, oldValue, invoke);
public void setInvokesStopCellEditing(boolean invoke) { invokesStopCellEditing = invoke; }
firePropertyChange(LARGE_MODEL_PROPERTY, oldValue, large);
public void setLargeModel(boolean large) { largeModel = large; }
firePropertyChange(TREE_MODEL_PROPERTY, oldValue, model);
public void setModel(TreeModel model) { treeModel = model; }
firePropertyChange(ROOT_VISIBLE_PROPERTY, oldValue, flag);
public void setRootVisible(boolean flag) { rootVisible = flag; }
firePropertyChange(ROW_HEIGHT_PROPERTY, oldValue, height);
public void setRowHeight(int height) { rowHeight = height; }
firePropertyChange(SCROLLS_ON_EXPAND_PROPERTY, oldValue, scroll);
public void setScrollsOnExpand(boolean scroll) { scrollsOnExpand = scroll; }
firePropertyChange(SELECTION_MODEL_PROPERTY, oldValue, model);
public void setSelectionModel(TreeSelectionModel model) { selectionModel = model; }
firePropertyChange(SHOWS_ROOT_HANDLES_PROPERTY, oldValue, flag);
public void setShowsRootHandles(boolean flag) { showsRootHandles = flag; }
firePropertyChange(TOGGLE_CLICK_COUNT_PROPERTY, oldValue, count);
public void setToggleClickCount(int count) { toggleClickCount = count; }
firePropertyChange(VISIBLE_ROW_COUNT_PROPERTY, oldValue, rows);
public void setVisibleRowCount(int rows) { visibleRowCount = rows; }
revalidate(); repaint();
public void updateUI() { setUI((TreeUI) UIManager.getUI(this)); }
out.print(currentPrompt); currentLine.start(console);
out.print(currentPrompt + currentLine.getContent()); currentLine.start(console, true);
CompletionInfo complete(String partial) { // workaround to set the currentShell to this shell try { ShellUtils.getShellManager().registerShell(this); } catch (NameNotFoundException ex) { } completion = new CompletionInfo(); String result = null; try { ...
private static final int scanFormat (String pat, int index, StringBuffer buffer, Vector elts, Locale locale)
private static int scanFormat(String pat, int index, StringBuffer buffer, Vector elts, Locale locale)
private static final int scanFormat (String pat, int index, StringBuffer buffer, Vector elts, Locale locale) { MessageFormatElement mfe = new MessageFormatElement (); elts.addElement(mfe); int max = pat.length(); // Skip the opening `{'. ++index; // Fetch the argument number. ...
private static final int scanFormatElement (String pat, int index, StringBuffer buffer, char term)
private static int scanFormatElement(String pat, int index, StringBuffer buffer, char term)
private static final int scanFormatElement (String pat, int index, StringBuffer buffer, char term) { int max = pat.length(); buffer.setLength(0); int brace_depth = 1; for (; index < max; ++index) { char c = pat.charAt(index); if (c == '\'' && index + 2 < max && pat.charAt(index +...
private static final int scanString (String pat, int index, StringBuffer buffer)
private static int scanString(String pat, int index, StringBuffer buffer)
private static final int scanString (String pat, int index, StringBuffer buffer) { int max = pat.length(); buffer.setLength(0); for (; index < max; ++index) { char c = pat.charAt(index); if (c == '\'' && index + 2 < max && pat.charAt(index + 2) == '\'') { buffer.append(pat.charAt(index ...
public static short reverseBytes(int val)
public static short reverseBytes(short val)
public static short reverseBytes(int val) { return (short) (((val >> 8) & 0xff) | ((val << 8) & 0xff00)); }
offset = fh.SIZE + ih.SIZE;
offset = BMPFileHeader.SIZE + BMPInfoHeader.SIZE;
public BMPDecoder(BMPFileHeader fh, BMPInfoHeader ih){ fileHeader = fh; infoHeader = ih; offset = fh.SIZE + ih.SIZE; }
super(in.markSupported() ? in : new BufferedInputStream(in));
this.in = in.markSupported() ? in : new BufferedInputStream(in);
public CRLFInputStream(InputStream in) { super(in.markSupported() ? in : new BufferedInputStream(in)); }
return null;
HashSet actionSet = new HashSet(); for (int i = 0; i < list1.length; ++i) actionSet.add(list1[i]); for (int i = 0; i < list2.length; ++i) actionSet.add(list2[i]); ArrayList list = new ArrayList(actionSet); return (Action[]) list.toArray(new Action[actionSet.size()]);
public static final Action[] augmentList(Action[] list1, Action[] list2) { return null; // TODO }
if (event.getSource() != null && event.getSource() instanceof JTextComponent)
if (event.getSource() instanceof JTextComponent)
protected final JTextComponent getTextComponent(ActionEvent event) { if (event.getSource() != null && event.getSource() instanceof JTextComponent) return (JTextComponent) event.getSource(); else return getFocusedComponent(); }
else
protected final JTextComponent getTextComponent(ActionEvent event) { if (event.getSource() != null && event.getSource() instanceof JTextComponent) return (JTextComponent) event.getSource(); else return getFocusedComponent(); }
getAwtContext().adjustDesktopSize(screenSize.width, screenSize.height); onResize();
public Dimension changeScreenSize(String screenSizeId) { final JNodeFrameBufferDevice dev = (JNodeFrameBufferDevice) GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice(); if (dev == null) { throw new AWTError("No framebuffer device found"); } GraphicsConf...
else { position(limit()); limit(capacity()); }
public DoubleBuffer compact () { if (position () > 0) { int count = limit () - position (); bb.shiftDown(offset, offset + 8 * position(), 8 * count); position (count); limit (capacity ()); } return this; }
int max = 10;
int max = 20;
public final void debugStackTrace() { Address f = Unsafe.getCurrentFrame(); Unsafe.debug("Debug stacktrace: "); boolean first = true; int max = 10; while (isValid(f) && (max > 0)) { if (first) { first = false; } else { Unsafe.debug(", "); } final VmMethod method = getMethod(f); final VmType vmClas...
Unsafe.debug(lineNr);
public final void debugStackTrace() { Address f = Unsafe.getCurrentFrame(); Unsafe.debug("Debug stacktrace: "); boolean first = true; int max = 10; while (isValid(f) && (max > 0)) { if (first) { first = false; } else { Unsafe.debug(", "); } final VmMethod method = getMethod(f); final VmType vmClas...
ORB orb = Restricted_ORB.Singleton;
ORB orb = OrbRestricted.Singleton;
public static synchronized TypeCode type() { if (typeCode == null) { synchronized (TypeCode.class) { if (typeCode == null) { if (active) { return ORB.init().create_recursive_tc(id()); } ...
catch (NoSuchAlgorithmException ignored)
catch (NoSuchAlgorithmException e)
public static CertPathBuilder getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] p = Security.getProviders(); for (int i = 0; i < p.length; i++) { try { return getInstance(algorithm, p[i]); } catch (NoSuchAlgorithmException ignored) ...
{ found = opt; break; } if (shortName != 0 && opt.getShortName() == shortName)
private void handleLongOption(String real, int index) throws OptionException { String option = real.substring(index); String justName = option; int eq = option.indexOf('='); if (eq != - 1) justName = option.substring(0, eq); Option found = null; for (int i = options.size() - 1; i >= 0; --i) ...
if (rowLead == rowModel.getMaxSelectionIndex()) { rowModel.addSelectionInterval(rowModel.getMinSelectionIndex(), rowModel.getMinSelectionIndex());
int rowMaxSelected = table.getRowSelectionAllowed() ? rowModel.getMaxSelectionIndex() : table.getModel().getRowCount() - 1; int rowMinSelected = table.getRowSelectionAllowed() ? rowModel.getMinSelectionIndex() : 0; int colMaxSelected = table.getColumnSelectionAllowed() ? colModel.getMaxSelectionIndex() : table.getModel...
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
if (colLead == colModel.getMaxSelectionIndex()) colModel.addSelectionInterval(colModel.getMinSelectionIndex(), colModel.getMinSelectionIndex());
if (colLead == colMaxSelected) colModel.addSelectionInterval(colMinSelected, colMinSelected);
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
int[] colsSelected = table.getSelectedColumns();
int[] colsSelected; if (table.getColumnSelectionAllowed()) colsSelected = table.getSelectedColumns(); else { colsSelected = new int[table.getModel().getColumnCount()]; for (int i = 0; i < table.getModel().getColumnCount(); i++) colsSelected[i] = i; }
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
int[] rowsSelected = table.getSelectedRows();
int[] rowsSelected; if (table.getRowSelectionAllowed()) rowsSelected = table.getSelectedRows(); else { rowsSelected = new int[table.getModel().getRowCount()]; for (int i = 0; i < table.getModel().getRowCount(); i++) rowsSelected[i] = i; }
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...