rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
table.repaint();
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 (table.isCellSelected(r, c))
if (table.getSelectionModel().getLeadSelectionIndex() == r && table.getColumnModel().getSelectionModel(). getLeadSelectionIndex() == c)
public void paint(Graphics gfx, JComponent ignored) { int ncols = table.getColumnCount(); int nrows = table.getRowCount(); if (nrows == 0 || ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableColumnModel cols = table.getColumnModel(); int height = table.getRowHeight(); int x0 =...
return decodeDSSPrivateKey((DSAPrivateKeySpec) keySpec); if (keySpec instanceof RSAPrivateCrtKeySpec) return decodeRSAPrivateKey((RSAPrivateCrtKeySpec) keySpec); if (keySpec instanceof DHPrivateKeySpec) return decodeDHPrivateKey((DHPrivateKeySpec) keySpec);
result = decodeDSSPrivateKey((DSAPrivateKeySpec) keySpec); else if (keySpec instanceof RSAPrivateCrtKeySpec) result = decodeRSAPrivateKey((RSAPrivateCrtKeySpec) keySpec); else if (keySpec instanceof DHPrivateKeySpec) result = decodeDHPrivateKey((DHPrivateKeySpec) keySpec); else {
protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException { if (keySpec instanceof DSAPrivateKeySpec) return decodeDSSPrivateKey((DSAPrivateKeySpec) keySpec); if (keySpec instanceof RSAPrivateCrtKeySpec) return decodeRSAPrivateKey((RSAPrivateCrtKeySpec) keySpec);...
boolean ok = false;
protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException { if (keySpec instanceof DSAPrivateKeySpec) return decodeDSSPrivateKey((DSAPrivateKeySpec) keySpec); if (keySpec instanceof RSAPrivateCrtKeySpec) return decodeRSAPrivateKey((RSAPrivateCrtKeySpec) keySpec);...
return DSSPrivateKey.valueOf(input);
result = DSSPrivateKey.valueOf(input); ok = true;
protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException { if (keySpec instanceof DSAPrivateKeySpec) return decodeDSSPrivateKey((DSAPrivateKeySpec) keySpec); if (keySpec instanceof RSAPrivateCrtKeySpec) return decodeRSAPrivateKey((RSAPrivateCrtKeySpec) keySpec);...
if (! ok)
protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException { if (keySpec instanceof DSAPrivateKeySpec) return decodeDSSPrivateKey((DSAPrivateKeySpec) keySpec); if (keySpec instanceof RSAPrivateCrtKeySpec) return decodeRSAPrivateKey((RSAPrivateCrtKeySpec) keySpec);...
return GnuRSAPrivateKey.valueOf(input);
result = GnuRSAPrivateKey.valueOf(input); ok = true;
protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException { if (keySpec instanceof DSAPrivateKeySpec) return decodeDSSPrivateKey((DSAPrivateKeySpec) keySpec); if (keySpec instanceof RSAPrivateCrtKeySpec) return decodeRSAPrivateKey((RSAPrivateCrtKeySpec) keySpec);...
return decodeDHPrivateKey(input);
log.exiting(this.getClass().getName(), "engineGeneratePrivate()", result); return result;
protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException { if (keySpec instanceof DSAPrivateKeySpec) return decodeDSSPrivateKey((DSAPrivateKeySpec) keySpec); if (keySpec instanceof RSAPrivateCrtKeySpec) return decodeRSAPrivateKey((RSAPrivateCrtKeySpec) keySpec);...
return decodeDSSPublicKey((DSAPublicKeySpec) keySpec); if (keySpec instanceof RSAPublicKeySpec) return decodeRSAPublicKey((RSAPublicKeySpec) keySpec); if (keySpec instanceof DHPublicKeySpec) return decodeDHPublicKey((DHPublicKeySpec) keySpec);
result = decodeDSSPublicKey((DSAPublicKeySpec) keySpec); else if (keySpec instanceof RSAPublicKeySpec) result = decodeRSAPublicKey((RSAPublicKeySpec) keySpec); else if (keySpec instanceof DHPublicKeySpec) result = decodeDHPublicKey((DHPublicKeySpec) keySpec); else {
protected PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException { if (keySpec instanceof DSAPublicKeySpec) return decodeDSSPublicKey((DSAPublicKeySpec) keySpec); if (keySpec instanceof RSAPublicKeySpec) return decodeRSAPublicKey((RSAPublicKeySpec) keySpec); if (keySpe...
boolean ok = false;
protected PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException { if (keySpec instanceof DSAPublicKeySpec) return decodeDSSPublicKey((DSAPublicKeySpec) keySpec); if (keySpec instanceof RSAPublicKeySpec) return decodeRSAPublicKey((RSAPublicKeySpec) keySpec); if (keySpe...
return DSSPublicKey.valueOf(input);
result = DSSPublicKey.valueOf(input); ok = true;
protected PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException { if (keySpec instanceof DSAPublicKeySpec) return decodeDSSPublicKey((DSAPublicKeySpec) keySpec); if (keySpec instanceof RSAPublicKeySpec) return decodeRSAPublicKey((RSAPublicKeySpec) keySpec); if (keySpe...
if (! ok)
protected PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException { if (keySpec instanceof DSAPublicKeySpec) return decodeDSSPublicKey((DSAPublicKeySpec) keySpec); if (keySpec instanceof RSAPublicKeySpec) return decodeRSAPublicKey((RSAPublicKeySpec) keySpec); if (keySpe...
return GnuRSAPublicKey.valueOf(input);
result = GnuRSAPublicKey.valueOf(input); ok = true;
protected PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException { if (keySpec instanceof DSAPublicKeySpec) return decodeDSSPublicKey((DSAPublicKeySpec) keySpec); if (keySpec instanceof RSAPublicKeySpec) return decodeRSAPublicKey((RSAPublicKeySpec) keySpec); if (keySpe...
return decodeDHPublicKey(input);
if (! ok) result = decodeDHPublicKey(input); } log.exiting(this.getClass().getName(), "engineGeneratePublic()", result); return result;
protected PublicKey engineGeneratePublic(KeySpec keySpec) throws InvalidKeySpecException { if (keySpec instanceof DSAPublicKeySpec) return decodeDSSPublicKey((DSAPublicKeySpec) keySpec); if (keySpec instanceof RSAPublicKeySpec) return decodeRSAPublicKey((RSAPublicKeySpec) keySpec); if (keySpe...
public void doPass2(BootableHashMap liveVariables) {
public void doPass2() { phi.simplify();
public void doPass2(BootableHashMap liveVariables) { // TODO Auto-generated method stub }
return null;
return operand;
public Operand propagate(Variable operand) { // TODO Auto-generated method stub return null; }
super.remove(c);
super.remove(index);
public void removeTabAt(int index) { checkIndex(index, 0, tabs.size()); Component c = getComponentAt(index); super.remove(c); c.show(); tabs.remove(index); }
listener.addListener(l);
editor.addActionListener(l);
public void addActionListener(ActionListener l) { listener.addListener(l); }
listener.removeListener(l);
editor.removeActionListener(l);
public void removeActionListener(ActionListener l) { listener.removeListener(l); }
final String cmdLine = VmSystem.getCmdLine(); if (cmdLine.indexOf("mp=no") >= 0) { return; } final MPFloatingPointerStructure mp = MPFloatingPointerStructure.find( rm, ResourceOwner.SYSTEM); if (mp == null) { BootLog.info("No MP table found"); return; } try { BootLog.info("Found " + mp); this.mpConfigTable = mp.getM...
protected void initializeProcessors(ResourceManager rm) { final String cmdLine = VmSystem.getCmdLine(); if (cmdLine.indexOf("mp=no") >= 0) { return; } // final MPFloatingPointerStructure mp = MPFloatingPointerStructure.find( rm, ResourceOw...
if (mpConfigTable == null) { return; }
final String cmdLine = VmSystem.getCmdLine(); if (cmdLine.indexOf("mp=no") >= 0) { return; }
protected void initializeProcessors(ResourceManager rm) { final String cmdLine = VmSystem.getCmdLine(); if (cmdLine.indexOf("mp=no") >= 0) { return; } // final MPFloatingPointerStructure mp = MPFloatingPointerStructure.find( rm, ResourceOw...
mpConfigTable.dump(System.out); final ResourceOwner owner = ResourceOwner.SYSTEM; try { localAPIC = new LocalAPIC(rm, owner, mpConfigTable .getLocalApicAddress()); } catch (ResourceNotFreeException ex) { BootLog.error("Cannot claim APIC region"); return; }
final MPFloatingPointerStructure mp = MPFloatingPointerStructure.find( rm, ResourceOwner.SYSTEM); if (mp == null) { BootLog.info("No MP table found"); return; } try { BootLog.info("Found " + mp); this.mpConfigTable = mp.getMPConfigTable(); } finally { mp.release(); }
protected void initializeProcessors(ResourceManager rm) { final String cmdLine = VmSystem.getCmdLine(); if (cmdLine.indexOf("mp=no") >= 0) { return; } // final MPFloatingPointerStructure mp = MPFloatingPointerStructure.find( rm, ResourceOw...
final VmX86Processor cpu = (VmX86Processor) Unsafe .getCurrentProcessor(); cpu.setApic(localAPIC); cpu.loadAndSetApicID(); for (Iterator i = mpConfigTable.entries().iterator(); i.hasNext(); ) { final MPEntry entry = (MPEntry)i.next(); if (entry instanceof MPIOAPICEntry) { final MPIOAPICEntry apicEntry = (MPIOAPICEntr...
if (mpConfigTable == null) { return; }
protected void initializeProcessors(ResourceManager rm) { final String cmdLine = VmSystem.getCmdLine(); if (cmdLine.indexOf("mp=no") >= 0) { return; } // final MPFloatingPointerStructure mp = MPFloatingPointerStructure.find( rm, ResourceOw...
try { VmX86Processor.detectAndstartLogicalProcessors(rm); } catch (ResourceNotFreeException ex) { BootLog.error("Cannot claim region for logical processor startup", ex); }
mpConfigTable.dump(System.out); final ResourceOwner owner = ResourceOwner.SYSTEM; try { localAPIC = new LocalAPIC(rm, owner, mpConfigTable .getLocalApicAddress()); } catch (ResourceNotFreeException ex) { BootLog.error("Cannot claim APIC region"); return; }
protected void initializeProcessors(ResourceManager rm) { final String cmdLine = VmSystem.getCmdLine(); if (cmdLine.indexOf("mp=no") >= 0) { return; } // final MPFloatingPointerStructure mp = MPFloatingPointerStructure.find( rm, ResourceOw...
for (Iterator i = mpConfigTable.entries().iterator(); i.hasNext();) { final MPEntry e = (MPEntry) i.next(); if (e.getEntryType() == 0) { final MPProcessorEntry cpuEntry = (MPProcessorEntry) e; if (cpuEntry.isEnabled() && !cpuEntry.isBootstrap()) { final VmX86Processor newCpu = (VmX86Processor) createProcessor( cpuEntr...
final VmX86Processor cpu = (VmX86Processor) Unsafe .getCurrentProcessor(); cpu.setApic(localAPIC); cpu.loadAndSetApicID(); for (Iterator i = mpConfigTable.entries().iterator(); i.hasNext();) { final MPEntry entry = (MPEntry) i.next(); if (entry instanceof MPIOAPICEntry) { final MPIOAPICEntry apicEntry = (MPIOAPICEntr...
protected void initializeProcessors(ResourceManager rm) { final String cmdLine = VmSystem.getCmdLine(); if (cmdLine.indexOf("mp=no") >= 0) { return; } // final MPFloatingPointerStructure mp = MPFloatingPointerStructure.find( rm, ResourceOw...
public static PropertyEditor findEditor(Class editedClass) { try {
public static PropertyEditor findEditor(Class editedClass) { try { Class found = (Class)editors.get(editedClass); if(found != null) { return (PropertyEditor)found.newInstance(); }
public static PropertyEditor findEditor(Class editedClass) { try { Class found = (Class)editors.get(editedClass); if(found != null) { return (PropertyEditor)found.newInstance(); } try { found = Class.forName(editedClass.getName()+"Editor"); registerEditor(editedClass,found); return (PropertyEditor)found.n...
Class found = (Class)editors.get(editedClass); if(found != null) { return (PropertyEditor)found.newInstance(); }
ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
public static PropertyEditor findEditor(Class editedClass) { try { Class found = (Class)editors.get(editedClass); if(found != null) { return (PropertyEditor)found.newInstance(); } try { found = Class.forName(editedClass.getName()+"Editor"); registerEditor(editedClass,found); return (PropertyEditor)found.n...
try { found = Class.forName(editedClass.getName()+"Editor"); registerEditor(editedClass,found); return (PropertyEditor)found.newInstance(); } catch(ClassNotFoundException E) { }
try { found = Class.forName(editedClass.getName()+"Editor", true, contextClassLoader); registerEditor(editedClass,found); return (PropertyEditor)found.newInstance(); } catch(ClassNotFoundException E) { }
public static PropertyEditor findEditor(Class editedClass) { try { Class found = (Class)editors.get(editedClass); if(found != null) { return (PropertyEditor)found.newInstance(); } try { found = Class.forName(editedClass.getName()+"Editor"); registerEditor(editedClass,found); return (PropertyEditor)found.n...
String appendName = "." + ClassHelper.getTruncatedClassName(editedClass) + "Editor"; synchronized(editorSearchPath) { for(int i=0;i<editorSearchPath.length;i++) { try { found = Class.forName(editorSearchPath[i] + appendName); registerEditor(editedClass,found); return (PropertyEditor)found.newInstance(); } catch(ClassNo...
String appendName = "." + ClassHelper.getTruncatedClassName(editedClass) + "Editor"; synchronized(editorSearchPath) { for(int i=0;i<editorSearchPath.length;i++) { try { found = Class.forName(editorSearchPath[i] + appendName, true, contextClassLoader); registerEditor(editedClass,found); return (PropertyEditor)found.newI...
public static PropertyEditor findEditor(Class editedClass) { try { Class found = (Class)editors.get(editedClass); if(found != null) { return (PropertyEditor)found.newInstance(); } try { found = Class.forName(editedClass.getName()+"Editor"); registerEditor(editedClass,found); return (PropertyEditor)found.n...
throw new AssertionError("values must be parseable");
AssertionError ae; ae = new AssertionError("values must be parseable"); ae.initCause(pe); throw ae;
private void checkValidInput() { JFormattedTextField ftf = getFormattedTextField(); try { Object newval = stringToValue(ftf.getText()); } catch (ParseException ex) { if (!allowsInvalid) { // roll back the input if invalid edits are not...
Streamable holder = holderFactory.createHolder(type);
Streamable holder = HolderLocator.createHolder(type);
public DynAny create_simple(TypeCode official, TypeCode type) { Streamable holder = holderFactory.createHolder(type); return new gnuDynAny(holder, official, type, this, orb); }
} else if (false) {
} else if (true) {
public static void classCastFailed(Object object) { if (object == null) { throw new ClassCastException("Object is null"); } else if (false) { final Object[] tib = VmMagic.getTIB(object); if (tib == null) { throw new ClassCastException(object.getClass().g...
notImplemented();
private final void requestRegister(Register reg, Item it) { X86RegisterPool pool = eContext.getPool(); // check item doesn't already use register if (!it.uses(reg)) { if (!pool.isFree(reg)) { notImplemented(); //TODO: spill register; make sure th...
final Item i = (Item)pool.getOwner(reg); i.spill(eContext, reg); assertCondition(pool.isFree(reg));
private final void requestRegister(Register reg, Item it) { X86RegisterPool pool = eContext.getPool(); // check item doesn't already use register if (!it.uses(reg)) { if (!pool.isFree(reg)) { notImplemented(); //TODO: spill register; make sure th...
Item count = vstack.popInt(); count.release(eContext);
public final void visit_anewarray(VmConstClass classRef) { vstack.push(eContext); writeResolveAndLoadClassToEAX(classRef, S0); helper.writePOP(S0); /* Count */ stackFrame.writePushMethodRef(); helper.writePUSH(EAX); /* Class */ helper.writePUSH(S0); /* Count */ helpe...
i.release(eContext);
public final void visit_areturn() { RefItem i = vstack.popRef(); requestRegister(EAX, i); i.loadTo(eContext, EAX); visit_return(); i.release(eContext); }
vstack.pushItem(DoubleItem.createStack());
public final void visit_dastore() { //TODO: port to orp-style vstack.push(eContext); Item val = vstack.popItem(Item.DOUBLE); IntItem idx = vstack.popInt(); RefItem ref = vstack.popRef(); val.release(eContext); idx.release(eContext); ref.release(eContext); ...
vstack.push(eContext);
public final void visit_dcmpg() { //TODO: port to orp-style vstack.push(eContext); visit_dfcmp(true, false); }
vstack.push(eContext);
public final void visit_dcmpl() { //TODO: port to orp-style vstack.push(eContext); visit_dfcmp(false, false); }
helper.writePUSH(Register.ECX);
final X86RegisterPool pool = eContext.getPool(); pool.request(Register.ECX); IntItem res = IntItem.createRegister(Register.ECX); pool.transferOwnerTo(Register.ECX, res); vstack.pushItem(res);
private void visit_dfcmp(boolean gt, boolean isfloat) { //TODO: port to orp-style vstack.push(eContext); Item v1 = vstack.popItem(isfloat ? Item.FLOAT : Item.DOUBLE); Item v2 = vstack.popItem(isfloat ? Item.FLOAT : Item.DOUBLE); v1.release(eContext); v2.release(eContext); ...
vstack.push(eContext);
public final void visit_faload() { IntItem idx = vstack.popInt(); RefItem ref = vstack.popRef(); idx.loadIf(eContext, ~Item.CONSTANT); ref.load(eContext); Register refReg = ref.getRegister(); checkBounds(ref, idx); //IMPROVE: load to ST if (idx.getKind() == It...
v.release(eContext);
public final void visit_ireturn() { IntItem v = vstack.popInt(); requestRegister(EAX, v); v.loadTo(eContext, EAX); visit_return(); v.release(eContext); }
requestRegister(ECX, shift);
if (shift.getKind() != Item.CONSTANT) { requestRegister(ECX, shift); shift.loadTo(eContext, ECX); }
public final void visit_iushr() { IntItem shift = vstack.popInt(); requestRegister(ECX, shift); IntItem value = vstack.popInt(); shift.loadToIf(eContext, ~Item.CONSTANT, ECX); value.load(eContext); Register v = value.getRegister(); if (shift.getKind() == Item.CONSTAN...
shift.loadToIf(eContext, ~Item.CONSTANT, ECX);
public final void visit_iushr() { IntItem shift = vstack.popInt(); requestRegister(ECX, shift); IntItem value = vstack.popInt(); shift.loadToIf(eContext, ~Item.CONSTANT, ECX); value.load(eContext); Register v = value.getRegister(); if (shift.getKind() == Item.CONSTAN...
val.release(eContext);
public final void visit_lastore() { //TODO: port to orp-style vstack.push(eContext); IntItem idx = vstack.popInt(); RefItem ref = vstack.popRef(); idx.release(eContext); ref.release(eContext); os.writeMOV(INTSIZE, T0, SP, 8); // Index os.writeMOV(INTSIZE, S0, ...
key.load(eContext);
public final void visit_lookupswitch(int defAddress, int[] matchValues, int[] addresses) { final int n = matchValues.length; //BootLog.debug("lookupswitch length=" + n); IntItem key = vstack.popInt(); Register r = key.getRegister(); // Conservative assumption, flush sta...
Item v2 = vstack.popItem(Item.LONG); Item v1 = vstack.popItem(Item.LONG);
Item v2 = vstack.popItem(Item.INT); Item v1 = vstack.popItem(Item.LONG);
public final void visit_lushr() { //TODO: port to orp-style vstack.push(eContext); Item v2 = vstack.popItem(Item.LONG); Item v1 = vstack.popItem(Item.LONG); v2.release(eContext); v1.release(eContext); vstack.pushItem(LongItem.createStack()); helper.writePOP(Re...
"FormattedTextFieldUI", "javax.swing.plaf.basic.BasicFormattedTextFieldUI",
protected void initClassDefaults(UIDefaults defaults) { // Variables Object[] uiDefaults; // Initialize Class Defaults uiDefaults = new Object[] { "ButtonUI", "javax.swing.plaf.basic.BasicButtonUI", "CheckBoxMenuItemUI", "javax.swing.plaf.basic.BasicCheckBoxMenuItemUI", "CheckBoxUI", "java...
Enumeration enum;
Enumeration e;
private void loadResourceBundle(UIDefaults defaults) { ResourceBundle bundle; Enumeration enum; String key; String value; bundle = ResourceBundle.getBundle("resources/basic"); // Process Resources enum = bundle.getKeys(); while (enum.hasMoreElements()) { key = (String) enum.nextEl...
enum = bundle.getKeys(); while (enum.hasMoreElements())
e = bundle.getKeys(); while (e.hasMoreElements())
private void loadResourceBundle(UIDefaults defaults) { ResourceBundle bundle; Enumeration enum; String key; String value; bundle = ResourceBundle.getBundle("resources/basic"); // Process Resources enum = bundle.getKeys(); while (enum.hasMoreElements()) { key = (String) enum.nextEl...
key = (String) enum.nextElement();
key = (String) e.nextElement();
private void loadResourceBundle(UIDefaults defaults) { ResourceBundle bundle; Enumeration enum; String key; String value; bundle = ResourceBundle.getBundle("resources/basic"); // Process Resources enum = bundle.getKeys(); while (enum.hasMoreElements()) { key = (String) enum.nextEl...
}
private void loadResourceBundle(UIDefaults defaults) { ResourceBundle bundle; Enumeration enum; String key; String value; bundle = ResourceBundle.getBundle("resources/basic"); // Process Resources enum = bundle.getKeys(); while (enum.hasMoreElements()) { key = (String) enum.nextEl...
int useIndex = (pure) ? 0 : nextSub + numSubs;
int useIndex = (pure || lookAhead) ? 0 : nextSub + numSubs;
protected void initialize(Object patternObj, int cflags, RESyntax syntax, int myIndex, int nextSub) throws REException { char[] pattern; if (patternObj instanceof String) { pattern = ((String) patternObj).toCharArray(); } else if (patternObj instanceof char[]) { pattern = (char[]) patternObj; ...
if (lookAhead) { currentToken = new RETokenLookAhead(currentToken,negativelh); }
protected void initialize(Object patternObj, int cflags, RESyntax syntax, int myIndex, int nextSub) throws REException { char[] pattern; if (patternObj instanceof String) { pattern = ((String) patternObj).toCharArray(); } else if (patternObj instanceof char[]) { pattern = (char[]) patternObj; ...
public static AbstractColorChooserPanel[] getDefaultChooserPanels() { return null; }
public static AbstractColorChooserPanel[] getDefaultChooserPanels() { AbstractColorChooserPanel[] values = { new DefaultSwatchChooserPanel(), new DefaultHSBChooserPanel(), new DefaultRGBChooserPanel() }; return values; }
public static AbstractColorChooserPanel[] getDefaultChooserPanels() { return null; // TODO } // getDefaultChooserPanels()
public static JComponent getPreviewPanel() { return null;
public static JComponent getPreviewPanel() { return new DefaultPreviewPanel();
public static JComponent getPreviewPanel() { return null; // TODO } // getPreviewPanel()
if (progressBar.getOrientation() == JProgressBar.VERTICAL) return;
String str = progressBar.getString(); int full = getAmountFull(b, width, height);
protected void paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b) { // FIXME: We do not support vertical text painting because Java2D is needed // for this. if (progressBar.getOrientation() == JProgressBar.VERTICAL) return; // We want t...
FontMetrics fm = g.getFontMetrics(progressBar.getFont()); int full = getAmountFull(b, width, height); String str = progressBar.getString();
protected void paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b) { // FIXME: We do not support vertical text painting because Java2D is needed // for this. if (progressBar.getOrientation() == JProgressBar.VERTICAL) return; // We want t...
if (progressBar.getOrientation() == JProgressBar.VERTICAL) { AffineTransform rotate = AffineTransform.getRotateInstance(Math.PI / 2); g.setFont(progressBar.getFont().deriveFont(rotate)); }
protected void paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b) { // FIXME: We do not support vertical text painting because Java2D is needed // for this. if (progressBar.getOrientation() == JProgressBar.VERTICAL) return; // We want t...
g.drawString(str, placement.x, placement.y + fm.getAscent());
g.drawString(str, placement.x, placement.y);
protected void paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b) { // FIXME: We do not support vertical text painting because Java2D is needed // for this. if (progressBar.getOrientation() == JProgressBar.VERTICAL) return; // We want t...
Point p = t.modelToView(t.getCaret().getDot()).getLocation(); int cur = t.getCaretPosition(); int y = p.y; while (y == p.y && cur > 0) y = t.modelToView(--cur).getLocation().y; if (cur != 0) cur++; t.setCaretPosition(cur);
int offs = Utilities.getRowStart(t, t.getCaretPosition()); if (offs > -1) { Caret c = t.getCaret(); c.setDot(offs); c.setMagicCaretPosition(t.modelToView(offs).getLocation()); }
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); try { // TODO: There is a more efficent solution, but // viewToModel doesn't work properly. Point p = t.modelToView(t.getCaret().getDot()).getLocation(); int c...
try { Point p = t.modelToView(t.getCaret().getDot()).getLocation(); int cur = t.getCaretPosition(); int y = p.y; int length = t.getDocument().getLength(); while (y == p.y && cur < length) y = t.modelToView(++cur).getLocation().y; if (cur != length) cur--; t.moveCaretPosition(cur); } catch (BadLocationException ble) { ...
if (t != null) { int offs = t.getCaretPosition() + 1; if(offs <= t.getDocument().getLength()) { Caret c = t.getCaret(); c.moveDot(offs); try { c.setMagicCaretPosition(t.modelToView(offs).getLocation()); } catch(BadLocationException ble) { } } }
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); try { Point p = t.modelToView(t.getCaret().getDot()).getLocation(); int cur = t.getCaretPosition(); int y = p.y; int length = t.getDocument().getLength(); wh...
t.moveCaretPosition(t.getDocument().getLength());
try { if (t != null) { Caret c = t.getCaret(); int x = c.getMagicCaretPosition().x; int pos = Utilities.getPositionAbove(t, t.getCaretPosition(), x); if (pos > -1) t.moveCaretPosition(pos); } } catch(BadLocationException ble) { }
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); t.moveCaretPosition(t.getDocument().getLength()); }
t.moveCaretPosition(0);
try { if (t != null) { Caret c = t.getCaret(); int x = c.getMagicCaretPosition().x; int pos = Utilities.getPositionBelow(t, t.getCaretPosition(), x); if (pos > -1) t.moveCaretPosition(pos); } } catch(BadLocationException ble) { }
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); t.moveCaretPosition(0); }
Point p = t.modelToView(t.getCaret().getDot()).getLocation(); int cur = t.getCaretPosition(); int y = p.y; int length = t.getDocument().getLength(); while (y == p.y && cur < length) y = t.modelToView(++cur).getLocation().y; if (cur != length) cur--; t.setCaretPosition(cur);
int offs = Utilities.getRowEnd(t, t.getCaretPosition()); if (offs > -1) { Caret c = t.getCaret(); c.setDot(offs); c.setMagicCaretPosition(t.modelToView(offs).getLocation()); }
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); try { Point p = t.modelToView(t.getCaret().getDot()).getLocation(); int cur = t.getCaretPosition(); int y = p.y; int length = t.getDocument().getLength(); wh...
t.setCaretPosition(pos);
Caret c = t.getCaret(); c.setDot(pos); c.setMagicCaretPosition(t.modelToView(pos).getLocation());
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { try { int pos = t.getSelectionStart(); int len = t.getSelectionEnd() - pos; if (len > 0) ...
t.getDocument().remove(pos, len); t.setCaretPosition(pos);
pos--; t.getDocument().remove(pos, 1); Caret c = t.getCaret(); c.setDot(pos); c.setMagicCaretPosition(t.modelToView(pos).getLocation());
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { try { int pos = t.getSelectionStart(); int len = t.getSelectionEnd() - pos; if (len > 0) ...
else if (pos > 0) t.getDocument().remove(pos - 1, 1);
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { try { int pos = t.getSelectionStart(); int len = t.getSelectionEnd() - pos; if (len > 0) ...
t.getCaret().setDot(Math.max(t.getCaret().getDot() - 1, t.getDocument().getStartPosition().getOffset()));
int offs = t.getCaretPosition() - 1; if (offs >= 0) { Caret c = t.getCaret(); c.setDot(offs); try { c.setMagicCaretPosition(t.modelToView(offs).getLocation()); } catch (BadLocationException ble) { } }
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { t.getCaret().setDot(Math.max(t.getCaret().getDot() - 1, t.getDocument().getStartPosition().getOffset())); } }
t.getCaret().setDot(Math.min(t.getCaret().getDot() + 1, t.getDocument().getEndPosition().getOffset()));
int offs = t.getCaretPosition() + 1; if (offs <= t.getDocument().getLength()) { Caret c = t.getCaret(); c.setDot(offs); try { c.setMagicCaretPosition(t.modelToView(offs).getLocation()); } catch (BadLocationException ble) { } }
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { t.getCaret().setDot(Math.min(t.getCaret().getDot() + 1, t.getDocument().getEndPosition().getOffset())); } }
JTextComponent t = getTextComponent(event); if (t != null) { t.getCaret().moveDot(Math.max(t.getCaret().getDot() - 1, t.getDocument().getStartPosition().getOffset())); }
JTextComponent t = getTextComponent(event); try { if (t != null) { Caret c = t.getCaret(); int x = c.getMagicCaretPosition().x; int pos = Utilities.getPositionAbove(t, t.getCaretPosition(), x); if (pos > -1) t.setCaretPosition(pos); } } catch(BadLocationException ble) { }
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { t.getCaret().moveDot(Math.max(t.getCaret().getDot() - 1, t.getDocument().getStartPosition().getOffset())); } }
if (t != null)
try
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { t.getCaret().moveDot(Math.min(t.getCaret().getDot() + 1, t.getDocument().getEndPosition().getOffset())); } }
t.getCaret().moveDot(Math.min(t.getCaret().getDot() + 1, t.getDocument().getEndPosition().getOffset()));
if (t != null) { Caret c = t.getCaret(); int x = c.getMagicCaretPosition().x; int pos = Utilities.getPositionBelow(t, t.getCaretPosition(), x); if (pos > -1) t.setCaretPosition(pos); } } catch(BadLocationException ble) {
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); if (t != null) { t.getCaret().moveDot(Math.min(t.getCaret().getDot() + 1, t.getDocument().getEndPosition().getOffset())); } }
JTextComponent t = getTextComponent(event);
JTextComponent t = getTextComponent(event); if (t != null) { int offs = t.getCaretPosition() - 1;
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); try { // TODO: There is a more efficent solution, but // viewToModel doesn't work properly. Point p = t.modelToView(t.getCaret().getDot()).getLocation(); ...
try { Point p = t.modelToView(t.getCaret().getDot()).getLocation(); int cur = t.getCaretPosition(); int y = p.y; while (y == p.y && cur > 0) y = t.modelToView(--cur).getLocation().y; if (cur != 0) cur++; t.getCaret().moveDot(cur); } catch (BadLocationException ble) { }
if(offs > 0) { Caret c = t.getCaret(); c.moveDot(offs); try { c.setMagicCaretPosition(t.modelToView(offs).getLocation()); } catch(BadLocationException ble) { } } }
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); try { // TODO: There is a more efficent solution, but // viewToModel doesn't work properly. Point p = t.modelToView(t.getCaret().getDot()).getLocation(); ...
if (File.separator.equals(path)) return new VirtualRoot();
private FSEntry getEntry(String path) { try { if(path == null) { return null; } if (File.separator.equals(path)) return new VirtualRoot(); FSEntry entry = entryCache.getEntry(path); if (entry != null) { return entry; } final FSDirectory paren...
FSEntry entry = entryCache.getEntry(path); if (entry != null) { return entry; } final FSDirectory parentEntry = getParentDirectoryEntry(path); if (parentEntry != null) { try { entry = parentEntry.getEntry(path); entryCache.setEntry(path, entry); return entry; } catch (IOException ex) { log.debug("parent.getEntry faile...
final int pathLen = path.length(); if (pathLen > 0) { if ((path.charAt(0) == File.separatorChar) || (path.charAt(pathLen - 1) == File.separatorChar)) { throw new IllegalArgumentException("Invalid path: " + path); } }
private FSEntry getEntry(String path) { try { if(path == null) { return null; } if (File.separator.equals(path)) return new VirtualRoot(); FSEntry entry = entryCache.getEntry(path); if (entry != null) { return entry; } final FSDirectory paren...
}
if (path.length() == 0) { return new VirtualRoot(); } FSEntry entry = entryCache.getEntry(path); if (entry != null) { return entry; } final FSDirectory parentEntry = getParentDirectoryEntry(path); if (parentEntry != null) { try { entry = parentEntry.getEntry(stripParentPath(path)); entryCache.setEntry(path, entry); re...
private FSEntry getEntry(String path) { try { if(path == null) { return null; } if (File.separator.equals(path)) return new VirtualRoot(); FSEntry entry = entryCache.getEntry(path); if (entry != null) { return entry; } final FSDirectory paren...
int idx = path.lastIndexOf(File.separatorChar); return (idx >= 0) ? path.substring(0, idx) : null;
private String getParentPath(String path) { if(path == null) { return null; } int idx = path.lastIndexOf(File.separatorChar); return (idx >= 0) ? path.substring(0, idx) : null; }
Provider[] provs = Security.getProviders(); for (int i = 0; i < provs.length; i++) {
Provider[] p = Security.getProviders(); NoSuchAlgorithmException lastException = null; for (int i = 0; i < p.length; i++)
public static final SSLContext getInstance(String protocol) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); for (int i = 0; i < provs.length; i++) { try { return getInstance(protocol, provs[i]); } catch (NoSuchAlgorithmException i...
return getInstance(protocol, provs[i]);
return getInstance(protocol, p[i]);
public static final SSLContext getInstance(String protocol) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); for (int i = 0; i < provs.length; i++) { try { return getInstance(protocol, provs[i]); } catch (NoSuchAlgorithmException i...
catch (NoSuchAlgorithmException ignore)
catch (NoSuchAlgorithmException x)
public static final SSLContext getInstance(String protocol) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); for (int i = 0; i < provs.length; i++) { try { return getInstance(protocol, provs[i]); } catch (NoSuchAlgorithmException i...
}
if (lastException != null) throw lastException;
public static final SSLContext getInstance(String protocol) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); for (int i = 0; i < provs.length; i++) { try { return getInstance(protocol, provs[i]); } catch (NoSuchAlgorithmException i...
if (pixeli != null) { ic.setPixels(0, 0, width, height, cm, pixeli, offset, scansize);
ic.setDimensions(width, height); if( pixeli != null ) { ic.setPixels( 0, 0, width, height, cm, pixeli, offset, scansize );
private void sendPicture(ImageConsumer ic) { ic.setHints(ImageConsumer.TOPDOWNLEFTRIGHT); if (props != null) { ic.setProperties(props); } if (pixeli != null) { ic.setPixels(0, 0, width, height, cm, pixeli, offset, scansize); } else { ic.setPixels(0, 0, width, height, cm, pixelb, offset, scansize); } }
getThumbBounds();
updateThumbRect();
public void stateChanged(ChangeEvent e) { // System.err.println(this + ".stateChanged()"); calculatePreferredSize(); getThumbBounds(); scrollbar.repaint(); }
getThumbBounds();
updateThumbRect();
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("model")) { ((BoundedRangeModel) e.getOldValue()).removeChangeListener(modelListener); scrollbar.getModel().addChangeListener(modelListener); getThumbBounds(); } else if (e.getPropertyName().equals("o...
incrButton.removeMouseListener(buttonListener); decrButton.removeMouseListener(buttonListener); int orientation = scrollbar.getOrientation(); switch (orientation) { case (JScrollBar.HORIZONTAL): incrButton = createIncreaseButton(EAST); decrButton = createDecreaseButton(WEST); break; default: incrButton = createIncrease...
uninstallListeners(); uninstallComponents(); uninstallDefaults(); installDefaults(); installComponents(); installListeners();
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("model")) { ((BoundedRangeModel) e.getOldValue()).removeChangeListener(modelListener); scrollbar.getModel().addChangeListener(modelListener); getThumbBounds(); } else if (e.getPropertyName().equals("o...
incrButton.addMouseListener(buttonListener); decrButton.addMouseListener(buttonListener); calculatePreferredSize();
else if (e.getPropertyName().equals("enabled")) { Boolean b = (Boolean) e.getNewValue(); if (incrButton != null) incrButton.setEnabled(b.booleanValue()); if (decrButton != null) decrButton.setEnabled(b.booleanValue());
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("model")) { ((BoundedRangeModel) e.getOldValue()).removeChangeListener(modelListener); scrollbar.getModel().addChangeListener(modelListener); getThumbBounds(); } else if (e.getPropertyName().equals("o...
int value; if (scrollbar.getOrientation() == SwingConstants.HORIZONTAL) value = valueForXPosition(currentMouseX); else value = valueForYPosition(currentMouseY);
public void mouseReleased(MouseEvent e) { scrollTimer.stop(); scrollTimer.setDelay(300); currentMouseX = e.getX(); currentMouseY = e.getY(); int value; if (scrollbar.getOrientation() == SwingConstants.HORIZONTAL) value = valueForXPosition(currentMouseX); else ...
if (decrButton == null) decrButton = new BasicArrowButton(orientation); else ((BasicArrowButton) decrButton).setDirection(orientation); return decrButton;
return new BasicArrowButton(orientation);
protected JButton createDecreaseButton(int orientation) { if (decrButton == null) decrButton = new BasicArrowButton(orientation); else ((BasicArrowButton) decrButton).setDirection(orientation); return decrButton; }
if (incrButton == null) incrButton = new BasicArrowButton(orientation); else ((BasicArrowButton) incrButton).setDirection(orientation); return incrButton;
return new BasicArrowButton(orientation);
protected JButton createIncreaseButton(int orientation) { if (incrButton == null) incrButton = new BasicArrowButton(orientation); else ((BasicArrowButton) incrButton).setDirection(orientation); return incrButton; }
return getPreferredSize(c);
return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE);
public Dimension getMaximumSize(JComponent c) { return getPreferredSize(c); }
int max = scrollbar.getMaximum(); int min = scrollbar.getMinimum(); int value = scrollbar.getValue(); int extent = scrollbar.getVisibleAmount(); if (max == min) { thumbRect.x = trackRect.x; thumbRect.y = trackRect.y; if (scrollbar.getOrientation() == HORIZONTAL) { thumbRect.width = getMinimumThumbSize().width; thumbR...
protected Rectangle getThumbBounds() { int max = scrollbar.getMaximum(); int min = scrollbar.getMinimum(); int value = scrollbar.getValue(); int extent = scrollbar.getVisibleAmount(); // System.err.println(this + ".getThumbBounds()"); if (max == min) { thumbRect.x = trackRect.x; thumbRect.y = ...
SwingUtilities.calculateInnerArea(scrollbar, trackRect); if (scrollbar.getOrientation() == SwingConstants.HORIZONTAL) { trackRect.width -= incrButton.getPreferredSize().getWidth(); trackRect.width -= decrButton.getPreferredSize().getWidth(); trackRect.x += decrButton.getPreferredSize().getWidth(); } else { trackRect....
protected Rectangle getTrackBounds() { SwingUtilities.calculateInnerArea(scrollbar, trackRect); if (scrollbar.getOrientation() == SwingConstants.HORIZONTAL) { trackRect.width -= incrButton.getPreferredSize().getWidth(); trackRect.width -= decrButton.getPreferredSize().getWidth(); trackRect.x += decrButton...
int orientation = scrollbar.getOrientation(); switch (orientation) { case (JScrollBar.HORIZONTAL): incrButton = createIncreaseButton(EAST); decrButton = createDecreaseButton(WEST); break; default: incrButton = createIncreaseButton(SOUTH); decrButton = createDecreaseButton(NORTH); break; } scrollbar.add(incrButton); scr...
if (incrButton != null) scrollbar.add(incrButton); if (decrButton != null) scrollbar.add(decrButton);
protected void installComponents() { int orientation = scrollbar.getOrientation(); switch (orientation) { case (JScrollBar.HORIZONTAL): incrButton = createIncreaseButton(EAST); decrButton = createDecreaseButton(WEST); break; default: incrButton = createIncreaseButton(...
int orientation = scrollbar.getOrientation(); switch (orientation) { case (JScrollBar.HORIZONTAL): incrButton = createIncreaseButton(EAST); decrButton = createDecreaseButton(WEST); break; default: incrButton = createIncreaseButton(SOUTH); decrButton = createDecreaseButton(NORTH); break; }
protected void installDefaults() { LookAndFeel.installColors(scrollbar, "ScrollBar.background", "ScrollBar.foreground"); LookAndFeel.installBorder(scrollbar, "ScrollBar.border"); scrollbar.setOpaque(true); scrollbar.setLayout(this); thumbColor = UIManager.getColor("ScrollB...
installDefaults();
public void installUI(JComponent c) { super.installUI(c); if (c instanceof JScrollBar) { scrollbar = (JScrollBar) c; trackRect = new Rectangle(); thumbRect = new Rectangle(); scrollTimer = new Timer(300, null); installComponents(); installDefaults(); configureScrollBarColors(); installListeners(); calcula...
getTrackBounds(); getThumbBounds();
protected void layoutHScrollbar(JScrollBar sb) { // All we have to do is layout the 2 buttons? Rectangle vr = new Rectangle(); SwingUtilities.calculateInnerArea(scrollbar, vr); // Update the rectangles. getTrackBounds(); getThumbBounds(); Dimension incrDims = incrButton.getPreferredSize(); Di...
SwingUtilities.calculateInnerArea(scrollbar, trackRect); trackRect.width -= incrDims.getWidth(); trackRect.width -= decrDims.getWidth(); trackRect.x += decrDims.getWidth(); updateThumbRect();
protected void layoutHScrollbar(JScrollBar sb) { // All we have to do is layout the 2 buttons? Rectangle vr = new Rectangle(); SwingUtilities.calculateInnerArea(scrollbar, vr); // Update the rectangles. getTrackBounds(); getThumbBounds(); Dimension incrDims = incrButton.getPreferredSize(); Di...
getTrackBounds(); getThumbBounds();
protected void layoutVScrollbar(JScrollBar sb) { Rectangle vr = new Rectangle(); SwingUtilities.calculateInnerArea(scrollbar, vr); // Update rectangles getTrackBounds(); getThumbBounds(); Dimension incrDims = incrButton.getPreferredSize(); Dimension decrDims = decrButton.getPreferredSize(); d...