rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
public INode(Ext2FileSystem fs, byte[] data) {
public INode(Ext2FileSystem fs, INodeDescriptor desc, byte[] data) {
public INode(Ext2FileSystem fs, byte[] data) { this.fs = fs; this.data = new byte[INODE_LENGTH]; System.arraycopy(data, 0, this.data, 0, INODE_LENGTH); }
setDirty(false); log.setLevel(Level.DEBUG);
public INode(Ext2FileSystem fs, byte[] data) { this.fs = fs; this.data = new byte[INODE_LENGTH]; System.arraycopy(data, 0, this.data, 0, INODE_LENGTH); }
if(i<12) return fs.getBlock( Ext2Utils.get32(data,40+(int)i*4) ); int indirectCount = fs.getSuperblock().getBlockSize() >> 2; if(i<12+indirectCount) { long offset=i-12; byte[] indirectBlock = fs.getBlock( Ext2Utils.get32(data,40+12*4) ); long blockIndex = Ext2Utils.get32(indirectBlock, (int)offset*4); return fs.getBlock( blockIndex ); } int doubleIndirectCount = indirectCount * indirectCount; if(i<12+indirectCount+doubleIndirectCount) { byte[] doubleIndirectBlock = fs.getBlock( Ext2Utils.get32(data,40+13*4) ); long offset = i-indirectCount-12; long indirectBlockNr = offset / indirectCount; long indirectBlockOffset= offset % indirectCount; byte[] indirectBlock = fs.getBlock( Ext2Utils.get32(doubleIndirectBlock, (int)indirectBlockNr) ); long blockIndex = Ext2Utils.get32(indirectBlock, (int)indirectBlockOffset*4); return fs.getBlock( blockIndex ); } int tripleIndirectCount = indirectCount * indirectCount * indirectCount; if(i<12+indirectCount+doubleIndirectCount+tripleIndirectCount) { byte[] tripleIndirectBlock = fs.getBlock( Ext2Utils.get32(data,40+14*4) ); long offset = i-doubleIndirectCount-indirectCount-12; long doubleIndirectBlockNr = offset / (indirectCount * indirectCount); long doubleIndirectBlockOffset = offset % (indirectCount * indirectCount); byte[] doubleIndirectBlock = fs.getBlock( Ext2Utils.get32(tripleIndirectBlock, (int)doubleIndirectBlockNr) ); long indirectBlockIndex = Ext2Utils.get32( doubleIndirectBlock, (int)doubleIndirectBlockOffset*4); long indirectBlockOffset = offset % indirectCount; byte[] indirectBlock = fs.getBlock( Ext2Utils.get32(doubleIndirectBlock, (int)indirectBlockIndex*4) ); long blockIndex = Ext2Utils.get32( indirectBlock, (int)indirectBlockOffset*4 ); return fs.getBlock( blockIndex ); } else{ throw new IOException("file too big: more than "+12+indirectCount+doubleIndirectCount+tripleIndirectCount+" blocks"); }
return fs.getBlock( getDataBlockNr(i) );
public byte[] getDataBlock(long i) throws IOException { //get the direct blocks (0; 11) if(i<12) return fs.getBlock( Ext2Utils.get32(data,40+(int)i*4) ); //see the indirect blocks (12; indirectCount-1) int indirectCount = fs.getSuperblock().getBlockSize() >> 2; //a block index is 4 bytes long if(i<12+indirectCount) { long offset=i-12; //the 12th index points to the indirect block byte[] indirectBlock = fs.getBlock( Ext2Utils.get32(data,40+12*4) ); long blockIndex = Ext2Utils.get32(indirectBlock, (int)offset*4); return fs.getBlock( blockIndex ); } //see the double indirect blocks (indirectCount; doubleIndirectCount-1) int doubleIndirectCount = indirectCount * indirectCount; if(i<12+indirectCount+doubleIndirectCount) { //the 13th index points to the double indirect block byte[] doubleIndirectBlock = fs.getBlock( Ext2Utils.get32(data,40+13*4) ); long offset = i-indirectCount-12; long indirectBlockNr = offset / indirectCount; long indirectBlockOffset= offset % indirectCount; byte[] indirectBlock = fs.getBlock( Ext2Utils.get32(doubleIndirectBlock, (int)indirectBlockNr) ); long blockIndex = Ext2Utils.get32(indirectBlock, (int)indirectBlockOffset*4); return fs.getBlock( blockIndex ); } //see the triple indirect blocks (doubleIndirectCount; tripleIndirectCount-1) int tripleIndirectCount = indirectCount * indirectCount * indirectCount; if(i<12+indirectCount+doubleIndirectCount+tripleIndirectCount) { //the 14th index points to the triple indirect block byte[] tripleIndirectBlock = fs.getBlock( Ext2Utils.get32(data,40+14*4) ); long offset = i-doubleIndirectCount-indirectCount-12; long doubleIndirectBlockNr = offset / (indirectCount * indirectCount); long doubleIndirectBlockOffset = offset % (indirectCount * indirectCount); byte[] doubleIndirectBlock = fs.getBlock( Ext2Utils.get32(tripleIndirectBlock, (int)doubleIndirectBlockNr) ); long indirectBlockIndex = Ext2Utils.get32( doubleIndirectBlock, (int)doubleIndirectBlockOffset*4); long indirectBlockOffset = offset % indirectCount; byte[] indirectBlock = fs.getBlock( Ext2Utils.get32(doubleIndirectBlock, (int)indirectBlockIndex*4) ); long blockIndex = Ext2Utils.get32( indirectBlock, (int)indirectBlockOffset*4 ); return fs.getBlock( blockIndex ); } else{ throw new IOException("file too big: more than "+12+indirectCount+doubleIndirectCount+tripleIndirectCount+" blocks"); } }
log.debug("INode.getIMode(): "+NumberUtils.hex(iMode));
public int getMode() { int iMode=Ext2Utils.get16(data, 0); log.debug("INode.getIMode(): "+NumberUtils.hex(iMode)); return iMode; }
public static void set32(byte[] data, int offset, int value) {
public static void set32(byte[] data, int offset, long value) {
public static void set32(byte[] data, int offset, int value) { data[offset] = (byte)(value & 0xFF); data[offset+1] = (byte)((value >> 8) & 0xFF); data[offset+2] = (byte)((value >> 16) & 0xFF); data[offset+3] = (byte)((value >> 32) & 0xFF); }
if (path.getPathCount() < count)
int otherPathLength = path.getPathCount(); if (otherPathLength < count)
public boolean isDescendant(TreePath path) { if (path == null) return false; int count = getPathCount(); if (path.getPathCount() < count) return false; for (int i = 0; i < count; i++) { if (!this.path[i].equals(path.getPathComponent(i))) return false; } return true; }
for (int i = 0; i < count; i++)
while (otherPathLength > count)
public boolean isDescendant(TreePath path) { if (path == null) return false; int count = getPathCount(); if (path.getPathCount() < count) return false; for (int i = 0; i < count; i++) { if (!this.path[i].equals(path.getPathComponent(i))) return false; } return true; }
if (!this.path[i].equals(path.getPathComponent(i))) return false;
otherPathLength--; path = path.getParentPath();
public boolean isDescendant(TreePath path) { if (path == null) return false; int count = getPathCount(); if (path.getPathCount() < count) return false; for (int i = 0; i < count; i++) { if (!this.path[i].equals(path.getPathComponent(i))) return false; } return true; }
return true;
return equals(path);
public boolean isDescendant(TreePath path) { if (path == null) return false; int count = getPathCount(); if (path.getPathCount() < count) return false; for (int i = 0; i < count; i++) { if (!this.path[i].equals(path.getPathComponent(i))) return false; } return true; }
int maxWidth = doubleBufferMaximumSize.width; int maxHeight = doubleBufferMaximumSize.height; return comp.createVolatileImage(Math.min(maxWidth, proposedWidth), Math.min(maxHeight, proposedHeight));
Component root = getRoot(comp); Image buffer = (Image) offscreenBuffers.get(root); if (buffer == null || buffer.getWidth(null) < proposedWidth || buffer.getHeight(null) < proposedHeight || !(buffer instanceof VolatileImage)) { int width = Math.max(proposedWidth, root.getWidth()); width = Math.min(doubleBufferMaximumSize.width, width); int height = Math.max(proposedHeight, root.getHeight()); height = Math.min(doubleBufferMaximumSize.height, height); buffer = root.createVolatileImage(width, height); if (buffer != null) offscreenBuffers.put(root, buffer); } return buffer;
public Image getVolatileOffscreenBuffer(Component comp, int proposedWidth, int proposedHeight) { int maxWidth = doubleBufferMaximumSize.width; int maxHeight = doubleBufferMaximumSize.height; return comp.createVolatileImage(Math.min(maxWidth, proposedWidth), Math.min(maxHeight, proposedHeight)); }
bind = bindings;
public LazyInputMap(Object[] bindings) { }
throw new Error("not implemented");
InputMap im = new InputMap (); for (int i = 0; 2*i+1 < bind.length; ++i) { im.put (KeyStroke.getKeyStroke ((String) bind[2*i]), bind[2*i+1]); } return im;
public Object createValue(UIDefaults table) { throw new Error("not implemented"); }
throw new Error("not implemented");
final String className = s; inner = new LazyValue () { public Object createValue (UIDefaults table) { try { return Class .forName (className) .getConstructor (new Class[] {}) .newInstance (new Object[] {}); } catch (Exception e) { return null; } } };
public ProxyLazyValue(String s) { throw new Error("not implemented"); }
throw new Error("not implemented");
return inner.createValue (table);
public Object createValue(UIDefaults table) { throw new Error("not implemented"); }
public void addPropertyChangeListener(PropertyChangeListener l)
void addPropertyChangeListener(PropertyChangeListener listener)
public void addPropertyChangeListener(PropertyChangeListener l) { throw new Error("not implemented"); }
throw new Error("not implemented");
listeners.add (listener);
public void addPropertyChangeListener(PropertyChangeListener l) { throw new Error("not implemented"); }
public void addResourceBundle(String name)
void addResourceBundle(String name)
public void addResourceBundle(String name) { throw new Error("not implemented"); }
throw new Error("not implemented");
bundles.addFirst (name);
public void addResourceBundle(String name) { throw new Error("not implemented"); }
throw new Error("not implemented");
Iterator i = listeners.iterator (); PropertyChangeEvent pce = new PropertyChangeEvent (this, property, o, n); while (i.hasNext ()) { PropertyChangeListener pcl = (PropertyChangeListener) i.next (); pcl.propertyChange (pce); }
protected void firePropertyChange(String property, Object o, Object n) { throw new Error("not implemented"); }
throw new Error("not implemented");
return defaultLocale;
public Locale getDefaultLocale() { throw new Error("not implemented"); }
throw new Error("not implemented");
return (PropertyChangeListener[]) listeners.toArray ();
public PropertyChangeListener[] getPropertyChangeListeners() { throw new Error("not implemented"); }
public ComponentUI getUI(JComponent a)
public ComponentUI getUI(JComponent target)
public ComponentUI getUI(JComponent a) { String pp = a.getUIClassID(); ComponentUI p = (ComponentUI) get(pp); if (p == null) getUIError("failed to locate UI:" + pp); return p; }
String pp = a.getUIClassID(); ComponentUI p = (ComponentUI) get(pp); if (p == null) getUIError("failed to locate UI:" + pp); return p;
String classId = target.getUIClassID (); Class cls = getUIClass (classId); if (cls == null) { getUIError ("failed to locate UI class:" + classId); return null; } Method factory; try { factory = cls.getMethod ("createUI", new Class[] { JComponent.class } ); } catch (NoSuchMethodException nme) { getUIError ("failed to locate createUI method on " + cls.toString ()); return null;
public ComponentUI getUI(JComponent a) { String pp = a.getUIClassID(); ComponentUI p = (ComponentUI) get(pp); if (p == null) getUIError("failed to locate UI:" + pp); return p; }
try { return (ComponentUI) factory.invoke (null, new Object[] { target }); } catch (java.lang.reflect.InvocationTargetException ite) { getUIError ("InvocationTargetException ("+ ite.getTargetException() +") calling createUI(...) on " + cls.toString ()); return null; } catch (Exception e) { getUIError ("exception calling createUI(...) on " + cls.toString ()); return null; } }
public ComponentUI getUI(JComponent a) { String pp = a.getUIClassID(); ComponentUI p = (ComponentUI) get(pp); if (p == null) getUIError("failed to locate UI:" + pp); return p; }
throw new Error("not implemented");
String className = (String) get (id); if (className == null) return null; try { if (loader != null) return loader.loadClass (className); return Class.forName (className); } catch (Exception e) { return null; }
public Class getUIClass(String id, ClassLoader loader) { throw new Error("not implemented"); }
System.err.println ("UIDefaults.getUIError: " + msg);
protected void getUIError(String msg) { // Does nothing unless overridden. }
public void removePropertyChangeListener(PropertyChangeListener l)
void removePropertyChangeListener(PropertyChangeListener listener)
public void removePropertyChangeListener(PropertyChangeListener l) { throw new Error("not implemented"); }
throw new Error("not implemented");
listeners.remove (listener);
public void removePropertyChangeListener(PropertyChangeListener l) { throw new Error("not implemented"); }
public void removeResourceBundle(String name)
void removeResourceBundle(String name)
public void removeResourceBundle(String name) { throw new Error("not implemented"); }
throw new Error("not implemented");
bundles.remove (name);
public void removeResourceBundle(String name) { throw new Error("not implemented"); }
public void setDefaultLocale(Locale l)
void setDefaultLocale(Locale loc)
public void setDefaultLocale(Locale l) { throw new Error("not implemented"); }
throw new Error("not implemented");
defaultLocale = loc;
public void setDefaultLocale(Locale l) { throw new Error("not implemented"); }
return null;
if (properties == null) properties = new Hashtable(); return properties;
public Dictionary getDocumentProperties() { return null; }
return null;
Object value = null; if (properties != null) value = properties.get(key); return value;
public Object getProperty(Object key) { return null; }
if (properties == null) properties = new Hashtable(); properties.put(key, value);
public void putProperty(Object key, Object value) { }
properties = x;
public void setDocumentProperties(Dictionary x) { }
public JPopupMenu() { }
public JPopupMenu() { updateUI(); lightWeightPopupEnabled = defaultLWPopupEnabled; selectionModel = new DefaultSingleSelectionModel(); }
public JPopupMenu() { // TODO } // JPopupMenu()
public JMenuItem add(JMenuItem item) { return null; }
public JMenuItem add(JMenuItem item) { this.insert(item, -1); return item; }
public JMenuItem add(JMenuItem item) { return null; // TODO } // add()
public void addPopupMenuListener(PopupMenuListener listener) { }
public void addPopupMenuListener(PopupMenuListener listener) { listenerList.add(PopupMenuListener.class, listener); }
public void addPopupMenuListener(PopupMenuListener listener) { // TODO } // addPopupMenuListener()
protected void firePopupMenuCanceled() { }
protected void firePopupMenuCanceled() { EventListener[] ll = listenerList.getListeners(PopupMenuListener.class); for (int i = 0; i < ll.length; i++) ((PopupMenuListener) ll[i]).popupMenuCanceled(new PopupMenuEvent(this)); }
protected void firePopupMenuCanceled() { // TODO } // firePopupMenuCanceled()
protected void firePopupMenuWillBecomeInvisible() { }
protected void firePopupMenuWillBecomeInvisible() { EventListener[] ll = listenerList.getListeners(PopupMenuListener.class); for (int i = 0; i < ll.length; i++) ((PopupMenuListener) ll[i]).popupMenuWillBecomeInvisible(new PopupMenuEvent(this)); }
protected void firePopupMenuWillBecomeInvisible() { // TODO } // firePopupMenuWillBecomeInvisible()
protected void firePopupMenuWillBecomeVisible() { }
protected void firePopupMenuWillBecomeVisible() { EventListener[] ll = listenerList.getListeners(PopupMenuListener.class); for (int i = 0; i < ll.length; i++) ((PopupMenuListener) ll[i]).popupMenuWillBecomeVisible(new PopupMenuEvent(this)); }
protected void firePopupMenuWillBecomeVisible() { // TODO } // firePopupMenuWillBecomeVisible()
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleJPopupMenu(this); } return accessibleContext; }
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) accessibleContext = new AccessibleJPopupMenu(this); return accessibleContext; }
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) { accessibleContext = new AccessibleJPopupMenu(this); } // if return accessibleContext; } // getAccessibleContext()
public Component getComponent() { return null; }
public Component getComponent() { return this; }
public Component getComponent() { return null; // TODO } // getComponent()
public Component getComponentAtIndex(int index) { return null; }
public Component getComponentAtIndex(int index) { return getComponent(index); }
public Component getComponentAtIndex(int index) { return null; // TODO } // getComponentAtIndex()
public int getComponentIndex(Component component) { return 0; }
public int getComponentIndex(Component component) { Component[] items = getComponents(); for (int i = 0; i < items.length; i++) { if (items[i].equals(component)) return i; } return -1; }
public int getComponentIndex(Component component) { return 0; // TODO } // getComponentIndex()
public static boolean getDefaultLightWeightPopupEnabled() { return false; }
public static boolean getDefaultLightWeightPopupEnabled() { return defaultLWPopupEnabled; }
public static boolean getDefaultLightWeightPopupEnabled() { return false; // TODO } // getDefaultLightWeightPopupEnabled()
public Component getInvoker() { return null; }
public Component getInvoker() { return invoker; }
public Component getInvoker() { return null; // TODO } // getInvoker()
public String getLabel() { return null; }
public String getLabel() { return label; }
public String getLabel() { return null; // TODO } // getLabel()
public Insets getMargin() { return null; }
public Insets getMargin() { return margin; }
public Insets getMargin() { return null; // TODO } // getMargin()
public SingleSelectionModel getSelectionModel() { return null; }
public SingleSelectionModel getSelectionModel() { return selectionModel; }
public SingleSelectionModel getSelectionModel() { return null; // TODO } // getSelectionModel()
public MenuElement[] getSubElements() { return null; }
public MenuElement[] getSubElements() { Component[] items = getComponents(); MenuElement[] subElements = new MenuElement[items.length]; for (int i = 0; i < items.length; i++) subElements[i] = (MenuElement) items[i]; return subElements; }
public MenuElement[] getSubElements() { return null; // TODO } // getSubElements()
public String getUIClassID() { return uiClassID; }
public String getUIClassID() { return "PopupMenuUI"; }
public String getUIClassID() { return uiClassID; } // getUIClassID()
public void insert(Action action, int index) { }
public void insert(Action action, int index) { JMenuItem item = new JMenuItem(action); this.insert(item, index); }
public void insert(Action action, int index) { // TODO } // insert()
public boolean isBorderPainted() { return false; }
public boolean isBorderPainted() { return paintBorder; }
public boolean isBorderPainted() { return false; // TODO } // isBorderPainted()
public boolean isLightWeightPopupEnabled() { return false; }
public boolean isLightWeightPopupEnabled() { return lightWeightPopupEnabled; }
public boolean isLightWeightPopupEnabled() { return false; // TODO } // isLightWeightPopupEnabled()
private boolean isPopupMenu() { return false; }
private boolean isPopupMenu() { return true; }
private boolean isPopupMenu() { return false; // TODO } // isPopupMenu()
public boolean isPopupTrigger(MouseEvent event) { return false; }
public boolean isPopupTrigger(MouseEvent event) { return ((PopupMenuUI)getUI()).isPopupTrigger(event); }
public boolean isPopupTrigger(MouseEvent event) { return false; // TODO } // isPopupTrigger()
public boolean isVisible() { return false; }
public boolean isVisible() { return super.isVisible(); }
public boolean isVisible() { return false; // TODO } // isVisible()
protected void paintBorder(Graphics graphics) { }
protected void paintBorder(Graphics graphics) { if (paintBorder) getBorder().paintBorder(this, graphics, 0, 0, getSize(null).width, getSize(null).height); }
protected void paintBorder(Graphics graphics) { // TODO } // paintBorder()
protected String paramString() { return null; }
protected String paramString() { return "JPopupMenu"; }
protected String paramString() { return null; // TODO } // paramString()
public void remove(int index) { }
public void remove(int index) { super.remove(index); GridBagConstraints constraints = new GridBagConstraints(); constraints.fill = GridBagConstraints.HORIZONTAL; constraints.weightx = 100.0; constraints.weighty = 100.0; Component[] items = getComponents(); for (int i = index; i < items.length; i++) { constraints.gridy = i; super.add(items[i], constraints, i); } }
public void remove(int index) { // TODO } // remove()
public void removePopupMenuListener(PopupMenuListener listener) { }
public void removePopupMenuListener(PopupMenuListener listener) { listenerList.remove(PopupMenuListener.class, listener); }
public void removePopupMenuListener(PopupMenuListener listener) { // TODO } // removePopupMenuListener()
public void setBorderPainted(boolean painted) { }
public void setBorderPainted(boolean painted) { paintBorder = painted; }
public void setBorderPainted(boolean painted) { // TODO } // setBorderPainted()
public static void setDefaultLightWeightPopupEnabled(boolean enabled) { }
public static void setDefaultLightWeightPopupEnabled(boolean enabled) { defaultLWPopupEnabled = enabled; }
public static void setDefaultLightWeightPopupEnabled(boolean enabled) { // TODO } // setDefaultLightWeightPopupEnabled()
public void setInvoker(Component component) { }
public void setInvoker(Component component) { invoker = component; }
public void setInvoker(Component component) { // TODO } // setInvoker()
public void setLabel(String label) { }
public void setLabel(String label) { this.label = label; }
public void setLabel(String label) { // TODO } // setLabel()
public void setLightWeightPopupEnabled(boolean enabled) { }
public void setLightWeightPopupEnabled(boolean enabled) { lightWeightPopupEnabled = enabled; }
public void setLightWeightPopupEnabled(boolean enabled) { // TODO } // setLightWeightPopupEnabled()
public void setLocation(int x, int y) { }
public void setLocation(int x, int y) { locationX = x; locationY = y; }
public void setLocation(int x, int y) { // TODO } // setLocation()
public void setPopupSize(Dimension size) { }
public void setPopupSize(Dimension size) { super.setSize(size); }
public void setPopupSize(Dimension size) { // TODO } // setPopupSize()
public void setSelected(Component selected) { }
public void setSelected(Component selected) { int index = getComponentIndex(selected); selectionModel.setSelectedIndex(index); }
public void setSelected(Component selected) { // TODO } // setSelected()
public void setSelectionModel(SingleSelectionModel model) { }
public void setSelectionModel(SingleSelectionModel model) { if (selectionModel != model) { SingleSelectionModel oldModel = this.selectionModel; } }
public void setSelectionModel(SingleSelectionModel model) { // TODO } // setSelectionModel()
public void setVisible(boolean visible) { }
public void setVisible(boolean visible) { super.setVisible(visible); firePopupMenuWillBecomeVisible(); if (visible) { Container rootContainer = (Container) SwingUtilities.getRoot(invoker); boolean fit = true; Dimension size; if (this.getSize().width == 0 && this.getSize().width == 0) size = this.getPreferredSize(); else size = this.getSize(); if ((size.width > (rootContainer.getWidth() - locationX)) || (size.height > (rootContainer.getHeight() - locationY))) fit = false; if (lightWeightPopupEnabled && fit) popup = new LightWeightPopup(this); else { if (fit) popup = new MediumWeightPopup(this); else popup = new HeavyWeightPopup(this); } if (popup instanceof LightWeightPopup || popup instanceof MediumWeightPopup) { JLayeredPane layeredPane; layeredPane = SwingUtilities.getRootPane(invoker).getLayeredPane(); Point lp = layeredPane.getLocationOnScreen(); Point r = SwingUtilities.getRoot(invoker).getLocationOnScreen(); int px = locationX - (lp.x - r.x); int py = locationY - (lp.y - r.y); popup.show(px, py, size.width, size.height); } else popup.show(locationX, locationY, size.width, size.height); } else { firePopupMenuWillBecomeInvisible(); popup.hide(); } }
public void setVisible(boolean visible) { // TODO } // setVisible()
public void show(Component component, int x, int y) { }
public void show(Component component, int x, int y) { setInvoker(component); Point rootOnScreen; rootOnScreen = SwingUtilities.getRoot(invoker).getLocationOnScreen(); Point invokerOnScreen = invoker.getLocationOnScreen(); int popupX = (invokerOnScreen.x - rootOnScreen.x) + x; int popupY = (invokerOnScreen.y - rootOnScreen.y) + y; setLocation(popupX , popupY); setVisible(true); }
public void show(Component component, int x, int y) { // TODO } // show()
public void updateUI() { setUI((PopupMenuUI) UIManager.get(this)); invalidate(); }
public void updateUI() { setUI((PopupMenuUI) UIManager.getUI(this)); invalidate(); }
public void updateUI() { setUI((PopupMenuUI) UIManager.get(this)); invalidate(); } // updateUI()
UnicastServerRef sref = null; if (obj instanceof RemoteObject) sref = (UnicastServerRef) ((RemoteObject) obj).getRef(); if (sref == null)
ActivatableServerRef sref = null;
public static Remote export(ActivationID id, Remote obj, int port, RMIServerSocketFactory serverSocketFactory) throws RemoteException { UnicastServerRef sref = null; if (obj instanceof RemoteObject) sref = (UnicastServerRef) ((RemoteObject) obj).getRef(); if (sref == null) sref = new ActivatableServerRef(makeId(id), id, port, serverSocketFactory); Remote stub = sref.exportObject(obj); // addStub(obj, stub); // need probably the stub repository elsewhere return stub; }
Remote stub = sref.exportObject(obj); return stub;
return sref.exportObject(obj);
public static Remote export(ActivationID id, Remote obj, int port, RMIServerSocketFactory serverSocketFactory) throws RemoteException { UnicastServerRef sref = null; if (obj instanceof RemoteObject) sref = (UnicastServerRef) ((RemoteObject) obj).getRef(); if (sref == null) sref = new ActivatableServerRef(makeId(id), id, port, serverSocketFactory); Remote stub = sref.exportObject(obj); // addStub(obj, stub); // need probably the stub repository elsewhere return stub; }
return id.activate(false);
try { return toStub( id, Thread.currentThread().getContextClassLoader().loadClass( desc.getClassName())); } catch (ClassNotFoundException e) { throw new ActivationException("Class not found: "+desc.getClassName()); }
public static Remote register(ActivationDesc desc) throws UnknownGroupException, ActivationException, RemoteException { ActivationID id = obtainId(desc); return id.activate(false); }
public ActivatableServerRef(ObjID id, ActivationID anId, int aPort, RMIServerSocketFactory ssFactory) throws RemoteException
public ActivatableServerRef()
public ActivatableServerRef(ObjID id, ActivationID anId, int aPort, RMIServerSocketFactory ssFactory) throws RemoteException { super(id, aPort, ssFactory); actId = anId; // The object ID will be placed in the object map and should deliver // incoming call to {@link #incommingMessageCall}. The object itself // is currently null. UnicastServer.exportActivatableObject(this); }
super(id, aPort, ssFactory); actId = anId; UnicastServer.exportActivatableObject(this);
super();
public ActivatableServerRef(ObjID id, ActivationID anId, int aPort, RMIServerSocketFactory ssFactory) throws RemoteException { super(id, aPort, ssFactory); actId = anId; // The object ID will be placed in the object map and should deliver // incoming call to {@link #incommingMessageCall}. The object itself // is currently null. UnicastServer.exportActivatableObject(this); }
return new EntityReferenceImpl(location, name, null, null, null, null);
EntityDeclaration decl = (EntityDeclaration) entityDeclarations.get(name); return new EntityReferenceImpl(location, decl, name);
public XMLEvent allocate(XMLStreamReader reader) throws XMLStreamException { String text; boolean whitespace; boolean ignorableWhitespace; int len; List namespaces; int eventType = reader.getEventType(); Location location = reader.getLocation(); switch (eventType) { case XMLStreamConstants.CDATA: text = reader.getText(); whitespace = isWhitespace(text); // TODO ignorableWhitespace ignorableWhitespace = whitespace && false; return new CharactersImpl(location, text, whitespace, true, ignorableWhitespace); case XMLStreamConstants.CHARACTERS: text = reader.getText(); whitespace = false; // TODO ignorableWhitespace ignorableWhitespace = whitespace && false; return new CharactersImpl(location, text, whitespace, false, ignorableWhitespace); case XMLStreamConstants.COMMENT: text = reader.getText(); return new CommentImpl(location, text); case XMLStreamConstants.DTD: text = reader.getText(); List notations = new LinkedList(); List entities = new LinkedList(); // TODO readDTDBody(notations, entities); return new DTDImpl(location, text, null, notations, entities); case XMLStreamConstants.END_DOCUMENT: return new EndDocumentImpl(location); case XMLStreamConstants.END_ELEMENT: len = reader.getNamespaceCount(); namespaces = new LinkedList(); for (int i = 0; i < len; i++) namespaces.add(new NamespaceImpl(location, reader.getNamespacePrefix(i), reader.getNamespaceURI(i))); return new EndElementImpl(location, reader.getName(), namespaces); case XMLStreamConstants.ENTITY_REFERENCE: String name = reader.getLocalName(); //EntityDeclaration decl = // (EntityDeclaration) entityDeclarations.get(name); //return new EntityReferenceImpl(location, decl, name); return new EntityReferenceImpl(location, name, null, null, null, null); case XMLStreamConstants.PROCESSING_INSTRUCTION: return new ProcessingInstructionImpl(location, reader.getPITarget(), reader.getPIData()); case XMLStreamConstants.SPACE: text = reader.getText(); whitespace = true; // TODO ignorableWhitespace ignorableWhitespace = whitespace && false; return new CharactersImpl(location, text, whitespace, false, ignorableWhitespace); case XMLStreamConstants.START_DOCUMENT: String systemId = location.getLocationURI(); String encoding = reader.getCharacterEncodingScheme(); boolean encodingDeclared = encoding != null; if (encoding == null) { encoding = reader.getEncoding(); if (encoding == null) encoding = "UTF-8"; } String xmlVersion = reader.getVersion(); if (xmlVersion == null) xmlVersion = "1.0"; boolean xmlStandalone = reader.isStandalone(); boolean standaloneDeclared = reader.standaloneSet(); return new StartDocumentImpl(location, systemId, encoding, xmlVersion, xmlStandalone, standaloneDeclared, encodingDeclared); case XMLStreamConstants.START_ELEMENT: len = reader.getNamespaceCount(); namespaces = new LinkedList(); for (int i = 0; i < len; i++) namespaces.add(new NamespaceImpl(location, reader.getNamespacePrefix(i), reader.getNamespaceURI(i))); len = reader.getAttributeCount(); List attributes = new LinkedList(); for (int i = 0; i < len; i++) attributes.add(new AttributeImpl(location, reader.getAttributeQName(i), reader.getAttributeValue(i), QName.valueOf(reader.getAttributeType(i)), reader.isAttributeSpecified(i))); return new StartElementImpl(location, reader.getName(), attributes, namespaces, reader.getNamespaceContext()); default: throw new XMLStreamException("Unknown event type: " + eventType); } }
String systemId = location.getLocationURI();
String systemId = location.getSystemId();
public XMLEvent allocate(XMLStreamReader reader) throws XMLStreamException { String text; boolean whitespace; boolean ignorableWhitespace; int len; List namespaces; int eventType = reader.getEventType(); Location location = reader.getLocation(); switch (eventType) { case XMLStreamConstants.CDATA: text = reader.getText(); whitespace = isWhitespace(text); // TODO ignorableWhitespace ignorableWhitespace = whitespace && false; return new CharactersImpl(location, text, whitespace, true, ignorableWhitespace); case XMLStreamConstants.CHARACTERS: text = reader.getText(); whitespace = false; // TODO ignorableWhitespace ignorableWhitespace = whitespace && false; return new CharactersImpl(location, text, whitespace, false, ignorableWhitespace); case XMLStreamConstants.COMMENT: text = reader.getText(); return new CommentImpl(location, text); case XMLStreamConstants.DTD: text = reader.getText(); List notations = new LinkedList(); List entities = new LinkedList(); // TODO readDTDBody(notations, entities); return new DTDImpl(location, text, null, notations, entities); case XMLStreamConstants.END_DOCUMENT: return new EndDocumentImpl(location); case XMLStreamConstants.END_ELEMENT: len = reader.getNamespaceCount(); namespaces = new LinkedList(); for (int i = 0; i < len; i++) namespaces.add(new NamespaceImpl(location, reader.getNamespacePrefix(i), reader.getNamespaceURI(i))); return new EndElementImpl(location, reader.getName(), namespaces); case XMLStreamConstants.ENTITY_REFERENCE: String name = reader.getLocalName(); //EntityDeclaration decl = // (EntityDeclaration) entityDeclarations.get(name); //return new EntityReferenceImpl(location, decl, name); return new EntityReferenceImpl(location, name, null, null, null, null); case XMLStreamConstants.PROCESSING_INSTRUCTION: return new ProcessingInstructionImpl(location, reader.getPITarget(), reader.getPIData()); case XMLStreamConstants.SPACE: text = reader.getText(); whitespace = true; // TODO ignorableWhitespace ignorableWhitespace = whitespace && false; return new CharactersImpl(location, text, whitespace, false, ignorableWhitespace); case XMLStreamConstants.START_DOCUMENT: String systemId = location.getLocationURI(); String encoding = reader.getCharacterEncodingScheme(); boolean encodingDeclared = encoding != null; if (encoding == null) { encoding = reader.getEncoding(); if (encoding == null) encoding = "UTF-8"; } String xmlVersion = reader.getVersion(); if (xmlVersion == null) xmlVersion = "1.0"; boolean xmlStandalone = reader.isStandalone(); boolean standaloneDeclared = reader.standaloneSet(); return new StartDocumentImpl(location, systemId, encoding, xmlVersion, xmlStandalone, standaloneDeclared, encodingDeclared); case XMLStreamConstants.START_ELEMENT: len = reader.getNamespaceCount(); namespaces = new LinkedList(); for (int i = 0; i < len; i++) namespaces.add(new NamespaceImpl(location, reader.getNamespacePrefix(i), reader.getNamespaceURI(i))); len = reader.getAttributeCount(); List attributes = new LinkedList(); for (int i = 0; i < len; i++) attributes.add(new AttributeImpl(location, reader.getAttributeQName(i), reader.getAttributeValue(i), QName.valueOf(reader.getAttributeType(i)), reader.isAttributeSpecified(i))); return new StartElementImpl(location, reader.getName(), attributes, namespaces, reader.getNamespaceContext()); default: throw new XMLStreamException("Unknown event type: " + eventType); } }
reader.getAttributeQName(i),
reader.getAttributeName(i),
public XMLEvent allocate(XMLStreamReader reader) throws XMLStreamException { String text; boolean whitespace; boolean ignorableWhitespace; int len; List namespaces; int eventType = reader.getEventType(); Location location = reader.getLocation(); switch (eventType) { case XMLStreamConstants.CDATA: text = reader.getText(); whitespace = isWhitespace(text); // TODO ignorableWhitespace ignorableWhitespace = whitespace && false; return new CharactersImpl(location, text, whitespace, true, ignorableWhitespace); case XMLStreamConstants.CHARACTERS: text = reader.getText(); whitespace = false; // TODO ignorableWhitespace ignorableWhitespace = whitespace && false; return new CharactersImpl(location, text, whitespace, false, ignorableWhitespace); case XMLStreamConstants.COMMENT: text = reader.getText(); return new CommentImpl(location, text); case XMLStreamConstants.DTD: text = reader.getText(); List notations = new LinkedList(); List entities = new LinkedList(); // TODO readDTDBody(notations, entities); return new DTDImpl(location, text, null, notations, entities); case XMLStreamConstants.END_DOCUMENT: return new EndDocumentImpl(location); case XMLStreamConstants.END_ELEMENT: len = reader.getNamespaceCount(); namespaces = new LinkedList(); for (int i = 0; i < len; i++) namespaces.add(new NamespaceImpl(location, reader.getNamespacePrefix(i), reader.getNamespaceURI(i))); return new EndElementImpl(location, reader.getName(), namespaces); case XMLStreamConstants.ENTITY_REFERENCE: String name = reader.getLocalName(); //EntityDeclaration decl = // (EntityDeclaration) entityDeclarations.get(name); //return new EntityReferenceImpl(location, decl, name); return new EntityReferenceImpl(location, name, null, null, null, null); case XMLStreamConstants.PROCESSING_INSTRUCTION: return new ProcessingInstructionImpl(location, reader.getPITarget(), reader.getPIData()); case XMLStreamConstants.SPACE: text = reader.getText(); whitespace = true; // TODO ignorableWhitespace ignorableWhitespace = whitespace && false; return new CharactersImpl(location, text, whitespace, false, ignorableWhitespace); case XMLStreamConstants.START_DOCUMENT: String systemId = location.getLocationURI(); String encoding = reader.getCharacterEncodingScheme(); boolean encodingDeclared = encoding != null; if (encoding == null) { encoding = reader.getEncoding(); if (encoding == null) encoding = "UTF-8"; } String xmlVersion = reader.getVersion(); if (xmlVersion == null) xmlVersion = "1.0"; boolean xmlStandalone = reader.isStandalone(); boolean standaloneDeclared = reader.standaloneSet(); return new StartDocumentImpl(location, systemId, encoding, xmlVersion, xmlStandalone, standaloneDeclared, encodingDeclared); case XMLStreamConstants.START_ELEMENT: len = reader.getNamespaceCount(); namespaces = new LinkedList(); for (int i = 0; i < len; i++) namespaces.add(new NamespaceImpl(location, reader.getNamespacePrefix(i), reader.getNamespaceURI(i))); len = reader.getAttributeCount(); List attributes = new LinkedList(); for (int i = 0; i < len; i++) attributes.add(new AttributeImpl(location, reader.getAttributeQName(i), reader.getAttributeValue(i), QName.valueOf(reader.getAttributeType(i)), reader.isAttributeSpecified(i))); return new StartElementImpl(location, reader.getName(), attributes, namespaces, reader.getNamespaceContext()); default: throw new XMLStreamException("Unknown event type: " + eventType); } }
GetPropertyAction getProp = new GetPropertyAction("line.separator"); String nl = (String) AccessController.doPrivileged(getProp);
String nl = SystemProperties.getProperty("line.separator");
public String toString() { StringBuffer str = new StringBuffer(X509CRLSelector.class.getName()); GetPropertyAction getProp = new GetPropertyAction("line.separator"); String nl = (String) AccessController.doPrivileged(getProp); String eol = ";" + nl; str.append(" {").append(nl); if (issuerNames != null) str.append(" issuer names = ").append(issuerNames).append(eol); if (maxCrlNumber != null) str.append(" max CRL = ").append(maxCrlNumber).append(eol); if (minCrlNumber != null) str.append(" min CRL = ").append(minCrlNumber).append(eol); if (date != null) str.append(" date = ").append(date).append(eol); if (cert != null) str.append(" certificate = ").append(cert).append(eol); str.append("}").append(nl); return str.toString(); }
throws NotImplementedException
public void end(HTML.Tag t) throws NotImplementedException { // FIXME: Implement. print ("HiddenAction.end not implemented"); }
print ("HiddenAction.end not implemented");
blockClose(t);
public void end(HTML.Tag t) throws NotImplementedException { // FIXME: Implement. print ("HiddenAction.end not implemented"); }
throws NotImplementedException
public void start(HTML.Tag t, MutableAttributeSet a) throws NotImplementedException { // FIXME: Implement. print ("HiddenAction.start not implemented"); }
print ("HiddenAction.start not implemented");
blockOpen(t, a);
public void start(HTML.Tag t, MutableAttributeSet a) throws NotImplementedException { // FIXME: Implement. print ("HiddenAction.start not implemented"); }
throws NotImplementedException
public void start(HTML.Tag t, MutableAttributeSet a) throws NotImplementedException { // FIXME: Implement. print ("SpecialAction.start not implemented"); }
print ("SpecialAction.start not implemented");
addSpecialElement(t, a);
public void start(HTML.Tag t, MutableAttributeSet a) throws NotImplementedException { // FIXME: Implement. print ("SpecialAction.start not implemented"); }
throws NotImplementedException
protected void addSpecialElement(HTML.Tag t, MutableAttributeSet a) throws NotImplementedException { // FIXME: Implement print ("HTMLReader.addSpecialElement not implemented yet"); }
print ("HTMLReader.addSpecialElement not implemented yet");
a.addAttribute(StyleConstants.NameAttribute, t); AttributeSet copy = a.copyAttributes(); DefaultStyledDocument.ElementSpec spec; spec = new DefaultStyledDocument.ElementSpec(copy, DefaultStyledDocument.ElementSpec.ContentType, new char[] {' '}, 0, 1 ); parseBuffer.add(spec);
protected void addSpecialElement(HTML.Tag t, MutableAttributeSet a) throws NotImplementedException { // FIXME: Implement print ("HTMLReader.addSpecialElement not implemented yet"); }
public HTMLEditorKit.ParserCallback getReader(int pos, int popDepth, int pushDepth, HTML.Tag insertTag)
public HTMLEditorKit.ParserCallback getReader(int pos)
public HTMLEditorKit.ParserCallback getReader(int pos, int popDepth, int pushDepth, HTML.Tag insertTag) { return new HTMLReader(pos, popDepth, pushDepth, insertTag); }
return new HTMLReader(pos, popDepth, pushDepth, insertTag);
return new HTMLReader(pos);
public HTMLEditorKit.ParserCallback getReader(int pos, int popDepth, int pushDepth, HTML.Tag insertTag) { return new HTMLReader(pos, popDepth, pushDepth, insertTag); }
if(a.getAttribute("color") != null)
Object color = a.getAttribute(Attribute.COLOR); if(color != null)
public static boolean translateTag(MutableAttributeSet charAttr, Tag t, MutableAttributeSet a) { if(t == Tag.FONT) { if(a.getAttribute("color") != null) { Color c = getColor(""+a.getAttribute("color")); if( c == null ) return false; charAttr.addAttribute(StyleConstants.Foreground, c); return true; } if(a.getAttribute("size") != null) { // FIXME // charAttr.addAttribute(StyleConstants.FontSize, // new java.lang.Integer(72)); return true; } } if( t == Tag.B ) { charAttr.addAttribute(StyleConstants.Bold, new Boolean(true)); return true; } if( t == Tag.I ) { charAttr.addAttribute(StyleConstants.Italic, new Boolean(true)); return true; } if( t == Tag.U ) { charAttr.addAttribute(StyleConstants.Underline, new Boolean(true)); return true; } if( t == Tag.STRIKE ) { charAttr.addAttribute(StyleConstants.StrikeThrough, new Boolean(true)); return true; } if( t == Tag.SUP ) { charAttr.addAttribute(StyleConstants.Superscript, new Boolean(true)); return true; } if( t == Tag.SUB ) { charAttr.addAttribute(StyleConstants.Subscript, new Boolean(true)); return true; } return false; }
Color c = getColor(""+a.getAttribute("color"));
Color c = getColor(color.toString());
public static boolean translateTag(MutableAttributeSet charAttr, Tag t, MutableAttributeSet a) { if(t == Tag.FONT) { if(a.getAttribute("color") != null) { Color c = getColor(""+a.getAttribute("color")); if( c == null ) return false; charAttr.addAttribute(StyleConstants.Foreground, c); return true; } if(a.getAttribute("size") != null) { // FIXME // charAttr.addAttribute(StyleConstants.FontSize, // new java.lang.Integer(72)); return true; } } if( t == Tag.B ) { charAttr.addAttribute(StyleConstants.Bold, new Boolean(true)); return true; } if( t == Tag.I ) { charAttr.addAttribute(StyleConstants.Italic, new Boolean(true)); return true; } if( t == Tag.U ) { charAttr.addAttribute(StyleConstants.Underline, new Boolean(true)); return true; } if( t == Tag.STRIKE ) { charAttr.addAttribute(StyleConstants.StrikeThrough, new Boolean(true)); return true; } if( t == Tag.SUP ) { charAttr.addAttribute(StyleConstants.Superscript, new Boolean(true)); return true; } if( t == Tag.SUB ) { charAttr.addAttribute(StyleConstants.Subscript, new Boolean(true)); return true; } return false; }
if(a.getAttribute("size") != null)
if(a.getAttribute(Attribute.SIZE) != null)
public static boolean translateTag(MutableAttributeSet charAttr, Tag t, MutableAttributeSet a) { if(t == Tag.FONT) { if(a.getAttribute("color") != null) { Color c = getColor(""+a.getAttribute("color")); if( c == null ) return false; charAttr.addAttribute(StyleConstants.Foreground, c); return true; } if(a.getAttribute("size") != null) { // FIXME // charAttr.addAttribute(StyleConstants.FontSize, // new java.lang.Integer(72)); return true; } } if( t == Tag.B ) { charAttr.addAttribute(StyleConstants.Bold, new Boolean(true)); return true; } if( t == Tag.I ) { charAttr.addAttribute(StyleConstants.Italic, new Boolean(true)); return true; } if( t == Tag.U ) { charAttr.addAttribute(StyleConstants.Underline, new Boolean(true)); return true; } if( t == Tag.STRIKE ) { charAttr.addAttribute(StyleConstants.StrikeThrough, new Boolean(true)); return true; } if( t == Tag.SUP ) { charAttr.addAttribute(StyleConstants.Superscript, new Boolean(true)); return true; } if( t == Tag.SUB ) { charAttr.addAttribute(StyleConstants.Subscript, new Boolean(true)); return true; } return false; }
charAttr.addAttribute(StyleConstants.Bold, new Boolean(true));
charAttr.addAttribute(StyleConstants.Bold, Boolean.TRUE);
public static boolean translateTag(MutableAttributeSet charAttr, Tag t, MutableAttributeSet a) { if(t == Tag.FONT) { if(a.getAttribute("color") != null) { Color c = getColor(""+a.getAttribute("color")); if( c == null ) return false; charAttr.addAttribute(StyleConstants.Foreground, c); return true; } if(a.getAttribute("size") != null) { // FIXME // charAttr.addAttribute(StyleConstants.FontSize, // new java.lang.Integer(72)); return true; } } if( t == Tag.B ) { charAttr.addAttribute(StyleConstants.Bold, new Boolean(true)); return true; } if( t == Tag.I ) { charAttr.addAttribute(StyleConstants.Italic, new Boolean(true)); return true; } if( t == Tag.U ) { charAttr.addAttribute(StyleConstants.Underline, new Boolean(true)); return true; } if( t == Tag.STRIKE ) { charAttr.addAttribute(StyleConstants.StrikeThrough, new Boolean(true)); return true; } if( t == Tag.SUP ) { charAttr.addAttribute(StyleConstants.Superscript, new Boolean(true)); return true; } if( t == Tag.SUB ) { charAttr.addAttribute(StyleConstants.Subscript, new Boolean(true)); return true; } return false; }
charAttr.addAttribute(StyleConstants.Italic, new Boolean(true));
charAttr.addAttribute(StyleConstants.Italic, Boolean.TRUE);
public static boolean translateTag(MutableAttributeSet charAttr, Tag t, MutableAttributeSet a) { if(t == Tag.FONT) { if(a.getAttribute("color") != null) { Color c = getColor(""+a.getAttribute("color")); if( c == null ) return false; charAttr.addAttribute(StyleConstants.Foreground, c); return true; } if(a.getAttribute("size") != null) { // FIXME // charAttr.addAttribute(StyleConstants.FontSize, // new java.lang.Integer(72)); return true; } } if( t == Tag.B ) { charAttr.addAttribute(StyleConstants.Bold, new Boolean(true)); return true; } if( t == Tag.I ) { charAttr.addAttribute(StyleConstants.Italic, new Boolean(true)); return true; } if( t == Tag.U ) { charAttr.addAttribute(StyleConstants.Underline, new Boolean(true)); return true; } if( t == Tag.STRIKE ) { charAttr.addAttribute(StyleConstants.StrikeThrough, new Boolean(true)); return true; } if( t == Tag.SUP ) { charAttr.addAttribute(StyleConstants.Superscript, new Boolean(true)); return true; } if( t == Tag.SUB ) { charAttr.addAttribute(StyleConstants.Subscript, new Boolean(true)); return true; } return false; }
charAttr.addAttribute(StyleConstants.Underline, new Boolean(true));
charAttr.addAttribute(StyleConstants.Underline, Boolean.TRUE);
public static boolean translateTag(MutableAttributeSet charAttr, Tag t, MutableAttributeSet a) { if(t == Tag.FONT) { if(a.getAttribute("color") != null) { Color c = getColor(""+a.getAttribute("color")); if( c == null ) return false; charAttr.addAttribute(StyleConstants.Foreground, c); return true; } if(a.getAttribute("size") != null) { // FIXME // charAttr.addAttribute(StyleConstants.FontSize, // new java.lang.Integer(72)); return true; } } if( t == Tag.B ) { charAttr.addAttribute(StyleConstants.Bold, new Boolean(true)); return true; } if( t == Tag.I ) { charAttr.addAttribute(StyleConstants.Italic, new Boolean(true)); return true; } if( t == Tag.U ) { charAttr.addAttribute(StyleConstants.Underline, new Boolean(true)); return true; } if( t == Tag.STRIKE ) { charAttr.addAttribute(StyleConstants.StrikeThrough, new Boolean(true)); return true; } if( t == Tag.SUP ) { charAttr.addAttribute(StyleConstants.Superscript, new Boolean(true)); return true; } if( t == Tag.SUB ) { charAttr.addAttribute(StyleConstants.Subscript, new Boolean(true)); return true; } return false; }