rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
strokeDesc.setText(mapper.getKeyStrokeDesc( macro)); | setKeyInformation(macro); | private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); String stroke = mnemonicData[index]; if (altKey) stroke += ".alt2"; if (isLinux) { mapper.setKeyStroke(stroke,ke,is... |
if (altKey) k += KeyStroker.altSuffix; | private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); String stroke = mnemonicData[index]; if (altKey) stroke += ".alt2"; if (isLinux) { mapper.setKeyStroke(stroke,ke,is... | |
strokeDesc.setText(mapper.getKeyStrokeDesc(k)); | private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); String stroke = mnemonicData[index]; if (altKey) stroke += ".alt2"; if (isLinux) { mapper.setKeyStroke(stroke,ke,is... | |
setKeyInformation(k); | private void setNewKeyStrokes(KeyEvent ke) { if (!macros && !special) { int index = ((KeyDescription)functions.getSelectedValue()).getIndex(); String stroke = mnemonicData[index]; if (altKey) stroke += ".alt2"; if (isLinux) { mapper.setKeyStroke(stroke,ke,is... | |
public byte[] getINodeTableBlock(int blockNo) throws FileSystemException, IOException{ | public synchronized byte[] getINodeTableBlock(int blockNo) throws FileSystemException, IOException{ | public byte[] getINodeTableBlock(int blockNo) throws FileSystemException, IOException{ if(blockNo < blockCount) return fs.getBlock(firstBlock+blockNo); else throw new FileSystemException("Trying to get block #"+blockNo+ "of an inode table that only has "+blockCount+" blocks"); } |
public byte[] getInodeData(int index) throws IOException, FileSystemException{ | public synchronized byte[] getInodeData(int index) throws IOException, FileSystemException{ | public byte[] getInodeData(int index) throws IOException, FileSystemException{ byte data[] = new byte[INode.INODE_LENGTH]; int indexCopied = 0; while(indexCopied<INode.INODE_LENGTH) { int blockNo = (index*INode.INODE_LENGTH+indexCopied) / blockSize; int blockOffset = (index*INode.INODE_LENGTH+indexCopied) % ... |
public void writeINodeTableBlock(byte[] data, int blockNo) throws FileSystemException, IOException { | public synchronized void writeINodeTableBlock(byte[] data, int blockNo) throws FileSystemException, IOException { | public void writeINodeTableBlock(byte[] data, int blockNo) throws FileSystemException, IOException { if(blockNo < blockCount) fs.writeBlock(firstBlock+blockNo, data, false); else throw new FileSystemException("Trying to write block #"+blockNo+ "of an inode table that only has "+blockCount+" blocks"); } |
public void writeInodeData(int index, byte[] data) throws IOException, FileSystemException { | public synchronized void writeInodeData(int index, byte[] data) throws IOException, FileSystemException { | public void writeInodeData(int index, byte[] data) throws IOException, FileSystemException { int indexCopied = 0; while(indexCopied<INode.INODE_LENGTH) { int blockNo = (index*INode.INODE_LENGTH+indexCopied) / blockSize; int blockOffset = (index*INode.INODE_LENGTH+indexCopied) % blockSize; int copyLength = Ma... |
checkValidInput(); | public void insertString(DocumentFilter.FilterBypass bypass, int offset, String text, AttributeSet attributes) throws BadLocationException { super.insertString(bypass, offset, text, attributes); commitIfAllowed(); } | |
checkValidInput(); | public void remove(DocumentFilter.FilterBypass bypass, int offset, int length) throws BadLocationException { super.remove(bypass, offset, length); commitIfAllowed(); } | |
checkValidInput(); | public void replace(DocumentFilter.FilterBypass bypass, int offset, int length, String text, AttributeSet attributes) throws BadLocationException { super.replace(bypass, offset, length, text, attributes); commitIfAllowed(); } | |
throw new BAD_OPERATION("Invalid enumeration code " + code); | BAD_OPERATION bad = new BAD_OPERATION("Invalid state " + code); bad.minor = Minor.Enumeration; throw bad; | public static State from_int(int code) { try { return enume [ code ]; } catch (ArrayIndexOutOfBoundsException ex) { throw new BAD_OPERATION("Invalid enumeration code " + code); } } |
+ "when allocation area is empty.", 5); | + "when allocation area is empty.", pos); | public Shape modelToView(int pos, Shape a, Bias b) throws BadLocationException { Rectangle rect = a.getBounds(); // Throwing a BadLocationException is an observed behavior of the RI. if (rect.isEmpty()) throw new BadLocationException("Unable to calculate view coordinates " ... |
if (lh != null) { if (currEnd == end) lh.paintLayeredHighlights(g, currStart, currEnd - 1, s, tc, this); else lh.paintLayeredHighlights(g, currStart, currEnd, s, tc, this); } | public void paint(Graphics g, Shape s) { Rectangle rect = s.getBounds(); int end = getEndOffset(); int currStart = getStartOffset(); int currEnd; int count = 0; while (currStart < end) { currEnd = calculateBreakPosition(currStart, end); drawLine(currSt... | |
return Utilities.getBreakLocation(lineBuffer, metrics, alloc.x, alloc.x + alloc.width, this, p0); | return p0 + Utilities.getBreakLocation(lineBuffer, metrics, alloc.x, alloc.x + alloc.width, this, 0); | protected int calculateBreakPosition(int p0, int p1) { Container c = getContainer(); int li = getLeftInset(); int ti = getTopInset(); Rectangle alloc = new Rectangle(li, ti, getWidth()-getRightInset()-li, getHeight()-getBottomI... |
return getAddress() + ": " + getLHS().toString() + " = " + phi.toString(); | if (isDeadCode()) { return getAddress() + ": " + " nop (pruned phi)"; } else { return getAddress() + ": " + getLHS() + " = " + phi; } | public String toString() { return getAddress() + ": " + getLHS().toString() + " = " + phi.toString(); } |
double value; | double value = 0; | public double parse() throws NumberFormatException { if (index >= chars.length) throw new NumberFormatException(); char sign = '+'; switch (chars[index]) { case '-': sign = '-'; index++; break; case '+': sign = '+'; ... |
if (index >= chars.length) throw new NumberFormatException(); if (chars[index] != '.') throw new NumberFormatException(); | if (index < chars.length){ if(chars[index] == '.'){ index++; value += parseFractionalPart(false); } } | public double parse() throws NumberFormatException { if (index >= chars.length) throw new NumberFormatException(); char sign = '+'; switch (chars[index]) { case '-': sign = '-'; index++; break; case '+': sign = '+'; ... |
index++; | public double parse() throws NumberFormatException { if (index >= chars.length) throw new NumberFormatException(); char sign = '+'; switch (chars[index]) { case '-': sign = '-'; index++; break; case '+': sign = '+'; ... | |
value += parseFractionalPart(false); | public double parse() throws NumberFormatException { if (index >= chars.length) throw new NumberFormatException(); char sign = '+'; switch (chars[index]) { case '-': sign = '-'; index++; break; case '+': sign = '+'; ... | |
if(obj.attribType == Constants.NUMBER_TYPE) { | if(obj.attribType == Constants.NUMBER_TYPE || obj.attribType == Constants.STRING_OR_NUMBER_TYPE) { | protected Hashtable getXMLInfo () { Hashtable xmlInfo = new Hashtable(); ArrayList attribList = new ArrayList(); ArrayList objRefList = new ArrayList(); for (int i = 0; i < attribHash.size(); i++) { String attribName = (String) attribOrder.get(i); XMLAttribute obj = (XMLAttribute) attribHash.get... |
else { Hashtable item = new Hashtable(); item.put("name", attribName); item.put("value", obj.attribValue); item.put("type", obj.attribType); objRefList.add(item); | else { if ((obj.attribType !=Constants.LIST_TYPE) || (((List)obj.attribValue).size()!=0)) { Hashtable item = new Hashtable(); item.put("name", attribName); item.put("value", obj.attribValue); item.put("type", obj.attribType); objRefList.add(item); } | protected Hashtable getXMLInfo () { Hashtable xmlInfo = new Hashtable(); ArrayList attribList = new ArrayList(); ArrayList objRefList = new ArrayList(); for (int i = 0; i < attribHash.size(); i++) { String attribName = (String) attribOrder.get(i); XMLAttribute obj = (XMLAttribute) attribHash.get... |
if (!XMLDeclAttribs.isEmpty()) { | if ((XMLDeclAttribs !=null) &&(!XMLDeclAttribs.isEmpty())) { | public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,... |
if (sPrettyXDFOutput && pcdata == null) writeOut(outputstream, Constants.NEW_LINE); | if ((sPrettyXDFOutput) && (pcdata == null) && (childObjs.size() !=0)) writeOut(outputstream, Constants.NEW_LINE); | public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,... |
if (sPrettyXDFOutput) writeOut(outputstream, indent); | public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,... | |
if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); | writeOut(outputstream, "</"+nodeNameString + ">"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); return ; | public void toXDFOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,... |
return bus.writeMouseCommand(CMD_DISABLE); | return bus.writeMouseCommands(CMD_DISABLE, null, 0); | protected boolean disablePointer() throws DeviceException { log.debug("disablePointer"); return bus.writeMouseCommand(CMD_DISABLE); } |
return bus.writeMouseCommand(CMD_ENABLE); | return bus.writeMouseCommands(CMD_ENABLE, null, 0); | protected boolean enablePointer() throws DeviceException { log.debug("enablePointer"); return bus.writeMouseCommand(CMD_ENABLE); } |
if (!bus.writeMouseCommand(CMD_GET_ID)) { | if (!bus.writeMouseCommands(CMD_GET_ID, null, 1)) { | protected int getPointerId() throws DriverException { try { if (!bus.writeMouseCommand(CMD_GET_ID)) { throw new DriverException("Cannot request Pointer ID"); } return channel.read(50); } catch (DeviceException ex) { throw new DriverException("Error in requesting Pointer ID", ex); } catch (IOException ex)... |
return bus.writeMouseCommands(new int[] { CMD_SET_RATE, samples }); | return bus.writeMouseCommands(CMD_SET_RATE, new int[] { samples }, 0); | protected boolean setRate(int samples) throws DeviceException { return bus.writeMouseCommands(new int[] { CMD_SET_RATE, samples }); } |
bus.processQueues(); | bus.flush(); | protected synchronized void startDevice() throws DriverException { irq = bus.claimResources(getDevice(), MOUSE_IRQ); try { // Set the mode setEnabled(true); } catch (DeviceException ex) { throw new DriverException("Cannot enable keyboard", ex); } super.startDevice(); // Make sure all queues are empty bus.... |
firePropertyChange(MODEL_CHANGED_PROPERTY, oldModel, this.model); | firePropertyChange("model", oldModel, this.model); | public void setModel(SingleSelectionModel model) { if (model != this.model) { SingleSelectionModel oldModel = this.model; this.model.removeChangeListener(changeListener); this.model = model; this.model.addChangeListener(changeListener); firePropertyChange(MODEL_CHANGED_PROPERTY, oldModel, this.model); }... |
firePropertyChange(TAB_LAYOUT_POLICY_CHANGED_PROPERTY, oldPolicy, layoutPolicy); | firePropertyChange("tabLayoutPolicy", oldPolicy, layoutPolicy); | public void setTabLayoutPolicy(int tabLayoutPolicy) { if (tabLayoutPolicy != SCROLL_TAB_LAYOUT && tabLayoutPolicy != WRAP_TAB_LAYOUT) throw new IllegalArgumentException("tabLayoutPolicy is not valid."); if (tabLayoutPolicy != layoutPolicy) { int oldPolicy = layoutPolicy; layoutPolicy = tabLayo... |
firePropertyChange(TAB_PLACEMENT_CHANGED_PROPERTY, oldPlacement, this.tabPlacement); | firePropertyChange("tabPlacement", oldPlacement, this.tabPlacement); | public void setTabPlacement(int tabPlacement) { if (tabPlacement != TOP && tabPlacement != BOTTOM && tabPlacement != RIGHT && tabPlacement != LEFT) throw new IllegalArgumentException("tabPlacement is not valid."); if (tabPlacement != this.tabPlacement) { int oldPlacement = this.tabPlacement; t... |
repaint(); | session.repaint(); | public void addSessionView(String tabText,Session session) { if (hideTabBar && sessionPane.getTabCount() == 0 && !embedded) { this.getContentPane().add(session, BorderLayout.CENTER); session.grabFocus(); session.resizeMe(); repaint(); if (packFrame) pack(); ... |
return (sessionPane.indexOfComponent(session) >= 0); | if (hideTabBar && sessionPane.getTabCount() == 0) { for (int x=0; x < this.getContentPane().getComponentCount(); x++) { if (this.getContentPane().getComponent(x) instanceof Session) { return ((Session)getContentPane().getComponent(x)).equals(session); } } return false; } else return (sessionPane.indexOfComponent(sessi... | public boolean containsSession(Session session) { return (sessionPane.indexOfComponent(session) >= 0); } |
return (Session)sessionPane.getComponentAt(index); | if (hideTabBar && sessionPane.getTabCount() == 0) { for (int x=0; x < this.getContentPane().getComponentCount(); x++) { if (this.getContentPane().getComponent(x) instanceof Session) { return (Session)getContentPane().getComponent(x); } } return null; } else return (Session)sessionPane.getComponentAt(index); | public Session getSessionAt( int index) { return (Session)sessionPane.getComponentAt(index); } |
return sessionPane.getTabCount(); | if (hideTabBar && sessionPane.getTabCount() == 0) { for (int x=0; x < this.getContentPane().getComponentCount(); x++) { if (this.getContentPane().getComponent(x) instanceof Session) { return 1; } } return 0; } else return sessionPane.getTabCount(); | public int getSessionViewCount() { return sessionPane.getTabCount(); } |
int index = sessionPane.indexOfComponent(targetSession); System.out.println("session found and closing down " + index); targetSession.removeSessionListener(this); targetSession.removeSessionJumpListener(this); int tabs = sessionPane.getTabCount(); sessionPane.remove(index); tabs--; | if (hideTabBar && sessionPane.getTabCount() == 0) { for (int x=0; x < getContentPane().getComponentCount(); x++) { | public void removeSessionView(Session targetSession) { int index = sessionPane.indexOfComponent(targetSession); System.out.println("session found and closing down " + index); targetSession.removeSessionListener(this); targetSession.removeSessionJumpListener(this); int tabs = sessionPane.getT... |
if (index < tabs) { sessionPane.setSelectedIndex(index); sessionPane.setForegroundAt(index,Color.blue); sessionPane.setIconAt(index,focused); ((Session)sessionPane.getComponentAt(index)).requestFocus(); | if (getContentPane().getComponent(x) instanceof Session) { getContentPane().remove(x); } } | public void removeSessionView(Session targetSession) { int index = sessionPane.indexOfComponent(targetSession); System.out.println("session found and closing down " + index); targetSession.removeSessionListener(this); targetSession.removeSessionJumpListener(this); int tabs = sessionPane.getT... |
if (tabs > 0) { sessionPane.setSelectedIndex(0); sessionPane.setForegroundAt(0,Color.blue); sessionPane.setIconAt(0,focused); ((Session)sessionPane.getComponentAt(0)).requestFocus(); | int index = sessionPane.indexOfComponent(targetSession); System.out.println("session found and closing down " + index); targetSession.removeSessionListener(this); targetSession.removeSessionJumpListener(this); int tabs = sessionPane.getTabCount(); sessionPane.remove(index); tabs--; if (index < tabs) { sessionPane.set... | public void removeSessionView(Session targetSession) { int index = sessionPane.indexOfComponent(targetSession); System.out.println("session found and closing down " + index); targetSession.removeSessionListener(this); targetSession.removeSessionJumpListener(this); int tabs = sessionPane.getT... |
reindex(); | super.removeUpdate(event); | protected void removeUpdate(DefaultDocumentEvent event) { reindex(); super.removeUpdate(event); } |
super.removeUpdate(event); | int p0 = event.getOffset(); int p1 = event.getLength() + p0; int len = event.getLength(); int i1 = rootElement.getElementIndex(p0); int i2 = rootElement.getElementIndex(p1); if (i1 != i2) { Element el1 = rootElement.getElement(i1); Element el2 = rootElement.getElement(i2); int start = el1.getStartOffset(); int end = ... | protected void removeUpdate(DefaultDocumentEvent event) { reindex(); super.removeUpdate(event); } |
getContainer().repaint(); | public void changedUpdate(DocumentEvent ev, Shape shape, ViewFactory vf) { Shape newAlloc = adjustAllocation(shape); super.removeUpdate(ev, newAlloc, vf); } | |
getContainer().repaint(); | public void insertUpdate(DocumentEvent ev, Shape shape, ViewFactory vf) { Shape newAlloc = adjustAllocation(shape); super.insertUpdate(ev, newAlloc, vf); } | |
getContainer().repaint(); | public void removeUpdate(DocumentEvent ev, Shape shape, ViewFactory vf) { Shape newAlloc = adjustAllocation(shape); super.removeUpdate(ev, newAlloc, vf); } | |
throw new UnsupportedOperationException("hash with no ID"); | throw new UnsupportedOperationException("hash with no OID: " + name); | public static final EMSA_PKCS1_V1_5 getInstance(final String mdName) { final IMessageDigest hash = HashFactory.getInstance(mdName); final String name = hash.name(); if (!(name.equals(Registry.MD2_HASH) || name.equals(Registry.MD5_HASH) || name.equals(Registry.SHA160_HASH) || name.equals(Re... |
updateColorSelection(newSelection); | private void applyAttributes() { if (!getStringProperty("font").equals( (String)fontsList.getSelectedItem()) ) { changes.firePropertyChange("font", getStringProperty("font"), (String)fontsList.getSelectedItem()); setProper... | |
if (newSelection.equals(LangTool.getString("sa.bg"))) { jcc.setColor(getColorProperty("colorBg")); } if (newSelection.equals(LangTool.getString("sa.blue"))) { jcc.setColor(getColorProperty("colorBlue")); } if (newSelection.equals(LangTool.getString("sa.red"))) { jcc.setColor(getColorProperty("colorRed")); } if (newSel... | updateColorSelection(newSelection); | private void jbInit() throws Exception { changes = new PropertyChangeSupport(this); Dimension ps = null; // fonts Font[] fonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts(); // define fonts panel final JPanel fp = new JPanel(); fp.setLayout(new BorderLayout());... |
if (newSelection.equals(LangTool.getString("sa.bg"))) { jcc.setColor(getColorProperty("colorBg")); } if (newSelection.equals(LangTool.getString("sa.blue"))) { jcc.setColor(getColorProperty("colorBlue")); } if (newSelection.equals(LangTool.getString("sa.red"))) { jcc.setColor(getColorProperty("colorRed")); } if (newSel... | updateColorSelection(newSelection); | public void actionPerformed(ActionEvent e) { JComboBox cb = (JComboBox)e.getSource(); String newSelection = (String)cb.getSelectedItem(); if (newSelection.equals(LangTool.getString("sa.bg"))) { jcc.setColor(getColorProperty("colorBg")); ... |
tab.put (constraints, comp); | addLayoutComponent ((String) constraints, comp); | public void addLayoutComponent (Component comp, Object constraints) { if (! (constraints instanceof String)) throw new IllegalArgumentException ("Object " + constraints + " is not a string"); tab.put (constraints, comp); } |
if (num == 1) { comps[0].setVisible(true); return; } | private void gotoComponent (Container parent, int what) { synchronized (parent.getTreeLock ()) { int num = parent.ncomponents; // This is more efficient than calling getComponents(). Component[] comps = parent.component; int choice = -1; if (what == FIRST) choice = 0; else if (what == LAST) choice = num ... | |
Container parent = comp.getParent(); next(parent); | public void removeLayoutComponent (Component comp) { Enumeration e = tab.keys (); while (e.hasMoreElements ()) { Object key = e.nextElement (); if (tab.get (key) == comp) { tab.remove (key); break; } } } | |
if (keyMap.isKeyStrokeDefined(action)) { | if (KeyMapper.isKeyStrokeDefined(action)) { | protected void setKeyStroke(String action, KeyStroke ks, KeyMapper keyMap) { if (keyMap.isKeyStrokeDefined(action)) {// ks = KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP,KeyEvent.ALT_MASK);// }// else { ks = keyMap.getKeyStroke(action); } session.getInputMap().put(ks,action); ... |
ks = keyMap.getKeyStroke(action); | ks = KeyMapper.getKeyStroke(action); | protected void setKeyStroke(String action, KeyStroke ks, KeyMapper keyMap) { if (keyMap.isKeyStrokeDefined(action)) {// ks = KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP,KeyEvent.ALT_MASK);// }// else { ks = keyMap.getKeyStroke(action); } session.getInputMap().put(ks,action); ... |
if (keyMap.isKeyStrokeDefined(action + ".alt2")) { ks = keyMap.getKeyStroke(action + ".alt2"); | if (KeyMapper.isKeyStrokeDefined(action + ".alt2")) { ks = KeyMapper.getKeyStroke(action + ".alt2"); | protected void setKeyStroke(String action, KeyStroke ks, KeyMapper keyMap) { if (keyMap.isKeyStrokeDefined(action)) {// ks = KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP,KeyEvent.ALT_MASK);// }// else { ks = keyMap.getKeyStroke(action); } session.getInputMap().put(ks,action); ... |
if (b == Position.Bias.Backward && pos != 0) pos -= 1; | public int getViewIndex(int pos, Position.Bias b) { // FIXME: Handle bias somehow. return getViewIndexAtPosition(pos); } | |
if (axisIdRefOrder.size() == 0) { return (String) null; } | protected String basicXMLWriter ( Writer outputWriter, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ... | |
break; case PLANE_ATTR: System.arraycopy(screenAttr, from, planeChars, 0, len); | protected synchronized char[] getPlaneData(int from, int to, int plane) { int len = to - from; char[] planeChars = new char[len + 1]; switch (plane) { case PLANE_TEXT: System.arraycopy(screen, from, planeChars, 0, len); break; case PLANE_COLOR:// fillCo... | |
{ | protected Keymap createKeymap() { JTextComponent.KeyBinding[] bindings = null; String prefix = getPropertyPrefix(); InputMapUIResource m = (InputMapUIResource) UIManager.get(prefix + ".focusInputMap"); if (m != null) { KeyStroke[] keys = m.keys(); int len = keys.length; bindings... | |
UIManager.put(prefix + ".focusInputMap", bindings); } | protected Keymap createKeymap() { JTextComponent.KeyBinding[] bindings = null; String prefix = getPropertyPrefix(); InputMapUIResource m = (InputMapUIResource) UIManager.get(prefix + ".focusInputMap"); if (m != null) { KeyStroke[] keys = m.keys(); int len = keys.length; bindings... | |
return new Dimension((int) w, (int) h); | Insets i = c.getInsets(); return new Dimension((int) w + i.left + i.right, (int) h + i.top + i.bottom); | public Dimension getPreferredSize(JComponent c) { View v = getRootView(textComponent); float w = v.getPreferredSpan(View.X_AXIS); float h = v.getPreferredSpan(View.Y_AXIS); return new Dimension((int) w, (int) h); } |
int origin = mymatch.index; | boolean match(CharIndexed input, REMatch mymatch) { if (num >= mymatch.start.length) return false; if (num >= mymatch.end.length) return false; int b,e; b = mymatch.start[num]; e = mymatch.end[num]; if ((b==-1)||(e==-1)) return false; // this shouldn't happen, but... int origin = mymatch.index; for (int i=b; i<e; i... | |
boolean result = next(input, mymatch); if (result) mymatch.empty = (mymatch.index == origin); return result; | return next(input, mymatch); | boolean match(CharIndexed input, REMatch mymatch) { if (num >= mymatch.start.length) return false; if (num >= mymatch.end.length) return false; int b,e; b = mymatch.start[num]; e = mymatch.end[num]; if ((b==-1)||(e==-1)) return false; // this shouldn't happen, but... int origin = mymatch.index; for (int i=b; i<e; i... |
list.setFocusable(false); | protected void configureList() { list.setModel(comboBox.getModel()); list.setVisibleRowCount(comboBox.getMaximumRowCount()); installListListeners(); } | |
String subVer= ".2b"; | String subVer= ".3 RC1"; | private void jbInit() throws Exception { this.getContentPane().setLayout(borderLayout1); String release = "0"; String version = ".5"; String subVer= ".2b"; if (sequence > 0) setTitle("tn5250j <" + sequence + ">- " + release + version + subVer); else setTitle("tn5250j - "... |
if (getSize().width > max.width) setSize(max.width,getSize().height); if (getSize().height > max.height) setSize(getSize().width,max.height); | private void jbInit() throws Exception { try { setIconImage(My5250.tnicon.getImage()); // set title setTitle(LangTool.getString("xtfr.wizardTitle")); // Load the JDBC driver. Driver driver2 = (Driver)Class.forName("com.ibm.as400.access.AS400JDBCDriver").newInstance(); ... | |
NumberFormat currency = NumberFormat.getCurrencyInstance (locale); return currency.getMaximumFractionDigits(); | return fractionDigits; | public int getDefaultFractionDigits () { NumberFormat currency = NumberFormat.getCurrencyInstance (locale); return currency.getMaximumFractionDigits(); } |
newCurrency = (Currency) cache.get(locale); if (newCurrency == null) | String code = (String) countryMap.get(country); if (code == null) | public static Currency getInstance (Locale locale) { /** * The new instance must be the only available instance * for the currency it supports. We ensure this happens, * while maintaining a suitable performance level, by * creating the appropriate object on the first call to * this method, an... |
newCurrency = new Currency (locale); | newCurrency = new Currency(locale); code = newCurrency.getCurrencyCode(); if (code == null) { return null; } else { | public static Currency getInstance (Locale locale) { /** * The new instance must be the only available instance * for the currency it supports. We ensure this happens, * while maintaining a suitable performance level, by * creating the appropriate object on the first call to * this method, an... |
cache.put(locale, newCurrency); | countryMap.put(country, code); cache.put(code, newCurrency); } } else { newCurrency = (Currency) cache.get(code); | public static Currency getInstance (Locale locale) { /** * The new instance must be the only available instance * for the currency it supports. We ensure this happens, * while maintaining a suitable performance level, by * creating the appropriate object on the first call to * this method, an... |
try { return res.getString ("currencySymbol"); } catch (Exception _) { return null; } | return currencySymbol == null ? getCurrencyCode() : currencySymbol; | public String getSymbol() { try { /* What does this return if there is no mapping? */ return res.getString ("currencySymbol"); } catch (Exception _) { return null; } } |
if(CharacterAttributeTranslator.translateTag(charAttr, t, a)) return; | public void start(HTML.Tag t, MutableAttributeSet a) { // Put the old attribute set on the stack. pushCharacterStyle(); // Translate tag.. return if succesful. if(CharacterAttributeTranslator.translateTag(charAttr, t, a)) return; // Just add the attributes in <code>a</code>. ... | |
if (a != null) | public void start(HTML.Tag t, MutableAttributeSet a) { // Put the old attribute set on the stack. pushCharacterStyle(); // Translate tag.. return if succesful. if(CharacterAttributeTranslator.translateTag(charAttr, t, a)) return; // Just add the attributes in <code>a</code>. ... | |
DefaultStyledDocument.ElementSpec spec; spec = new DefaultStyledDocument.ElementSpec(copy, | DefaultStyledDocument.ElementSpec spec = new DefaultStyledDocument.ElementSpec(copy, | protected void addSpecialElement(HTML.Tag t, MutableAttributeSet a) { a.addAttribute(StyleConstants.NameAttribute, t); // Migrate from the rather htmlAttributeSet to the faster, lighter and // unchangeable alternative implementation. AttributeSet copy = a.copyAttributes(); /... |
new char[] {' '}, 0, 1 ); | new char[] {' ', ' '}, 0, 2 ); | protected void addSpecialElement(HTML.Tag t, MutableAttributeSet a) { a.addAttribute(StyleConstants.NameAttribute, t); // Migrate from the rather htmlAttributeSet to the faster, lighter and // unchangeable alternative implementation. AttributeSet copy = a.copyAttributes(); /... |
else if (parseStack.peek() == HTML.Tag.IMPLIED) { element = new DefaultStyledDocument.ElementSpec(null, DefaultStyledDocument.ElementSpec.EndTagType); parseBuffer.addElement(element); if (parseStack.size() > 0) parseStack.pop(); } | protected void blockClose(HTML.Tag t) { printBuffer(); DefaultStyledDocument.ElementSpec element; // If the previous tag is a start tag then we insert a synthetic // content tag. DefaultStyledDocument.ElementSpec prev; prev = (DefaultStyledDocument.ElementSpec) parseBuffer.get... | |
if (parseStack.size() > 0 && parseStack.peek() == HTML.Tag.IMPLIED) { element = new DefaultStyledDocument.ElementSpec(null, DefaultStyledDocument.ElementSpec.EndTagType); parseBuffer.addElement(element); parseStack.pop(); } | protected void blockOpen(HTML.Tag t, MutableAttributeSet attr) { printBuffer(); DefaultStyledDocument.ElementSpec element; // If the previous tag is content and the parent is p-implied, then // we must also close the p-implied. if (parseStack.size() > 0 && parseStack.peek() == HTML.Tag.I... | |
if (endHTMLEncountered) return; | if (shouldInsert()) { | public void handleComment(char[] data, int pos) { // Don't call the Action if we've already seen </html>. if (endHTMLEncountered) return; TagAction action = (TagAction) tagToAction.get(HTML.Tag.COMMENT); if (action != null) { action.start(HTML.Tag.COMMENT, new Sim... |
action.start(HTML.Tag.COMMENT, new SimpleAttributeSet()); action.end (HTML.Tag.COMMENT); | action.start(HTML.Tag.COMMENT, htmlAttributeSet.EMPTY_HTML_ATTRIBUTE_SET); action.end(HTML.Tag.COMMENT); } | public void handleComment(char[] data, int pos) { // Don't call the Action if we've already seen </html>. if (endHTMLEncountered) return; TagAction action = (TagAction) tagToAction.get(HTML.Tag.COMMENT); if (action != null) { action.start(HTML.Tag.COMMENT, new Sim... |
throws NotImplementedException | public void handleEndOfLineString(String eol) throws NotImplementedException { // FIXME: Implement. print ("HTMLReader.handleEndOfLineString not implemented yet"); } | |
if (endHTMLEncountered) return; | if (shouldInsert()) { | public void handleEndTag(HTML.Tag t, int pos) { // Don't call the Action if we've already seen </html>. if (endHTMLEncountered) return; // If this is the </html> tag we need to stop calling the Actions if (t == HTML.Tag.HTML) endHTMLEncountered = true; TagAction... |
} | public void handleEndTag(HTML.Tag t, int pos) { // Don't call the Action if we've already seen </html>. if (endHTMLEncountered) return; // If this is the </html> tag we need to stop calling the Actions if (t == HTML.Tag.HTML) endHTMLEncountered = true; TagAction... | |
if (endHTMLEncountered) return; | if (t == insertTag) insertTagEncountered = true; | public void handleSimpleTag(HTML.Tag t, MutableAttributeSet a, int pos) { // Don't call the Action if we've already seen </html>. if (endHTMLEncountered) return; TagAction action = (TagAction) tagToAction.get (t); if (action != null) { action.start(t, a); ... |
TagAction action = (TagAction) tagToAction.get (t); | if (shouldInsert()) { TagAction action = (TagAction) tagToAction.get(t); | public void handleSimpleTag(HTML.Tag t, MutableAttributeSet a, int pos) { // Don't call the Action if we've already seen </html>. if (endHTMLEncountered) return; TagAction action = (TagAction) tagToAction.get (t); if (action != null) { action.start(t, a); ... |
} | public void handleSimpleTag(HTML.Tag t, MutableAttributeSet a, int pos) { // Don't call the Action if we've already seen </html>. if (endHTMLEncountered) return; TagAction action = (TagAction) tagToAction.get (t); if (action != null) { action.start(t, a); ... | |
if (endHTMLEncountered) return; | if (t == insertTag) insertTagEncountered = true; | public void handleStartTag(HTML.Tag t, MutableAttributeSet a, int pos) { // Don't call the Action if we've already seen </html>. if (endHTMLEncountered) return; TagAction action = (TagAction) tagToAction.get(t); if (action != null) action.start(t, a); } |
} | public void handleStartTag(HTML.Tag t, MutableAttributeSet a, int pos) { // Don't call the Action if we've already seen </html>. if (endHTMLEncountered) return; TagAction action = (TagAction) tagToAction.get(t); if (action != null) action.start(t, a); } | |
ConvertAction convertAction = new ConvertAction(); | void initTags() { tagToAction = new HashMap(72); CharacterAction characterAction = new CharacterAction(); HiddenAction hiddenAction = new HiddenAction(); AreaAction areaAction = new AreaAction(); BaseAction baseAction = new BaseAction(); BlockAction blockAction = new BlockAction(); ... | |
tagToAction.put(HTML.Tag.FONT, characterAction); | tagToAction.put(HTML.Tag.FONT, convertAction); | void initTags() { tagToAction = new HashMap(72); CharacterAction characterAction = new CharacterAction(); HiddenAction hiddenAction = new HiddenAction(); AreaAction areaAction = new AreaAction(); BaseAction baseAction = new BaseAction(); BlockAction blockAction = new BlockAction(); ... |
this(null); | this(new GapContent(BUFFER_SIZE_DEFAULT), new StyleSheet()); | public HTMLDocument() { this(null); } |
return styleSheet; | return (StyleSheet) getAttributeContext(); | public StyleSheet getStyleSheet() { return styleSheet; } |
throws BadLocationException, IOException, NotImplementedException | throws BadLocationException, IOException | public void insertAfterEnd(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("inse... |
if (parser == null) throw new IllegalStateException("Parser has not been set"); System.out.println("insertAfterEnd not implemented"); | HTMLEditorKit.ParserCallback reader = getInsertingReader( elem.getEndOffset(), 0, 0, HTML.Tag.BODY, elem); getParser().parse(new StringReader(htmlText), reader, true); | public void insertAfterEnd(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("inse... |
throws BadLocationException, IOException, NotImplementedException | throws BadLocationException, IOException | public void insertAfterStart(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("in... |
if (parser == null) throw new IllegalStateException("Parser has not been set"); System.out.println("insertAfterStart not implemented"); | HTMLEditorKit.ParserCallback reader = getInsertingReader( elem.getStartOffset(), 0, 0, HTML.Tag.BODY, elem); getParser().parse(new StringReader(htmlText), reader, true); | public void insertAfterStart(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("in... |
throws BadLocationException, IOException, NotImplementedException | throws BadLocationException, IOException | public void insertBeforeEnd(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("ins... |
if (parser == null) throw new IllegalStateException("Parser has not been set"); System.out.println("insertBeforeEnd not implemented"); | HTMLEditorKit.ParserCallback reader = getInsertingReader( elem.getEndOffset(), 0, 0, HTML.Tag.BODY, elem); getParser().parse(new StringReader(htmlText), reader, true); | public void insertBeforeEnd(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("ins... |
throws BadLocationException, IOException, NotImplementedException | throws BadLocationException, IOException | public void insertBeforeStart(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("i... |
if (parser == null) throw new IllegalStateException("Parser has not been set"); System.out.println("insertBeforeStart not implemented"); | HTMLEditorKit.ParserCallback reader = getInsertingReader( elem.getStartOffset(), 0, 0, HTML.Tag.BODY, elem); getParser().parse(new StringReader(htmlText), reader, true); | public void insertBeforeStart(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.