bugged
stringlengths
6
599k
fixed
stringlengths
10
599k
__index_level_0__
int64
0
1.13M
public static void initialize() { if (!inited) { // Initialize resource manager final ResourceManager rm = ResourceManagerImpl.initialize(); VmSystem.out = getSystemOut(); /* Initialize the system classloader */ VmSystemClassLoader loader = (VmSystemClassLoader) (getVmClass(VmProcessor.current()).getLoader()); systemLoader = loader; loader.initialize(); // Initialize VmThread VmThread.initialize(); /* Initialize the monitor system */ MonitorManager.initialize(); final Vm vm = Vm.getVm(); // Initialize the monitors for the heap manager Vm.getHeapManager().start(); // Find & start all processors vm.initializeProcessors(rm); /* We're done initializing */ inited = true; VmProcessor.current().systemReadyForThreadSwitch(); // Load the command line final Properties props = System.getProperties(); props.setProperty("jnode.cmdline", getCmdLine()); // Make sure that we have the default locale, // otherwise String.toLowerCase fails because it needs itself // via Locale.getDefault. Locale.getDefault(); // Calibrate the processors VmProcessor.current().calibrate(); // Load the initial jarfile initJar = loadInitJar(rm); // Initialize log4j final Logger root = Logger.getRootLogger(); final ConsoleAppender infoApp = new ConsoleAppender( new PatternLayout(LAYOUT)); root.addAppender(infoApp); } }
public static void initialize() { if (!inited) { // Initialize resource manager final ResourceManager rm = ResourceManagerImpl.initialize(); VmSystem.out = getSystemOut(); /* Initialize the system classloader */ VmSystemClassLoader loader = (VmSystemClassLoader) (getVmClass(VmProcessor.current()).getLoader()); systemLoader = loader; loader.initialize(); // Initialize VmThread VmThread.initialize(); /* Initialize the monitor system */ final Vm vm = Vm.getVm(); // Initialize the monitors for the heap manager Vm.getHeapManager().start(); // Find & start all processors vm.initializeProcessors(rm); /* We're done initializing */ inited = true; VmProcessor.current().systemReadyForThreadSwitch(); // Load the command line final Properties props = System.getProperties(); props.setProperty("jnode.cmdline", getCmdLine()); // Make sure that we have the default locale, // otherwise String.toLowerCase fails because it needs itself // via Locale.getDefault. Locale.getDefault(); // Calibrate the processors VmProcessor.current().calibrate(); // Load the initial jarfile initJar = loadInitJar(rm); // Initialize log4j final Logger root = Logger.getRootLogger(); final ConsoleAppender infoApp = new ConsoleAppender( new PatternLayout(LAYOUT)); root.addAppender(infoApp); } }
12,607
static public List<String> getEntryNames(Iterator<FSEntry> it) { List<String> names = new ArrayList<String>(); while (it.hasNext()) { FSEntry entry = it.next(); names.add((entry == null) ? null : entry.getName()); } return names; }
static public List<String> getEntryNames(Iterator<? extends FSEntry> it) { List<String> names = new ArrayList<String>(); while (it.hasNext()) { FSEntry entry = it.next(); names.add((entry == null) ? null : entry.getName()); } return names; }
12,608
static public void listEntries(Iterator<FSEntry> iterator) throws Exception { log.debug("<<< BEGIN listEntries >>>"); int i = 0; log.debug("------- entries ------"); while (iterator.hasNext()) { FSEntry entry = iterator.next(); log.debug(i + ":" + entry); i++; } log.debug("--- End of entries ---"); log.debug("<<< END listEntries >>>"); }
static public void listEntries(Iterator<? extends FSEntry> iterator) throws Exception { log.debug("<<< BEGIN listEntries >>>"); int i = 0; log.debug("------- entries ------"); while (iterator.hasNext()) { FSEntry entry = iterator.next(); log.debug(i + ":" + entry); i++; } log.debug("--- End of entries ---"); log.debug("<<< END listEntries >>>"); }
12,609
static public String toString(List<String> list) { StringBuffer sb = new StringBuffer("["); for (int i = 0; i < list.size(); i++) { if (i > 0) { sb.append(", "); } sb.append(list.get(i)); } sb.append("]"); return sb.toString(); }
static public String toString(List<String> list) { StringBuffer sb = new StringBuffer("["); for (int i = 0; i < list.size(); i++) { if (i > 0) { sb.append(", "); } sb.append(list.get(i)); } sb.append("]"); return sb.toString(); }
12,610
public void addActionListener(ActionListener l) { // comp.enableEvents( AWTEvent.ACTION_EVENT_MASK ); actions.addElement(l); }
public void addActionListener(ActionListener l) { // comp.enableEvents( AWTEvent.ACTION_EVENT_MASK ); actions.addElement(l); }
12,612
public void addChangeListener(ChangeListener l) { changes.addElement(l); }
public void addChangeListener(ChangeListener l) { changes.addElement(l); }
12,613
public void addItemListener(ItemListener l) { items.addElement(l); }
public void addItemListener(ItemListener l) { items.addElement(l); }
12,614
public void fireItemStateChanged(ItemEvent event) { for (int i = 0; i < items.size(); i++) { ItemListener a = (ItemListener) items.get(i); a.itemStateChanged(event); } }
public void fireItemStateChanged(ItemEvent event) { for (int i = 0; i < items.size(); i++) { ItemListener a = (ItemListener) items.get(i); a.itemStateChanged(event); } }
12,615
public void fireStateChanged(ChangeEvent event) { for (int i = 0; i < changes.size(); i++) { ChangeListener a = (ChangeListener) changes.get(i); a.stateChanged(event); } }
public void fireStateChanged(ChangeEvent event) { for (int i = 0; i < changes.size(); i++) { ChangeListener a = (ChangeListener) changes.get(i); a.stateChanged(event); } }
12,616
public String getActionCommand() { return com; }
public String getActionCommand() { return com; }
12,617
public int getMnemonic() { return mne; }
public int getMnemonic() { return mne; }
12,618
public boolean isRollover() { return roll; }
public boolean isRollover() { return roll; }
12,619
public void removeActionListener(ActionListener l) { actions.removeElement(l); }
public void removeActionListener(ActionListener l) { actions.removeElement(l); }
12,620
public void removeChangeListener(ChangeListener l) { changes.removeElement(l); }
public void removeChangeListener(ChangeListener l) { changes.removeElement(l); }
12,621
public void removeItemListener(ItemListener l) { items.removeElement(l); }
public void removeItemListener(ItemListener l) { items.removeElement(l); }
12,622
public void setActionCommand(String s) { com = s; }
public void setActionCommand(String s) { com = s; }
12,623
public void setArmed(boolean b) { arm = b; }
public void setArmed(boolean b) { arm = b; }
12,624
public void setEnabled(boolean b) { enabled = b; }
public void setEnabled(boolean b) { enabled = b; }
12,625
public void setGroup(ButtonGroup group) { this.group = group; }
public void setGroup(ButtonGroup group) { this.group = group; }
12,626
public void setMnemonic(int key) { mne = key; }
public void setMnemonic(int key) { mne = key; }
12,627
public void setRollover(boolean b) { roll = b; }
public void setRollover(boolean b) { roll = b; }
12,628
public final void visit_iinc(int index, int incValue) { vstack.loadLocal(eContext, index); // avoid aliasing throubles final int ebpOfs = stackFrame.getEbpOffset(index); X86RegisterPool pool = eContext.getPool(); final Register r = (Register)pool.request(Item.INT); //IMPROVE: use INC or ADD reg, 1 os.writeMOV_Const(r, incValue); os.writeADD(FP, ebpOfs, r); pool.release(r); }
public final void visit_iinc(int index, int incValue) { final int ebpOfs = stackFrame.getEbpOffset(index); // avoid aliasing throubles final int ebpOfs = stackFrame.getEbpOffset(index); X86RegisterPool pool = eContext.getPool(); final Register r = (Register)pool.request(Item.INT); //IMPROVE: use INC or ADD reg, 1 os.writeMOV_Const(r, incValue); os.writeADD(FP, ebpOfs, r); pool.release(r); }
12,632
public final void visit_iinc(int index, int incValue) { vstack.loadLocal(eContext, index); // avoid aliasing throubles final int ebpOfs = stackFrame.getEbpOffset(index); X86RegisterPool pool = eContext.getPool(); final Register r = (Register)pool.request(Item.INT); //IMPROVE: use INC or ADD reg, 1 os.writeMOV_Const(r, incValue); os.writeADD(FP, ebpOfs, r); pool.release(r); }
public final void visit_iinc(int index, int incValue) { vstack.loadLocal(eContext, index); // avoid aliasing throubles vstack.loadLocal(eContext, ebpOfs); X86RegisterPool pool = eContext.getPool(); final Register r = (Register)pool.request(Item.INT); //IMPROVE: use INC or ADD reg, 1 os.writeMOV_Const(r, incValue); os.writeADD(FP, ebpOfs, r); pool.release(r); }
12,633
public void emitTrailer(int maxLocals) { final int argSlotCount = method.getArgSlotCount(); final Label stackOverflowLabel = helper.genLabel("$$stack-overflow"); // Begin footer // Now start the actual footer os.setObjectRef(footerLabel); /* Go restore the previous current frame */ emitSynchronizationCode(context.getMonitorExitMethod()); os.writeLEA(Register.ESP, Register.EBP, EbpFrameRefOffset); os.writePOP(Register.EBP); restoreRegisters(); // Return if (argSlotCount > 0) { os.writeRET(argSlotCount * 4); } else { os.writeRET(); } // End footer // Begin header // Init starts here os.setObjectRef(initLabel); // Test stack overflow final int stackEndOffset = context.getVmProcessorStackEnd().getOffset(); os.writePrefix(X86Constants.FS_PREFIX); os.writeCMP_MEM(Register.ESP, stackEndOffset); os.writeJCC(stackOverflowLabel, X86Constants.JLE); // Create class initialization code (if needed) helper.writeClassInitialize(method, EAX, ECX); // Increment the invocation count helper.writeIncInvocationCount(EAX); // Fixed framelayout saveRegisters(); os.writePUSH(Register.EBP); os.writePUSH(context.getMagic()); //os.writePUSH(0); // PC, which is only used in interpreted methods /** EAX MUST contain the VmMethod structure upon entry of the method */ os.writePUSH(Register.EAX); os.writeMOV(INTSIZE, Register.EBP, Register.ESP); // Emit the code to create the locals final int noLocalVars = maxLocals - argSlotCount; // Create and clear all local variables if (noLocalVars > 0) { os.writeXOR(Register.EAX, Register.EAX); for (int i = 0; i < noLocalVars; i++) { os.writePUSH(Register.EAX); } } // Load the statics table reference if (method.canThrow(LoadStaticsPragma.class)) { helper.writeLoadSTATICS(helper.genLabel("$$edi"), "init", false); } /* Create the synchronization enter code */ emitSynchronizationCode(context.getMonitorEnterMethod()); // And jump back to the actual code start os.writeJMP(startCodeLabel); // Write stack overflow code os.setObjectRef(stackOverflowLabel); os.writeINT(0x31); // End header // No set the exception start&endPtr's //final int noLocals = bc.getNoLocals(); //final int noLocalVars = noLocals - noArgs; final int count = bc.getNoExceptionHandlers(); CompiledExceptionHandler[] ceh = new CompiledExceptionHandler[count]; for (int i = 0; i < count; i++) { final VmInterpretedExceptionHandler eh = bc.getExceptionHandler(i); final Label handlerLabel = helper.genLabel("$$ex-handler" + i); final ObjectRef handlerRef = os.setObjectRef(handlerLabel); /** Clear the calculation stack (only locals are left) */ os.writeLEA(Register.ESP, Register.EBP, -(noLocalVars * 4)); /** Push the exception in EAX */ os.writePUSH(Register.EAX); /** Goto the real handler */ os.writeJMP(helper.getInstrLabel(eh.getHandlerPC())); ceh[i] = new CompiledExceptionHandler(); ceh[i].setStartPc(os.getObjectRef(helper.getInstrLabel(eh .getStartPC()))); ceh[i].setEndPc(os .getObjectRef(helper.getInstrLabel(eh.getEndPC()))); ceh[i].setHandler(handlerRef); } cm.setExceptionHandlers(ceh); // Now create the default exception handler Label handlerLabel = helper.genLabel("$$def-ex-handler"); cm.setDefExceptionHandler(os.setObjectRef(handlerLabel)); emitSynchronizationCode(context.getMonitorExitMethod()); os.writeLEA(Register.ESP, Register.EBP, EbpFrameRefOffset); os.writePOP(Register.EBP); restoreRegisters(); /** * Do not do a ret here, this way the return address will be used by * vm_athrow as its return address */ helper.writeJumpTableJMP(X86JumpTable.VM_ATHROW_NOTRACE_OFS); //os.writeJMP(helper.VM_ATHROW_NOTRACE); codeObject.markEnd(); cm.setCodeEnd(os.setObjectRef(helper.genLabel("$$end-code-object"))); }
public void emitTrailer(int maxLocals) { final int argSlotCount = method.getArgSlotCount(); final Label stackOverflowLabel = helper.genLabel("$$stack-overflow"); // Begin footer // Now start the actual footer os.setObjectRef(footerLabel); /* Go restore the previous current frame */ emitSynchronizationCode(context.getMonitorExitMethod()); os.writeLEA(Register.ESP, Register.EBP, EbpFrameRefOffset); os.writePOP(Register.EBP); restoreRegisters(); // Return if (argSlotCount > 0) { os.writeRET(argSlotCount * 4); } else { os.writeRET(); } // End footer // Begin header // Init starts here os.setObjectRef(initLabel); // Test stack overflow final int stackEndOffset = context.getVmProcessorStackEnd().getOffset(); os.writePrefix(X86Constants.FS_PREFIX); os.writeCMP_MEM(Register.ESP, stackEndOffset); os.writeJCC(stackOverflowLabel, X86Constants.JLE); // Create class initialization code (if needed) helper.writeClassInitialize(method, EAX, ECX); // Increment the invocation count helper.writeIncInvocationCount(EAX); // Fixed framelayout saveRegisters(); os.writePUSH(Register.EBP); os.writePUSH(context.getMagic()); //os.writePUSH(0); // PC, which is only used in interpreted methods /** EAX MUST contain the VmMethod structure upon entry of the method */ os.writePUSH(Register.EAX); os.writeMOV(INTSIZE, Register.EBP, Register.ESP); // Emit the code to create the locals final int noLocalVars = maxLocals - argSlotCount; // Create and clear all local variables if (noLocalVars > 0) { os.writeXOR(Register.EAX, Register.EAX); for (int i = 0; i < noLocalVars; i++) { os.writePUSH(Register.EAX); } } // Load the statics table reference if (method.canThrow(LoadStaticsPragma.class)) { helper.writeLoadSTATICS(helper.genLabel("$$edi"), "init", false); } /* Create the synchronization enter code */ emitSynchronizationCode(context.getMonitorEnterMethod()); // And jump back to the actual code start os.writeJMP(startCodeLabel); // Write stack overflow code os.setObjectRef(stackOverflowLabel); os.writeINT(0x31); // End header // No set the exception start&endPtr's //final int noLocals = bc.getNoLocals(); //final int noLocalVars = noLocals - noArgs; final int count = bc.getNoExceptionHandlers(); CompiledExceptionHandler[] ceh = new CompiledExceptionHandler[count]; for (int i = 0; i < count; i++) { final VmInterpretedExceptionHandler eh = bc.getExceptionHandler(i); final Label handlerLabel = helper.genLabel("$$ex-handler" + i); final ObjectRef handlerRef = os.setObjectRef(handlerLabel); /** Clear the calculation stack (only locals are left) */ if (noLocalVars < 0) { System.out.println("@#@#@#@# noLocalVars = " + noLocalVars); } final int ofs = Math.max(0, noLocalVars) * 4; os.writeLEA(Register.ESP, Register.EBP, -ofs); /** Push the exception in EAX */ os.writePUSH(Register.EAX); /** Goto the real handler */ os.writeJMP(helper.getInstrLabel(eh.getHandlerPC())); ceh[i] = new CompiledExceptionHandler(); ceh[i].setStartPc(os.getObjectRef(helper.getInstrLabel(eh .getStartPC()))); ceh[i].setEndPc(os .getObjectRef(helper.getInstrLabel(eh.getEndPC()))); ceh[i].setHandler(handlerRef); } cm.setExceptionHandlers(ceh); // Now create the default exception handler Label handlerLabel = helper.genLabel("$$def-ex-handler"); cm.setDefExceptionHandler(os.setObjectRef(handlerLabel)); emitSynchronizationCode(context.getMonitorExitMethod()); os.writeLEA(Register.ESP, Register.EBP, EbpFrameRefOffset); os.writePOP(Register.EBP); restoreRegisters(); /** * Do not do a ret here, this way the return address will be used by * vm_athrow as its return address */ helper.writeJumpTableJMP(X86JumpTable.VM_ATHROW_NOTRACE_OFS); //os.writeJMP(helper.VM_ATHROW_NOTRACE); codeObject.markEnd(); cm.setCodeEnd(os.setObjectRef(helper.genLabel("$$end-code-object"))); }
12,636
public void startInlinedMethod(VmMethod inlinedMethod, Label curInstrLabel) { this.labelPrefix = curInstrLabel + "_" + inlinedMethod + "_"; this.instrLabelPrefix = labelPrefix + "_bci_"; this.addressLabels.clear(); }
public void startInlinedMethod(VmMethod inlinedMethod, Label curInstrLabel) { this.labelPrefix = curInstrLabel + "_" + inlinedMethod.getName() + "_"; this.instrLabelPrefix = labelPrefix + "_bci_"; this.addressLabels.clear(); }
12,637
void loadLocal(EmitterContext ec, int index) { for (int i = 0; i < tos; i++) { final Item item = stack[i]; if ((item.getKind() == Item.LOCAL) && (item.getOffsetToFP() == index)) item.load(ec); } }
void loadLocal(EmitterContext ec, int offsetToFP) { for (int i = 0; i < tos; i++) { final Item item = stack[i]; if ((item.getKind() == Item.LOCAL) && (item.getOffsetToFP() == index)) item.load(ec); } }
12,638
void loadLocal(EmitterContext ec, int index) { for (int i = 0; i < tos; i++) { final Item item = stack[i]; if ((item.getKind() == Item.LOCAL) && (item.getOffsetToFP() == index)) item.load(ec); } }
void loadLocal(EmitterContext ec, int index) { for (int i = 0; i < tos; i++) { final Item item = stack[i]; if ((item.getKind() == Item.LOCAL) && (item.getOffsetToFP() == offsetToFP)) item.load(ec); } }
12,639
protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; // The default Look and Feel happens to use these three purple shades // extensively. Color lightPurple = new Color(0xCC, 0xCC, 0xFF); Color midPurple = new Color(0x99, 0x99, 0xCC); Color darkPurple = new Color(0x66, 0x66, 0x99); uiDefaults = new Object[] { "AbstractUndoableEdit.undoText", "Undo", "AbstractUndoableEdit.redoText", "Redo", "Button.background", new ColorUIResource(Color.lightGray), "Button.border", BorderUIResource.getEtchedBorderUIResource(), "Button.darkShadow", new ColorUIResource(Color.darkGray), "Button.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "Button.focus", midPurple, "Button.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Button.foreground", new ColorUIResource(Color.black), "Button.highlight", new ColorUIResource(Color.white), "Button.light", new ColorUIResource(Color.lightGray.brighter()), "Button.margin", new InsetsUIResource(2, 14, 2, 14), "Button.shadow", new ColorUIResource(Color.gray), "Button.textIconGap", new Integer(4), "Button.textShiftOffset", new Integer(0), "CheckBox.background", new ColorUIResource(Color.lightGray), "CheckBox.border", new BorderUIResource.CompoundBorderUIResource(null, null), "CheckBox.darkShadow", new ColorUIResource(Color.darkGray), "CheckBox.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "CheckBox.font", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBox.foreground", new ColorUIResource(Color.black), "CheckBox.highlight", new ColorUIResource(Color.white), "CheckBox.icon", BasicIconFactory.getCheckBoxIcon(), "CheckBox.light", new ColorUIResource(Color.lightGray.brighter()), "CheckBox.margin",new InsetsUIResource(2, 2, 2, 2), "CheckBox.shadow", new ColorUIResource(Color.gray), "CheckBox.textIconGap", new Integer(4), "CheckBox.textShiftOffset", new Integer(0), "CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBoxMenuItem.acceleratorForeground", new ColorUIResource(Color.black), "CheckBoxMenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "CheckBoxMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "CheckBoxMenuItem.background", new ColorUIResource(Color.lightGray), "CheckBoxMenuItem.border", new BasicBorders.MarginBorder(), "CheckBoxMenuItem.borderPainted", Boolean.FALSE, "CheckBoxMenuItem.checkIcon", BasicIconFactory.getCheckBoxMenuItemIcon(), "CheckBoxMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBoxMenuItem.foreground", new ColorUIResource(Color.black), "CheckBoxMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "CheckBoxMenuItem.selectionBackground", new ColorUIResource(lightPurple), "CheckBoxMenuItem.selectionForeground", new ColorUIResource(Color.black), "ColorChooser.background", new ColorUIResource(Color.lightGray), "ColorChooser.cancelText", "Cancel", "ColorChooser.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ColorChooser.foreground", new ColorUIResource(Color.black), "ColorChooser.hsbBlueText", "B", "ColorChooser.hsbBrightnessText", "B", "ColorChooser.hsbGreenText", "G", "ColorChooser.hsbHueText", "H", "ColorChooser.hsbNameText", "HSB", "ColorChooser.hsbRedText", "R", "ColorChooser.hsbSaturationText", "S", "ColorChooser.okText", "OK", "ColorChooser.previewText", "Preview", "ColorChooser.resetText", "Reset", "ColorChooser.rgbBlueMnemonic", new Integer(66), "ColorChooser.rgbBlueText", "Blue", "ColorChooser.rgbGreenMnemonic", new Integer(71), "ColorChooser.rgbGreenText", "Green", "ColorChooser.rgbNameText", "RGB", "ColorChooser.rgbRedMnemonic", new Integer(82), "ColorChooser.rgbRedText", "Red", "ColorChooser.sampleText", "Sample Text Sample Text", "ColorChooser.swatchesDefaultRecentColor", new ColorUIResource(Color.lightGray), "ColorChooser.swatchesNameText", "Swatches", "ColorChooser.swatchesRecentSwatchSize", new Dimension(10, 10), "ColorChooser.swatchesRecentText", "Recent:", "ColorChooser.swatchesSwatchSize", new Dimension(10, 10), "ComboBox.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "hidePopup", "PAGE_UP", "pageUpPassThrough", "PAGE_DOWN", "pageDownPassThrough", "HOME", "homePassThrough", "END", "endPassThrough" }), "ComboBox.background", new ColorUIResource(Color.white), "ComboBox.disabledBackground", new ColorUIResource(Color.lightGray), "ComboBox.disabledForeground", new ColorUIResource(Color.gray), "ComboBox.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "ComboBox.foreground", new ColorUIResource(Color.black), "ComboBox.selectionBackground", new ColorUIResource(lightPurple), "ComboBox.selectionForeground", new ColorUIResource(Color.black), "Desktop.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "KP_LEFT", "left", "KP_RIGHT", "right", "ctrl F5", "restore", "LEFT", "left", "ctrl alt F6", "selectNextFrame", "UP", "up", "ctrl F6", "selectNextFrame", "RIGHT", "right", "DOWN", "down", "ctrl F7", "move", "ctrl F8", "resize", "ESCAPE", "escape", "ctrl TAB", "selectNextFrame", "ctrl F9", "minimize", "KP_UP", "up", "ctrl F4", "close", "KP_DOWN", "down", "ctrl F10", "maximize", "ctrl alt shift F6","selectPreviousFrame" }), "Desktop.background", new ColorUIResource(175, 163, 236), "DesktopIcon.border", new BorderUIResource.CompoundBorderUIResource(null, null), "EditorPane.background", new ColorUIResource(Color.white), "EditorPane.border", new BasicBorders.MarginBorder(), "EditorPane.caretBlinkRate", new Integer(500), "EditorPane.caretForeground", new ColorUIResource(Color.red), "EditorPane.font", new FontUIResource("Serif", Font.PLAIN, 12), "EditorPane.foreground", new ColorUIResource(Color.black), "EditorPane.inactiveForeground", new ColorUIResource(Color.gray), "EditorPane.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "EditorPane.margin", new InsetsUIResource(3, 3, 3, 3), "EditorPane.selectionBackground", new ColorUIResource(Color.lightGray), "EditorPane.selectionForeground", new ColorUIResource(Color.white), "FileChooser.acceptAllFileFilterText", "All Files (*.*)", "FileChooser.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "cancelSelection" }), "FileChooser.cancelButtonMnemonic", new Integer(67), "FileChooser.cancelButtonText", "Cancel", "FileChooser.cancelButtonToolTipText", "Abort file chooser dialog", // XXX Don't use gif "FileChooser.detailsViewIcon", new IconUIResource(new ImageIcon("icons/DetailsView.gif")), "FileChooser.directoryDescriptionText", "Directory", "FileChooser.fileDescriptionText", "Generic File", "FileChooser.helpButtonMnemonic", new Integer(72), "FileChooser.helpButtonText", "Help", "FileChooser.helpButtonToolTipText", "FileChooser help", // XXX Don't use gif "FileChooser.homeFolderIcon", new IconUIResource(new ImageIcon("icons/HomeFolder.gif")), // XXX Don't use gif "FileChooser.listViewIcon", new IconUIResource(new ImageIcon("icons/ListView.gif")), "FileChooser.newFolderErrorSeparator", ":", "FileChooser.newFolderErrorText", "Error creating new folder", // XXX Don't use gif "FileChooser.newFolderIcon", new IconUIResource(new ImageIcon("icons/NewFolder.gif")), "FileChooser.openButtonMnemonic", new Integer(79), "FileChooser.openButtonText", "Open", "FileChooser.openButtonToolTipText", "Open selected file", "FileChooser.saveButtonMnemonic", new Integer(83), "FileChooser.saveButtonText", "Save", "FileChooser.saveButtonToolTipText", "Save selected file", // XXX Don't use gif "FileChooser.upFolderIcon", new IconUIResource(new ImageIcon("icons/UpFolder.gif")), "FileChooser.updateButtonMnemonic", new Integer(85), "FileChooser.updateButtonText", "Update", "FileChooser.updateButtonToolTipText", "Update directory listing", // XXX Don't use gif "FileView.computerIcon", new IconUIResource(new ImageIcon("icons/Computer.gif")), // XXX Don't use gif "FileView.directoryIcon", new IconUIResource(new ImageIcon("icons/Directory.gif")), // XXX Don't use gif "FileView.fileIcon", new IconUIResource(new ImageIcon("icons/File.gif")), // XXX Don't use gif "FileView.floppyDriveIcon", new IconUIResource(new ImageIcon("icons/Floppy.gif")), // XXX Don't use gif "FileView.hardDriveIcon", new IconUIResource(new ImageIcon("icons/HardDrive.gif")), "FocusManagerClassName", "TODO", "FormView.resetButtonText", "Reset", "FormView.submitButtonText", "Submit Query", "InternalFrame.activeTitleBackground", new ColorUIResource(162, 167, 241), "InternalFrame.activeTitleForeground", new ColorUIResource(Color.black), "InternalFrame.border", new BorderUIResource.CompoundBorderUIResource(null, null), "InternalFrame.closeIcon", BasicIconFactory.createEmptyFrameIcon(), // XXX Don't use gif "InternalFrame.icon", new IconUIResource(new ImageIcon("icons/JavaCup.gif")), "InternalFrame.iconifyIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.inactiveTitleBackground", new ColorUIResource(Color.lightGray), "InternalFrame.inactiveTitleForeground", new ColorUIResource(Color.black), "InternalFrame.maximizeIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.minimizeIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.titleFont", new FontUIResource("Dialog", Font.PLAIN, 12), "InternalFrame.windowBindings", new Object[] { "shift ESCAPE", "showSystemMenu", "ctrl SPACE", "showSystemMenu", "ESCAPE", "showSystemMenu" }, "Label.background", new ColorUIResource(Color.lightGray), "Label.disabledForeground", new ColorUIResource(Color.white), "Label.disabledShadow", new ColorUIResource(Color.gray), "Label.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Label.foreground", new ColorUIResource(Color.black), "List.background", new ColorUIResource(Color.white), "List.border", new BasicBorders.MarginBorder(), "List.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "scrollUp", "ctrl \\", "clearSelection", "PAGE_DOWN", "scrollDown", "shift PAGE_DOWN","scrollDownExtendSelection", "END", "selectLastRow", "HOME", "selectFirstRow", "shift END", "selectLastRowExtendSelection", "shift HOME", "selectFirstRowExtendSelection", "UP", "selectPreviousRow", "ctrl /", "selectAll", "ctrl A", "selectAll", "DOWN", "selectNextRow", "shift UP", "selectPreviousRowExtendSelection", "ctrl SPACE", "selectNextRowExtendSelection", "shift DOWN", "selectNextRowExtendSelection", "KP_UP", "selectPreviousRow", "shift PAGE_UP","scrollUpExtendSelection", "KP_DOWN", "selectNextRow" }), "List.foreground", new ColorUIResource(Color.black), "List.selectionBackground", new ColorUIResource(0xCC, 0xCC, 0xFF), "List.selectionForeground", new ColorUIResource(Color.black), "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "Menu.acceleratorForeground", new ColorUIResource(Color.black), "Menu.acceleratorSelectionForeground", new ColorUIResource(Color.white), "Menu.arrowIcon", BasicIconFactory.getMenuArrowIcon(), "Menu.background", new ColorUIResource(Color.lightGray), "Menu.border", new BasicBorders.MarginBorder(), "Menu.borderPainted", Boolean.FALSE, "Menu.checkIcon", BasicIconFactory.getMenuItemCheckIcon(), "Menu.consumesTabs", Boolean.TRUE, "Menu.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Menu.foreground", new ColorUIResource(Color.black), "Menu.margin", new InsetsUIResource(2, 2, 2, 2), "Menu.selectedWindowInputMapBindings", new Object[] { "ESCAPE", "cancel", "DOWN", "selectNext", "KP_DOWN", "selectNext", "UP", "selectPrevious", "KP_UP", "selectPrevious", "LEFT", "selectParent", "KP_LEFT", "selectParent", "RIGHT", "selectChild", "KP_RIGHT", "selectChild", "ENTER", "return", "SPACE", "return" }, "Menu.selectionBackground", new ColorUIResource(lightPurple), "Menu.selectionForeground", new ColorUIResource(Color.black), "MenuBar.background", new ColorUIResource(Color.lightGray), "MenuBar.border", new BasicBorders.MenuBarBorder(null, null), "MenuBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuBar.foreground", new ColorUIResource(Color.black), "MenuBar.windowBindings", new Object[] { "F10", "takeFocus" }, "MenuItem.acceleratorDelimiter", "-", "MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuItem.acceleratorForeground", new ColorUIResource(Color.black), "MenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "MenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "MenuItem.background", new ColorUIResource(Color.lightGray), "MenuItem.border", new BasicBorders.MarginBorder(), "MenuItem.borderPainted", Boolean.FALSE, "MenuItem.checkIcon", BasicIconFactory.getMenuItemCheckIcon(), "MenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuItem.foreground", new ColorUIResource(Color.black), "MenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "MenuItem.selectionBackground", new ColorUIResource(lightPurple), "MenuItem.selectionForeground", new ColorUIResource(Color.black), "OptionPane.background", new ColorUIResource(Color.lightGray), "OptionPane.border", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.buttonAreaBorder", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.cancelButtonText", "Cancel", // XXX Don't use gif "OptionPane.errorIcon", new IconUIResource(new ImageIcon("icons/Error.gif")), "OptionPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "OptionPane.foreground", new ColorUIResource(Color.black), // XXX Don't use gif "OptionPane.informationIcon", new IconUIResource(new ImageIcon("icons/Inform.gif")), "OptionPane.messageAreaBorder", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.messageForeground", new ColorUIResource(Color.black), "OptionPane.minimumSize", new DimensionUIResource(262, 90), "OptionPane.noButtonText", "No", "OptionPane.okButtonText", "OK", // XXX Don't use gif "OptionPane.questionIcon", new IconUIResource(new ImageIcon("icons/Question.gif")), // XXX Don't use gif "OptionPane.warningIcon", new IconUIResource(new ImageIcon("icons/Warn.gif")), "OptionPane.windowBindings", new Object[] { "ESCAPE", "close" }, "OptionPane.yesButtonText", "Yes", "Panel.background", new ColorUIResource(Color.lightGray), "Panel.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Panel.foreground", new ColorUIResource(Color.black), "PasswordField.background", new ColorUIResource(Color.white), "PasswordField.border", new BasicBorders.FieldBorder(null, null, null, null), "PasswordField.caretBlinkRate", new Integer(500), "PasswordField.caretForeground", new ColorUIResource(Color.black), "PasswordField.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12), "PasswordField.foreground", new ColorUIResource(Color.black), "PasswordField.inactiveForeground", new ColorUIResource(Color.gray), "PasswordField.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "notify-field-accept")}, "PasswordField.margin", new InsetsUIResource(0, 0, 0, 0), "PasswordField.selectionBackground", new ColorUIResource(lightPurple), "PasswordField.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.background", new ColorUIResource(Color.lightGray), "PopupMenu.border", new BorderUIResource.BevelBorderUIResource(0), "PopupMenu.font", new FontUIResource("Dialog", Font.PLAIN, 12), "PopupMenu.foreground", new ColorUIResource(Color.black), "ProgressBar.background", new ColorUIResource(Color.lightGray), "ProgressBar.border", new BorderUIResource.LineBorderUIResource(Color.darkGray), "ProgressBar.cellLength", new Integer(1), "ProgressBar.cellSpacing", new Integer(0), "ProgressBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ProgressBar.foreground", new ColorUIResource(midPurple), "ProgressBar.selectionBackground", new ColorUIResource(lightPurple), "ProgressBar.selectionForeground", new ColorUIResource(Color.lightGray), "ProgressBar.repaintInterval", new Integer(250), "ProgressBar.cycleTime", new Integer(6000), "RadioButton.background", new ColorUIResource(Color.lightGray), "RadioButton.border", new BorderUIResource.CompoundBorderUIResource(null, null), "RadioButton.darkShadow", new ColorUIResource(Color.darkGray), "RadioButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "RadioButton.font", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButton.foreground", new ColorUIResource(Color.black), "RadioButton.highlight", new ColorUIResource(Color.white), "RadioButton.icon", BasicIconFactory.getRadioButtonIcon(), "RadioButton.light", new ColorUIResource(Color.lightGray.brighter()), "RadioButton.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButton.shadow", new ColorUIResource(Color.gray), "RadioButton.textIconGap", new Integer(4), "RadioButton.textShiftOffset", new Integer(0), "RadioButtonMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButtonMenuItem.acceleratorForeground", new ColorUIResource(Color.black), "RadioButtonMenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "RadioButtonMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "RadioButtonMenuItem.background", new ColorUIResource(Color.lightGray), "RadioButtonMenuItem.border", new BasicBorders.MarginBorder(), "RadioButtonMenuItem.borderPainted", Boolean.FALSE, "RadioButtonMenuItem.checkIcon", BasicIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButtonMenuItem.foreground", new ColorUIResource(Color.black), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", new ColorUIResource(lightPurple), "RadioButtonMenuItem.selectionForeground", new ColorUIResource(Color.black), "RootPane.defaultButtonWindowKeyBindings", new Object[] { "ENTER", "press", "released ENTER", "release", "ctrl ENTER", "press", "ctrl released ENTER", "release" }, "ScrollBar.background", new ColorUIResource(224, 224, 224), "ScrollBar.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "negativeBlockIncrement", "PAGE_DOWN", "positiveBlockIncrement", "END", "maxScroll", "HOME", "minScroll", "LEFT", "positiveUnitIncrement", "KP_UP", "negativeUnitIncrement", "KP_DOWN", "positiveUnitIncrement", "UP", "negativeUnitIncrement", "RIGHT", "negativeUnitIncrement", "KP_LEFT", "positiveUnitIncrement", "DOWN", "positiveUnitIncrement", "KP_RIGHT", "negativeUnitIncrement" }), "ScrollBar.foreground", new ColorUIResource(Color.lightGray), "ScrollBar.maximumThumbSize", new DimensionUIResource(4096, 4096), "ScrollBar.minimumThumbSize", new DimensionUIResource(8, 8), "ScrollBar.thumb", new ColorUIResource(Color.lightGray), "ScrollBar.thumbDarkShadow", new ColorUIResource(Color.black), "ScrollBar.thumbHighlight", new ColorUIResource(Color.white), "ScrollBar.thumbLightShadow", new ColorUIResource(Color.gray), "ScrollBar.track", new ColorUIResource(224, 224, 224), "ScrollBar.trackHighlight", new ColorUIResource(Color.black), "ScrollPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "scrollUp", "KP_LEFT", "unitScrollLeft", "ctrl PAGE_DOWN","scrollRight", "PAGE_DOWN", "scrollDown", "KP_RIGHT", "unitScrollRight", "LEFT", "unitScrollLeft", "ctrl END", "scrollEnd", "UP", "unitScrollUp", "RIGHT", "unitScrollRight", "DOWN", "unitScrollDown", "ctrl HOME", "scrollHome", "ctrl PAGE_UP", "scrollLeft", "KP_UP", "unitScrollUp", "KP_DOWN", "unitScrollDown" }), "ScrollPane.background", new ColorUIResource(Color.lightGray), "ScrollPane.border", new BorderUIResource.EtchedBorderUIResource(), "ScrollPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ScrollPane.foreground", new ColorUIResource(Color.black), "Separator.background", new ColorUIResource(Color.white), "Separator.foreground", new ColorUIResource(Color.gray), "Separator.highlight", new ColorUIResource(Color.white), "Separator.shadow", new ColorUIResource(Color.gray), "Slider.background", new ColorUIResource(Color.lightGray), "Slider.focus", new ColorUIResource(Color.black), "Slider.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "positiveBlockIncrement", "PAGE_DOWN", "negativeBlockIncrement", "END", "maxScroll", "HOME", "minScroll", "LEFT", "negativeUnitIncrement", "KP_UP", "positiveUnitIncrement", "KP_DOWN", "negativeUnitIncrement", "UP", "positiveUnitIncrement", "RIGHT", "positiveUnitIncrement", "KP_LEFT", "negativeUnitIncrement", "DOWN", "negativeUnitIncrement", "KP_RIGHT", "positiveUnitIncrement" }), "Slider.focusInsets", new InsetsUIResource(2, 2, 2, 2), "Slider.foreground", new ColorUIResource(Color.lightGray), "Slider.highlight", new ColorUIResource(Color.white), "Slider.shadow", new ColorUIResource(Color.gray), "Slider.thumbHeight", new Integer(20), "Slider.thumbWidth", new Integer(10), "Slider.tickHeight", new Integer(12), "SplitPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "F6", "toggleFocus", "F8", "startResize", "END", "selectMax", "HOME", "selectMin", "LEFT", "negativeIncremnent", "KP_UP", "negativeIncrement", "KP_DOWN", "positiveIncrement", "UP", "negativeIncrement", "RIGHT", "positiveIncrement", "KP_LEFT", "negativeIncrement", "DOWN", "positiveIncrement", "KP_RIGHT", "positiveIncrement" }), "SplitPane.background", new ColorUIResource(Color.lightGray), "SplitPane.border", new BasicBorders.SplitPaneBorder(null, null), "SplitPane.dividerSize", new Integer(10), "SplitPane.highlight", new ColorUIResource(Color.white), "SplitPane.shadow", new ColorUIResource(Color.gray), "TabbedPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ctrl PAGE_DOWN","navigatePageDown", "ctrl PAGE_UP", "navigatePageUp", "ctrl UP", "requestFocus", "ctrl KP_UP", "requestFocus" }), "TabbedPane.background", new ColorUIResource(Color.LIGHT_GRAY), "TabbedPane.contentBorderInsets", new InsetsUIResource(2, 2, 3, 3), "TabbedPane.darkShadow", new ColorUIResource(Color.darkGray), "TabbedPane.focus", new ColorUIResource(Color.black), "TabbedPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "LEFT", "navigateLeft", "KP_UP", "navigateUp", "ctrl DOWN", "requestFocusForVisibleComponent", "UP", "navigateUp", "KP_DOWN", "navigateDown", "RIGHT", "navigateRight", "KP_LEFT", "navigateLeft", "ctrl KP_DOWN", "requestFocusForVisibleComponent", "KP_RIGHT", "navigateRight", "DOWN", "navigateDown" }), "TabbedPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TabbedPane.foreground", new ColorUIResource(Color.black), "TabbedPane.highlight", new ColorUIResource(Color.lightGray), "TabbedPane.lightHighlight", new ColorUIResource(Color.white), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.shadow", new ColorUIResource(Color.gray), "TabbedPane.tabbedPaneTabAreaInsets", new InsetsUIResource(3, 2, 1, 2), "TabbedPane.tabbedPaneTabInsets", new InsetsUIResource(1, 4, 1, 4), "TabbedPane.tabbedPaneContentBorderInsets", new InsetsUIResource(3, 2, 1, 2), "TabbedPane.tabbedPaneTabPadInsets", new InsetsUIResource(1, 1, 1, 1), "TabbedPane.tabRunOverlay", new Integer(2), "TabbedPane.textIconGap", new Integer(4), "Table.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "shift PAGE_DOWN","scrollDownExtendSelection", "PAGE_DOWN", "scrollDownChangeSelection", "END", "selectLastColumn", "shift END", "selectLastColumnExtendSelection", "HOME", "selectFirstColumn", "ctrl END", "selectLastRow", "ctrl shift END","selectLastRowExtendSelection", "LEFT", "selectPreviousColumn", "shift HOME", "selectFirstColumnExtendSelection", "UP", "selectPreviousRow", "RIGHT", "selectNextColumn", "ctrl HOME", "selectFirstRow", "shift LEFT", "selectPreviousColumnExtendSelection", "DOWN", "selectNextRow", "ctrl shift HOME","selectFirstRowExtendSelection", "shift UP", "selectPreviousRowExtendSelection", "F2", "startEditing", "shift RIGHT", "selectNextColumnExtendSelection", "TAB", "selectNextColumnCell", "shift DOWN", "selectNextRowExtendSelection", "ENTER", "selectNextRowCell", "KP_UP", "selectPreviousRow", "KP_DOWN", "selectNextRow", "KP_LEFT", "selectPreviousColumn", "KP_RIGHT", "selectNextColumn", "shift TAB", "selectPreviousColumnCell", "ctrl A", "selectAll", "shift ENTER", "selectPreviousRowCell", "shift KP_DOWN", "selectNextRowExtendSelection", "shift KP_LEFT", "selectPreviousColumnExtendSelection", "ESCAPE", "cancel", "ctrl shift PAGE_UP", "scrollRightExtendSelection", "shift KP_RIGHT", " selectNextColumnExtendSelection", "ctrl PAGE_UP", "scrollLeftChangeSelection", "shift PAGE_UP", "scrollUpExtendSelection", "ctrl shift PAGE_DOWN", "scrollLeftExtendSelection", "ctrl PAGE_DOWN", "scrollRightChangeSelection", "PAGE_UP", "scrollUpChangeSelection" }), "Table.background", new ColorUIResource(Color.white), "Table.focusCellBackground", new ColorUIResource(Color.white), "Table.focusCellForeground", new ColorUIResource(Color.black), "Table.focusCellHighlightBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Table.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Table.foreground", new ColorUIResource(Color.black), "Table.gridColor", new ColorUIResource(Color.gray), "Table.scrollPaneBorder", new BorderUIResource.BevelBorderUIResource(0), "Table.selectionBackground", new ColorUIResource(lightPurple), "Table.selectionForeground", new ColorUIResource(Color.black), "TableHeader.background", new ColorUIResource(Color.lightGray), "TableHeader.cellBorder", new BorderUIResource.BevelBorderUIResource(0), "TableHeader.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TableHeader.foreground", new ColorUIResource(Color.black), "TextArea.background", new ColorUIResource(Color.white), "TextArea.border", new BasicBorders.MarginBorder(), "TextArea.caretBlinkRate", new Integer(500), "TextArea.caretForeground", new ColorUIResource(Color.black), "TextArea.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12), "TextArea.foreground", new ColorUIResource(Color.black), "TextArea.inactiveForeground", new ColorUIResource(Color.gray), "TextArea.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "TextArea.margin", new InsetsUIResource(0, 0, 0, 0), "TextArea.selectionBackground", new ColorUIResource(lightPurple), "TextArea.selectionForeground", new ColorUIResource(Color.black), "TextField.background", new ColorUIResource(Color.white), "TextField.border", new BasicBorders.FieldBorder(null, null, null, null), "TextField.caretBlinkRate", new Integer(500), "TextField.caretForeground", new ColorUIResource(Color.black), "TextField.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "TextField.foreground", new ColorUIResource(Color.black), "TextField.inactiveForeground", new ColorUIResource(Color.gray), "TextField.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "notify-field-accept"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, InputEvent.SHIFT_DOWN_MASK), "selection-backward"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, InputEvent.SHIFT_DOWN_MASK), "selection-forward"), }, "TextField.margin", new InsetsUIResource(0, 0, 0, 0), "TextField.selectionBackground", new ColorUIResource(lightPurple), "TextField.selectionForeground", new ColorUIResource(Color.black), "TextPane.background", new ColorUIResource(Color.white), "TextPane.border", new BasicBorders.MarginBorder(), "TextPane.caretBlinkRate", new Integer(500), "TextPane.caretForeground", new ColorUIResource(Color.black), "TextPane.font", new FontUIResource("Serif", Font.PLAIN, 12), "TextPane.foreground", new ColorUIResource(Color.black), "TextPane.inactiveForeground", new ColorUIResource(Color.gray), "TextPane.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "TextPane.margin", new InsetsUIResource(3, 3, 3, 3), "TextPane.selectionBackground", new ColorUIResource(Color.lightGray), "TextPane.selectionForeground", new ColorUIResource(Color.white), "TitledBorder.border", new BorderUIResource.EtchedBorderUIResource(), "TitledBorder.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TitledBorder.titleColor", new ColorUIResource(Color.black), "ToggleButton.background", new ColorUIResource(Color.lightGray), "ToggleButton.border", new BorderUIResource.CompoundBorderUIResource(null, null), "ToggleButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "ToggleButton.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToggleButton.foreground", new ColorUIResource(Color.black), "ToggleButton.margin", new InsetsUIResource(2, 14, 2, 14), "ToggleButton.textIconGap", new Integer(4), "ToggleButton.textShiftOffset", new Integer(0), "ToolBar.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "UP", "navigateUp", "KP_UP", "navigateUp", "DOWN", "navigateDown", "KP_DOWN", "navigateDown", "LEFT", "navigateLeft", "KP_LEFT", "navigateLeft", "RIGHT", "navigateRight", "KP_RIGHT", "navigateRight" }), "ToolBar.background", new ColorUIResource(Color.lightGray), "ToolBar.border", new BorderUIResource.EtchedBorderUIResource(), "ToolBar.dockingBackground", new ColorUIResource(Color.lightGray), "ToolBar.dockingForeground", new ColorUIResource(11, 30, 143), "ToolBar.floatingBackground", new ColorUIResource(Color.lightGray), "ToolBar.floatingForeground", new ColorUIResource(113, 171, 212), "ToolBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToolBar.foreground", new ColorUIResource(Color.black), "ToolBar.separatorSize", new DimensionUIResource(20, 20), "ToolTip.background", new ColorUIResource(122, 178, 241), "ToolTip.border", new BorderUIResource.LineBorderUIResource(Color.lightGray), "ToolTip.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "ToolTip.foreground", new ColorUIResource(Color.black), "Tree.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "cancel" }), "Tree.background", new ColorUIResource(Color.white), "Tree.changeSelectionWithFocus", Boolean.TRUE, "Tree.closedIcon", new IconUIResource(new ImageIcon("icons/TreeClosed.png")), "Tree.collapsedIcon", new IconUIResource(new ImageIcon("icons/TreeCollapsed.png")), "Tree.drawsFocusBorderAroundIcon", Boolean.FALSE, "Tree.editorBorder", new BorderUIResource.LineBorderUIResource(Color.lightGray), "Tree.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "shift PAGE_DOWN", "scrollDownExtendSelection", "PAGE_DOWN", "scrollDownChangeSelection", "END", "selectLast", "ctrl KP_UP", "selectPreviousChangeLead", "shift END", "selectLastExtendSelection", "HOME", "selectFirst", "ctrl END", "selectLastChangeLead", "ctrl /", "selectAll", "LEFT", "selectParent", "shift HOME", "selectFirstExtendSelection", "UP", "selectPrevious", "ctrl KP_DOWN", "selectNextChangeLead", "RIGHT", "selectChild", "ctrl HOME", "selectFirstChangeLead", "DOWN", "selectNext", "ctrl KP_LEFT", "scrollLeft", "shift UP", "selectPreviousExtendSelection", "F2", "startEditing", "ctrl LEFT", "scrollLeft", "ctrl KP_RIGHT","scrollRight", "ctrl UP", "selectPreviousChangeLead", "shift DOWN", "selectNextExtendSelection", "ENTER", "toggle", "KP_UP", "selectPrevious", "KP_DOWN", "selectNext", "ctrl RIGHT", "scrollRight", "KP_LEFT", "selectParent", "KP_RIGHT", "selectChild", "ctrl DOWN", "selectNextChangeLead", "ctrl A", "selectAll", "shift KP_UP", "selectPreviousExtendSelection", "shift KP_DOWN","selectNextExtendSelection", "ctrl SPACE", "toggleSelectionPreserveAnchor", "ctrl shift PAGE_UP", "scrollUpExtendSelection", "ctrl \\", "clearSelection", "shift SPACE", "extendSelection", "ctrl PAGE_UP", "scrollUpChangeLead", "shift PAGE_UP","scrollUpExtendSelection", "SPACE", "toggleSelectionPreserveAnchor", "ctrl shift PAGE_DOWN", "scrollDownExtendSelection", "PAGE_UP", "scrollUpChangeSelection", "ctrl PAGE_DOWN", "scrollDownChangeLead" }), "Tree.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Tree.expandedIcon", new IconUIResource(new ImageIcon("icons/TreeExpanded.png")), "Tree.foreground", new ColorUIResource(Color.black), "Tree.hash", new ColorUIResource(Color.gray), "Tree.leafIcon", new IconUIResource(new ImageIcon("icons/TreeLeaf.png")), "Tree.leftChildIndent", new Integer(7), "Tree.openIcon", new IconUIResource(new ImageIcon("icons/TreeOpen.png")), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(16), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(lightPurple), "Tree.selectionBorderColor", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(Color.lightGray), "Tree.textForeground", new ColorUIResource(Color.black), "Viewport.background", new ColorUIResource(Color.lightGray), "Viewport.font", new FontUIResource("Dialog", Font.PLAIN, 12), }; defaults.putDefaults(uiDefaults); }
protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; // The default Look and Feel happens to use these three purple shades // extensively. Color lightPurple = new Color(0xCC, 0xCC, 0xFF); Color midPurple = new Color(0x99, 0x99, 0xCC); Color darkPurple = new Color(0x66, 0x66, 0x99); uiDefaults = new Object[] { "AbstractUndoableEdit.undoText", "Undo", "AbstractUndoableEdit.redoText", "Redo", "Button.background", new ColorUIResource(Color.lightGray), "Button.border", BorderUIResource.getEtchedBorderUIResource(), "Button.darkShadow", new ColorUIResource(Color.darkGray), "Button.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "Button.focus", midPurple, "Button.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Button.foreground", new ColorUIResource(Color.black), "Button.highlight", new ColorUIResource(Color.white), "Button.light", new ColorUIResource(Color.lightGray.brighter()), "Button.margin", new InsetsUIResource(2, 2, 2, 2), "Button.shadow", new ColorUIResource(Color.gray), "Button.textIconGap", new Integer(4), "Button.textShiftOffset", new Integer(0), "CheckBox.background", new ColorUIResource(Color.lightGray), "CheckBox.border", new BorderUIResource.CompoundBorderUIResource(null, null), "CheckBox.darkShadow", new ColorUIResource(Color.darkGray), "CheckBox.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "CheckBox.font", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBox.foreground", new ColorUIResource(Color.black), "CheckBox.highlight", new ColorUIResource(Color.white), "CheckBox.icon", BasicIconFactory.getCheckBoxIcon(), "CheckBox.light", new ColorUIResource(Color.lightGray.brighter()), "CheckBox.margin",new InsetsUIResource(2, 2, 2, 2), "CheckBox.shadow", new ColorUIResource(Color.gray), "CheckBox.textIconGap", new Integer(4), "CheckBox.textShiftOffset", new Integer(0), "CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBoxMenuItem.acceleratorForeground", new ColorUIResource(Color.black), "CheckBoxMenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "CheckBoxMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "CheckBoxMenuItem.background", new ColorUIResource(Color.lightGray), "CheckBoxMenuItem.border", new BasicBorders.MarginBorder(), "CheckBoxMenuItem.borderPainted", Boolean.FALSE, "CheckBoxMenuItem.checkIcon", BasicIconFactory.getCheckBoxMenuItemIcon(), "CheckBoxMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "CheckBoxMenuItem.foreground", new ColorUIResource(Color.black), "CheckBoxMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "CheckBoxMenuItem.selectionBackground", new ColorUIResource(lightPurple), "CheckBoxMenuItem.selectionForeground", new ColorUIResource(Color.black), "ColorChooser.background", new ColorUIResource(Color.lightGray), "ColorChooser.cancelText", "Cancel", "ColorChooser.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ColorChooser.foreground", new ColorUIResource(Color.black), "ColorChooser.hsbBlueText", "B", "ColorChooser.hsbBrightnessText", "B", "ColorChooser.hsbGreenText", "G", "ColorChooser.hsbHueText", "H", "ColorChooser.hsbNameText", "HSB", "ColorChooser.hsbRedText", "R", "ColorChooser.hsbSaturationText", "S", "ColorChooser.okText", "OK", "ColorChooser.previewText", "Preview", "ColorChooser.resetText", "Reset", "ColorChooser.rgbBlueMnemonic", new Integer(66), "ColorChooser.rgbBlueText", "Blue", "ColorChooser.rgbGreenMnemonic", new Integer(71), "ColorChooser.rgbGreenText", "Green", "ColorChooser.rgbNameText", "RGB", "ColorChooser.rgbRedMnemonic", new Integer(82), "ColorChooser.rgbRedText", "Red", "ColorChooser.sampleText", "Sample Text Sample Text", "ColorChooser.swatchesDefaultRecentColor", new ColorUIResource(Color.lightGray), "ColorChooser.swatchesNameText", "Swatches", "ColorChooser.swatchesRecentSwatchSize", new Dimension(10, 10), "ColorChooser.swatchesRecentText", "Recent:", "ColorChooser.swatchesSwatchSize", new Dimension(10, 10), "ComboBox.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "hidePopup", "PAGE_UP", "pageUpPassThrough", "PAGE_DOWN", "pageDownPassThrough", "HOME", "homePassThrough", "END", "endPassThrough" }), "ComboBox.background", new ColorUIResource(Color.white), "ComboBox.disabledBackground", new ColorUIResource(Color.lightGray), "ComboBox.disabledForeground", new ColorUIResource(Color.gray), "ComboBox.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "ComboBox.foreground", new ColorUIResource(Color.black), "ComboBox.selectionBackground", new ColorUIResource(lightPurple), "ComboBox.selectionForeground", new ColorUIResource(Color.black), "Desktop.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "KP_LEFT", "left", "KP_RIGHT", "right", "ctrl F5", "restore", "LEFT", "left", "ctrl alt F6", "selectNextFrame", "UP", "up", "ctrl F6", "selectNextFrame", "RIGHT", "right", "DOWN", "down", "ctrl F7", "move", "ctrl F8", "resize", "ESCAPE", "escape", "ctrl TAB", "selectNextFrame", "ctrl F9", "minimize", "KP_UP", "up", "ctrl F4", "close", "KP_DOWN", "down", "ctrl F10", "maximize", "ctrl alt shift F6","selectPreviousFrame" }), "Desktop.background", new ColorUIResource(175, 163, 236), "DesktopIcon.border", new BorderUIResource.CompoundBorderUIResource(null, null), "EditorPane.background", new ColorUIResource(Color.white), "EditorPane.border", new BasicBorders.MarginBorder(), "EditorPane.caretBlinkRate", new Integer(500), "EditorPane.caretForeground", new ColorUIResource(Color.red), "EditorPane.font", new FontUIResource("Serif", Font.PLAIN, 12), "EditorPane.foreground", new ColorUIResource(Color.black), "EditorPane.inactiveForeground", new ColorUIResource(Color.gray), "EditorPane.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "EditorPane.margin", new InsetsUIResource(3, 3, 3, 3), "EditorPane.selectionBackground", new ColorUIResource(Color.lightGray), "EditorPane.selectionForeground", new ColorUIResource(Color.white), "FileChooser.acceptAllFileFilterText", "All Files (*.*)", "FileChooser.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "cancelSelection" }), "FileChooser.cancelButtonMnemonic", new Integer(67), "FileChooser.cancelButtonText", "Cancel", "FileChooser.cancelButtonToolTipText", "Abort file chooser dialog", // XXX Don't use gif "FileChooser.detailsViewIcon", new IconUIResource(new ImageIcon("icons/DetailsView.gif")), "FileChooser.directoryDescriptionText", "Directory", "FileChooser.fileDescriptionText", "Generic File", "FileChooser.helpButtonMnemonic", new Integer(72), "FileChooser.helpButtonText", "Help", "FileChooser.helpButtonToolTipText", "FileChooser help", // XXX Don't use gif "FileChooser.homeFolderIcon", new IconUIResource(new ImageIcon("icons/HomeFolder.gif")), // XXX Don't use gif "FileChooser.listViewIcon", new IconUIResource(new ImageIcon("icons/ListView.gif")), "FileChooser.newFolderErrorSeparator", ":", "FileChooser.newFolderErrorText", "Error creating new folder", // XXX Don't use gif "FileChooser.newFolderIcon", new IconUIResource(new ImageIcon("icons/NewFolder.gif")), "FileChooser.openButtonMnemonic", new Integer(79), "FileChooser.openButtonText", "Open", "FileChooser.openButtonToolTipText", "Open selected file", "FileChooser.saveButtonMnemonic", new Integer(83), "FileChooser.saveButtonText", "Save", "FileChooser.saveButtonToolTipText", "Save selected file", // XXX Don't use gif "FileChooser.upFolderIcon", new IconUIResource(new ImageIcon("icons/UpFolder.gif")), "FileChooser.updateButtonMnemonic", new Integer(85), "FileChooser.updateButtonText", "Update", "FileChooser.updateButtonToolTipText", "Update directory listing", // XXX Don't use gif "FileView.computerIcon", new IconUIResource(new ImageIcon("icons/Computer.gif")), // XXX Don't use gif "FileView.directoryIcon", new IconUIResource(new ImageIcon("icons/Directory.gif")), // XXX Don't use gif "FileView.fileIcon", new IconUIResource(new ImageIcon("icons/File.gif")), // XXX Don't use gif "FileView.floppyDriveIcon", new IconUIResource(new ImageIcon("icons/Floppy.gif")), // XXX Don't use gif "FileView.hardDriveIcon", new IconUIResource(new ImageIcon("icons/HardDrive.gif")), "FocusManagerClassName", "TODO", "FormView.resetButtonText", "Reset", "FormView.submitButtonText", "Submit Query", "InternalFrame.activeTitleBackground", new ColorUIResource(162, 167, 241), "InternalFrame.activeTitleForeground", new ColorUIResource(Color.black), "InternalFrame.border", new BorderUIResource.CompoundBorderUIResource(null, null), "InternalFrame.closeIcon", BasicIconFactory.createEmptyFrameIcon(), // XXX Don't use gif "InternalFrame.icon", new IconUIResource(new ImageIcon("icons/JavaCup.gif")), "InternalFrame.iconifyIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.inactiveTitleBackground", new ColorUIResource(Color.lightGray), "InternalFrame.inactiveTitleForeground", new ColorUIResource(Color.black), "InternalFrame.maximizeIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.minimizeIcon", BasicIconFactory.createEmptyFrameIcon(), "InternalFrame.titleFont", new FontUIResource("Dialog", Font.PLAIN, 12), "InternalFrame.windowBindings", new Object[] { "shift ESCAPE", "showSystemMenu", "ctrl SPACE", "showSystemMenu", "ESCAPE", "showSystemMenu" }, "Label.background", new ColorUIResource(Color.lightGray), "Label.disabledForeground", new ColorUIResource(Color.white), "Label.disabledShadow", new ColorUIResource(Color.gray), "Label.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Label.foreground", new ColorUIResource(Color.black), "List.background", new ColorUIResource(Color.white), "List.border", new BasicBorders.MarginBorder(), "List.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "scrollUp", "ctrl \\", "clearSelection", "PAGE_DOWN", "scrollDown", "shift PAGE_DOWN","scrollDownExtendSelection", "END", "selectLastRow", "HOME", "selectFirstRow", "shift END", "selectLastRowExtendSelection", "shift HOME", "selectFirstRowExtendSelection", "UP", "selectPreviousRow", "ctrl /", "selectAll", "ctrl A", "selectAll", "DOWN", "selectNextRow", "shift UP", "selectPreviousRowExtendSelection", "ctrl SPACE", "selectNextRowExtendSelection", "shift DOWN", "selectNextRowExtendSelection", "KP_UP", "selectPreviousRow", "shift PAGE_UP","scrollUpExtendSelection", "KP_DOWN", "selectNextRow" }), "List.foreground", new ColorUIResource(Color.black), "List.selectionBackground", new ColorUIResource(0xCC, 0xCC, 0xFF), "List.selectionForeground", new ColorUIResource(Color.black), "Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "Menu.acceleratorForeground", new ColorUIResource(Color.black), "Menu.acceleratorSelectionForeground", new ColorUIResource(Color.white), "Menu.arrowIcon", BasicIconFactory.getMenuArrowIcon(), "Menu.background", new ColorUIResource(Color.lightGray), "Menu.border", new BasicBorders.MarginBorder(), "Menu.borderPainted", Boolean.FALSE, "Menu.checkIcon", BasicIconFactory.getMenuItemCheckIcon(), "Menu.consumesTabs", Boolean.TRUE, "Menu.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Menu.foreground", new ColorUIResource(Color.black), "Menu.margin", new InsetsUIResource(2, 2, 2, 2), "Menu.selectedWindowInputMapBindings", new Object[] { "ESCAPE", "cancel", "DOWN", "selectNext", "KP_DOWN", "selectNext", "UP", "selectPrevious", "KP_UP", "selectPrevious", "LEFT", "selectParent", "KP_LEFT", "selectParent", "RIGHT", "selectChild", "KP_RIGHT", "selectChild", "ENTER", "return", "SPACE", "return" }, "Menu.selectionBackground", new ColorUIResource(lightPurple), "Menu.selectionForeground", new ColorUIResource(Color.black), "MenuBar.background", new ColorUIResource(Color.lightGray), "MenuBar.border", new BasicBorders.MenuBarBorder(null, null), "MenuBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuBar.foreground", new ColorUIResource(Color.black), "MenuBar.windowBindings", new Object[] { "F10", "takeFocus" }, "MenuItem.acceleratorDelimiter", "-", "MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuItem.acceleratorForeground", new ColorUIResource(Color.black), "MenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "MenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "MenuItem.background", new ColorUIResource(Color.lightGray), "MenuItem.border", new BasicBorders.MarginBorder(), "MenuItem.borderPainted", Boolean.FALSE, "MenuItem.checkIcon", BasicIconFactory.getMenuItemCheckIcon(), "MenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "MenuItem.foreground", new ColorUIResource(Color.black), "MenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "MenuItem.selectionBackground", new ColorUIResource(lightPurple), "MenuItem.selectionForeground", new ColorUIResource(Color.black), "OptionPane.background", new ColorUIResource(Color.lightGray), "OptionPane.border", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.buttonAreaBorder", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.cancelButtonText", "Cancel", // XXX Don't use gif "OptionPane.errorIcon", new IconUIResource(new ImageIcon("icons/Error.gif")), "OptionPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "OptionPane.foreground", new ColorUIResource(Color.black), // XXX Don't use gif "OptionPane.informationIcon", new IconUIResource(new ImageIcon("icons/Inform.gif")), "OptionPane.messageAreaBorder", new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0), "OptionPane.messageForeground", new ColorUIResource(Color.black), "OptionPane.minimumSize", new DimensionUIResource(262, 90), "OptionPane.noButtonText", "No", "OptionPane.okButtonText", "OK", // XXX Don't use gif "OptionPane.questionIcon", new IconUIResource(new ImageIcon("icons/Question.gif")), // XXX Don't use gif "OptionPane.warningIcon", new IconUIResource(new ImageIcon("icons/Warn.gif")), "OptionPane.windowBindings", new Object[] { "ESCAPE", "close" }, "OptionPane.yesButtonText", "Yes", "Panel.background", new ColorUIResource(Color.lightGray), "Panel.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Panel.foreground", new ColorUIResource(Color.black), "PasswordField.background", new ColorUIResource(Color.white), "PasswordField.border", new BasicBorders.FieldBorder(null, null, null, null), "PasswordField.caretBlinkRate", new Integer(500), "PasswordField.caretForeground", new ColorUIResource(Color.black), "PasswordField.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12), "PasswordField.foreground", new ColorUIResource(Color.black), "PasswordField.inactiveForeground", new ColorUIResource(Color.gray), "PasswordField.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "notify-field-accept")}, "PasswordField.margin", new InsetsUIResource(0, 0, 0, 0), "PasswordField.selectionBackground", new ColorUIResource(lightPurple), "PasswordField.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.background", new ColorUIResource(Color.lightGray), "PopupMenu.border", new BorderUIResource.BevelBorderUIResource(0), "PopupMenu.font", new FontUIResource("Dialog", Font.PLAIN, 12), "PopupMenu.foreground", new ColorUIResource(Color.black), "ProgressBar.background", new ColorUIResource(Color.lightGray), "ProgressBar.border", new BorderUIResource.LineBorderUIResource(Color.darkGray), "ProgressBar.cellLength", new Integer(1), "ProgressBar.cellSpacing", new Integer(0), "ProgressBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ProgressBar.foreground", new ColorUIResource(midPurple), "ProgressBar.selectionBackground", new ColorUIResource(lightPurple), "ProgressBar.selectionForeground", new ColorUIResource(Color.lightGray), "ProgressBar.repaintInterval", new Integer(250), "ProgressBar.cycleTime", new Integer(6000), "RadioButton.background", new ColorUIResource(Color.lightGray), "RadioButton.border", new BorderUIResource.CompoundBorderUIResource(null, null), "RadioButton.darkShadow", new ColorUIResource(Color.darkGray), "RadioButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "RadioButton.font", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButton.foreground", new ColorUIResource(Color.black), "RadioButton.highlight", new ColorUIResource(Color.white), "RadioButton.icon", BasicIconFactory.getRadioButtonIcon(), "RadioButton.light", new ColorUIResource(Color.lightGray.brighter()), "RadioButton.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButton.shadow", new ColorUIResource(Color.gray), "RadioButton.textIconGap", new Integer(4), "RadioButton.textShiftOffset", new Integer(0), "RadioButtonMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButtonMenuItem.acceleratorForeground", new ColorUIResource(Color.black), "RadioButtonMenuItem.acceleratorSelectionForeground", new ColorUIResource(Color.white), "RadioButtonMenuItem.arrowIcon", BasicIconFactory.getMenuItemArrowIcon(), "RadioButtonMenuItem.background", new ColorUIResource(Color.lightGray), "RadioButtonMenuItem.border", new BasicBorders.MarginBorder(), "RadioButtonMenuItem.borderPainted", Boolean.FALSE, "RadioButtonMenuItem.checkIcon", BasicIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", new FontUIResource("Dialog", Font.PLAIN, 12), "RadioButtonMenuItem.foreground", new ColorUIResource(Color.black), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", new ColorUIResource(lightPurple), "RadioButtonMenuItem.selectionForeground", new ColorUIResource(Color.black), "RootPane.defaultButtonWindowKeyBindings", new Object[] { "ENTER", "press", "released ENTER", "release", "ctrl ENTER", "press", "ctrl released ENTER", "release" }, "ScrollBar.background", new ColorUIResource(224, 224, 224), "ScrollBar.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "negativeBlockIncrement", "PAGE_DOWN", "positiveBlockIncrement", "END", "maxScroll", "HOME", "minScroll", "LEFT", "positiveUnitIncrement", "KP_UP", "negativeUnitIncrement", "KP_DOWN", "positiveUnitIncrement", "UP", "negativeUnitIncrement", "RIGHT", "negativeUnitIncrement", "KP_LEFT", "positiveUnitIncrement", "DOWN", "positiveUnitIncrement", "KP_RIGHT", "negativeUnitIncrement" }), "ScrollBar.foreground", new ColorUIResource(Color.lightGray), "ScrollBar.maximumThumbSize", new DimensionUIResource(4096, 4096), "ScrollBar.minimumThumbSize", new DimensionUIResource(8, 8), "ScrollBar.thumb", new ColorUIResource(Color.lightGray), "ScrollBar.thumbDarkShadow", new ColorUIResource(Color.black), "ScrollBar.thumbHighlight", new ColorUIResource(Color.white), "ScrollBar.thumbLightShadow", new ColorUIResource(Color.gray), "ScrollBar.track", new ColorUIResource(224, 224, 224), "ScrollBar.trackHighlight", new ColorUIResource(Color.black), "ScrollPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "scrollUp", "KP_LEFT", "unitScrollLeft", "ctrl PAGE_DOWN","scrollRight", "PAGE_DOWN", "scrollDown", "KP_RIGHT", "unitScrollRight", "LEFT", "unitScrollLeft", "ctrl END", "scrollEnd", "UP", "unitScrollUp", "RIGHT", "unitScrollRight", "DOWN", "unitScrollDown", "ctrl HOME", "scrollHome", "ctrl PAGE_UP", "scrollLeft", "KP_UP", "unitScrollUp", "KP_DOWN", "unitScrollDown" }), "ScrollPane.background", new ColorUIResource(Color.lightGray), "ScrollPane.border", new BorderUIResource.EtchedBorderUIResource(), "ScrollPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ScrollPane.foreground", new ColorUIResource(Color.black), "Separator.background", new ColorUIResource(Color.white), "Separator.foreground", new ColorUIResource(Color.gray), "Separator.highlight", new ColorUIResource(Color.white), "Separator.shadow", new ColorUIResource(Color.gray), "Slider.background", new ColorUIResource(Color.lightGray), "Slider.focus", new ColorUIResource(Color.black), "Slider.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "PAGE_UP", "positiveBlockIncrement", "PAGE_DOWN", "negativeBlockIncrement", "END", "maxScroll", "HOME", "minScroll", "LEFT", "negativeUnitIncrement", "KP_UP", "positiveUnitIncrement", "KP_DOWN", "negativeUnitIncrement", "UP", "positiveUnitIncrement", "RIGHT", "positiveUnitIncrement", "KP_LEFT", "negativeUnitIncrement", "DOWN", "negativeUnitIncrement", "KP_RIGHT", "positiveUnitIncrement" }), "Slider.focusInsets", new InsetsUIResource(2, 2, 2, 2), "Slider.foreground", new ColorUIResource(Color.lightGray), "Slider.highlight", new ColorUIResource(Color.white), "Slider.shadow", new ColorUIResource(Color.gray), "Slider.thumbHeight", new Integer(20), "Slider.thumbWidth", new Integer(10), "Slider.tickHeight", new Integer(12), "SplitPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "F6", "toggleFocus", "F8", "startResize", "END", "selectMax", "HOME", "selectMin", "LEFT", "negativeIncremnent", "KP_UP", "negativeIncrement", "KP_DOWN", "positiveIncrement", "UP", "negativeIncrement", "RIGHT", "positiveIncrement", "KP_LEFT", "negativeIncrement", "DOWN", "positiveIncrement", "KP_RIGHT", "positiveIncrement" }), "SplitPane.background", new ColorUIResource(Color.lightGray), "SplitPane.border", new BasicBorders.SplitPaneBorder(null, null), "SplitPane.dividerSize", new Integer(10), "SplitPane.highlight", new ColorUIResource(Color.white), "SplitPane.shadow", new ColorUIResource(Color.gray), "TabbedPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ctrl PAGE_DOWN","navigatePageDown", "ctrl PAGE_UP", "navigatePageUp", "ctrl UP", "requestFocus", "ctrl KP_UP", "requestFocus" }), "TabbedPane.background", new ColorUIResource(Color.LIGHT_GRAY), "TabbedPane.contentBorderInsets", new InsetsUIResource(2, 2, 3, 3), "TabbedPane.darkShadow", new ColorUIResource(Color.darkGray), "TabbedPane.focus", new ColorUIResource(Color.black), "TabbedPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "LEFT", "navigateLeft", "KP_UP", "navigateUp", "ctrl DOWN", "requestFocusForVisibleComponent", "UP", "navigateUp", "KP_DOWN", "navigateDown", "RIGHT", "navigateRight", "KP_LEFT", "navigateLeft", "ctrl KP_DOWN", "requestFocusForVisibleComponent", "KP_RIGHT", "navigateRight", "DOWN", "navigateDown" }), "TabbedPane.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TabbedPane.foreground", new ColorUIResource(Color.black), "TabbedPane.highlight", new ColorUIResource(Color.lightGray), "TabbedPane.lightHighlight", new ColorUIResource(Color.white), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.shadow", new ColorUIResource(Color.gray), "TabbedPane.tabbedPaneTabAreaInsets", new InsetsUIResource(3, 2, 1, 2), "TabbedPane.tabbedPaneTabInsets", new InsetsUIResource(1, 4, 1, 4), "TabbedPane.tabbedPaneContentBorderInsets", new InsetsUIResource(3, 2, 1, 2), "TabbedPane.tabbedPaneTabPadInsets", new InsetsUIResource(1, 1, 1, 1), "TabbedPane.tabRunOverlay", new Integer(2), "TabbedPane.textIconGap", new Integer(4), "Table.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "shift PAGE_DOWN","scrollDownExtendSelection", "PAGE_DOWN", "scrollDownChangeSelection", "END", "selectLastColumn", "shift END", "selectLastColumnExtendSelection", "HOME", "selectFirstColumn", "ctrl END", "selectLastRow", "ctrl shift END","selectLastRowExtendSelection", "LEFT", "selectPreviousColumn", "shift HOME", "selectFirstColumnExtendSelection", "UP", "selectPreviousRow", "RIGHT", "selectNextColumn", "ctrl HOME", "selectFirstRow", "shift LEFT", "selectPreviousColumnExtendSelection", "DOWN", "selectNextRow", "ctrl shift HOME","selectFirstRowExtendSelection", "shift UP", "selectPreviousRowExtendSelection", "F2", "startEditing", "shift RIGHT", "selectNextColumnExtendSelection", "TAB", "selectNextColumnCell", "shift DOWN", "selectNextRowExtendSelection", "ENTER", "selectNextRowCell", "KP_UP", "selectPreviousRow", "KP_DOWN", "selectNextRow", "KP_LEFT", "selectPreviousColumn", "KP_RIGHT", "selectNextColumn", "shift TAB", "selectPreviousColumnCell", "ctrl A", "selectAll", "shift ENTER", "selectPreviousRowCell", "shift KP_DOWN", "selectNextRowExtendSelection", "shift KP_LEFT", "selectPreviousColumnExtendSelection", "ESCAPE", "cancel", "ctrl shift PAGE_UP", "scrollRightExtendSelection", "shift KP_RIGHT", " selectNextColumnExtendSelection", "ctrl PAGE_UP", "scrollLeftChangeSelection", "shift PAGE_UP", "scrollUpExtendSelection", "ctrl shift PAGE_DOWN", "scrollLeftExtendSelection", "ctrl PAGE_DOWN", "scrollRightChangeSelection", "PAGE_UP", "scrollUpChangeSelection" }), "Table.background", new ColorUIResource(Color.white), "Table.focusCellBackground", new ColorUIResource(Color.white), "Table.focusCellForeground", new ColorUIResource(Color.black), "Table.focusCellHighlightBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Table.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Table.foreground", new ColorUIResource(Color.black), "Table.gridColor", new ColorUIResource(Color.gray), "Table.scrollPaneBorder", new BorderUIResource.BevelBorderUIResource(0), "Table.selectionBackground", new ColorUIResource(lightPurple), "Table.selectionForeground", new ColorUIResource(Color.black), "TableHeader.background", new ColorUIResource(Color.lightGray), "TableHeader.cellBorder", new BorderUIResource.BevelBorderUIResource(0), "TableHeader.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TableHeader.foreground", new ColorUIResource(Color.black), "TextArea.background", new ColorUIResource(Color.white), "TextArea.border", new BasicBorders.MarginBorder(), "TextArea.caretBlinkRate", new Integer(500), "TextArea.caretForeground", new ColorUIResource(Color.black), "TextArea.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12), "TextArea.foreground", new ColorUIResource(Color.black), "TextArea.inactiveForeground", new ColorUIResource(Color.gray), "TextArea.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "TextArea.margin", new InsetsUIResource(0, 0, 0, 0), "TextArea.selectionBackground", new ColorUIResource(lightPurple), "TextArea.selectionForeground", new ColorUIResource(Color.black), "TextField.background", new ColorUIResource(Color.white), "TextField.border", new BasicBorders.FieldBorder(null, null, null, null), "TextField.caretBlinkRate", new Integer(500), "TextField.caretForeground", new ColorUIResource(Color.black), "TextField.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "TextField.foreground", new ColorUIResource(Color.black), "TextField.inactiveForeground", new ColorUIResource(Color.gray), "TextField.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "notify-field-accept"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, InputEvent.SHIFT_DOWN_MASK), "selection-backward"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, InputEvent.SHIFT_DOWN_MASK), "selection-forward"), }, "TextField.margin", new InsetsUIResource(0, 0, 0, 0), "TextField.selectionBackground", new ColorUIResource(lightPurple), "TextField.selectionForeground", new ColorUIResource(Color.black), "TextPane.background", new ColorUIResource(Color.white), "TextPane.border", new BasicBorders.MarginBorder(), "TextPane.caretBlinkRate", new Integer(500), "TextPane.caretForeground", new ColorUIResource(Color.black), "TextPane.font", new FontUIResource("Serif", Font.PLAIN, 12), "TextPane.foreground", new ColorUIResource(Color.black), "TextPane.inactiveForeground", new ColorUIResource(Color.gray), "TextPane.keyBindings", new JTextComponent.KeyBinding[] { new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), "caret-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), "caret-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0), "page-up"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0), "page-down"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "insert-break"), new JTextComponent.KeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "insert-tab") }, "TextPane.margin", new InsetsUIResource(3, 3, 3, 3), "TextPane.selectionBackground", new ColorUIResource(Color.lightGray), "TextPane.selectionForeground", new ColorUIResource(Color.white), "TitledBorder.border", new BorderUIResource.EtchedBorderUIResource(), "TitledBorder.font", new FontUIResource("Dialog", Font.PLAIN, 12), "TitledBorder.titleColor", new ColorUIResource(Color.black), "ToggleButton.background", new ColorUIResource(Color.lightGray), "ToggleButton.border", new BorderUIResource.CompoundBorderUIResource(null, null), "ToggleButton.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "SPACE", "pressed", "released SPACE", "released" }), "ToggleButton.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToggleButton.foreground", new ColorUIResource(Color.black), "ToggleButton.margin", new InsetsUIResource(2, 14, 2, 14), "ToggleButton.textIconGap", new Integer(4), "ToggleButton.textShiftOffset", new Integer(0), "ToolBar.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "UP", "navigateUp", "KP_UP", "navigateUp", "DOWN", "navigateDown", "KP_DOWN", "navigateDown", "LEFT", "navigateLeft", "KP_LEFT", "navigateLeft", "RIGHT", "navigateRight", "KP_RIGHT", "navigateRight" }), "ToolBar.background", new ColorUIResource(Color.lightGray), "ToolBar.border", new BorderUIResource.EtchedBorderUIResource(), "ToolBar.dockingBackground", new ColorUIResource(Color.lightGray), "ToolBar.dockingForeground", new ColorUIResource(11, 30, 143), "ToolBar.floatingBackground", new ColorUIResource(Color.lightGray), "ToolBar.floatingForeground", new ColorUIResource(113, 171, 212), "ToolBar.font", new FontUIResource("Dialog", Font.PLAIN, 12), "ToolBar.foreground", new ColorUIResource(Color.black), "ToolBar.separatorSize", new DimensionUIResource(20, 20), "ToolTip.background", new ColorUIResource(122, 178, 241), "ToolTip.border", new BorderUIResource.LineBorderUIResource(Color.lightGray), "ToolTip.font", new FontUIResource("SansSerif", Font.PLAIN, 12), "ToolTip.foreground", new ColorUIResource(Color.black), "Tree.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ESCAPE", "cancel" }), "Tree.background", new ColorUIResource(Color.white), "Tree.changeSelectionWithFocus", Boolean.TRUE, "Tree.closedIcon", new IconUIResource(new ImageIcon("icons/TreeClosed.png")), "Tree.collapsedIcon", new IconUIResource(new ImageIcon("icons/TreeCollapsed.png")), "Tree.drawsFocusBorderAroundIcon", Boolean.FALSE, "Tree.editorBorder", new BorderUIResource.LineBorderUIResource(Color.lightGray), "Tree.focusInputMap", new UIDefaults.LazyInputMap(new Object[] { "shift PAGE_DOWN", "scrollDownExtendSelection", "PAGE_DOWN", "scrollDownChangeSelection", "END", "selectLast", "ctrl KP_UP", "selectPreviousChangeLead", "shift END", "selectLastExtendSelection", "HOME", "selectFirst", "ctrl END", "selectLastChangeLead", "ctrl /", "selectAll", "LEFT", "selectParent", "shift HOME", "selectFirstExtendSelection", "UP", "selectPrevious", "ctrl KP_DOWN", "selectNextChangeLead", "RIGHT", "selectChild", "ctrl HOME", "selectFirstChangeLead", "DOWN", "selectNext", "ctrl KP_LEFT", "scrollLeft", "shift UP", "selectPreviousExtendSelection", "F2", "startEditing", "ctrl LEFT", "scrollLeft", "ctrl KP_RIGHT","scrollRight", "ctrl UP", "selectPreviousChangeLead", "shift DOWN", "selectNextExtendSelection", "ENTER", "toggle", "KP_UP", "selectPrevious", "KP_DOWN", "selectNext", "ctrl RIGHT", "scrollRight", "KP_LEFT", "selectParent", "KP_RIGHT", "selectChild", "ctrl DOWN", "selectNextChangeLead", "ctrl A", "selectAll", "shift KP_UP", "selectPreviousExtendSelection", "shift KP_DOWN","selectNextExtendSelection", "ctrl SPACE", "toggleSelectionPreserveAnchor", "ctrl shift PAGE_UP", "scrollUpExtendSelection", "ctrl \\", "clearSelection", "shift SPACE", "extendSelection", "ctrl PAGE_UP", "scrollUpChangeLead", "shift PAGE_UP","scrollUpExtendSelection", "SPACE", "toggleSelectionPreserveAnchor", "ctrl shift PAGE_DOWN", "scrollDownExtendSelection", "PAGE_UP", "scrollUpChangeSelection", "ctrl PAGE_DOWN", "scrollDownChangeLead" }), "Tree.font", new FontUIResource("Dialog", Font.PLAIN, 12), "Tree.expandedIcon", new IconUIResource(new ImageIcon("icons/TreeExpanded.png")), "Tree.foreground", new ColorUIResource(Color.black), "Tree.hash", new ColorUIResource(Color.gray), "Tree.leafIcon", new IconUIResource(new ImageIcon("icons/TreeLeaf.png")), "Tree.leftChildIndent", new Integer(7), "Tree.openIcon", new IconUIResource(new ImageIcon("icons/TreeOpen.png")), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(16), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(lightPurple), "Tree.selectionBorderColor", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(Color.lightGray), "Tree.textForeground", new ColorUIResource(Color.black), "Viewport.background", new ColorUIResource(Color.lightGray), "Viewport.font", new FontUIResource("Dialog", Font.PLAIN, 12), }; defaults.putDefaults(uiDefaults); }
12,640
public static Border getEtchedBorderUIResource() { return null; }
public static Border getEtchedBorderUIResource() { return null; }
12,641
public static ComponentUI createUI(JComponent component) { if (instances == null) instances = new HashMap(); Object o = instances.get(component); MetalTreeUI instance; if (o == null) { instance = new MetalTreeUI(); instances.put(component, instance); } else instance = (MetalTreeUI) o; return instance; }
public static ComponentUI createUI(JComponent component) { if (instances == null) instances = new HashMap(); Object o = instances.get(component); MetalTreeUI instance; if (o == null) { instance = new MetalTreeUI(); instances.put(component, instance); } else instance = (MetalTreeUI) o; return instance; }
12,642
public final void copy(Address src, Address dst, int size) { Unsafe.copy(src, dst, size); }
public final void copy(Address src, Address dst, Extent size) { Unsafe.copy(src, dst, size); }
12,643
public MappedFSBlockDeviceSupport(Device parent, long offset, long length) throws IOException { super(parent, offset, length); try { this.parentApi = (FSBlockDeviceAPI) parent.getAPI(FSBlockDeviceAPI.class); } catch (ApiNotFoundException ex) { throw new IOException(ex); } registerAPI(FSBlockDeviceAPI.class, this); }
public MappedFSBlockDeviceSupport(Device parent, long offset, long length) throws IOException { super(parent, offset, length); try { this.parentApi = (FSBlockDeviceAPI) parent.getAPI(FSBlockDeviceAPI.class); } catch (ApiNotFoundException ex) { final IOException ioe = new IOException("BlockDeviceAPI not found on device"); ioe.initCause(ex); throw ioe; } registerAPI(FSBlockDeviceAPI.class, this); }
12,644
public Iterator iterator() { return new IndexEntryIterator(parentFileRecord, this, getHeader() .getFirstEntryOffset() + 0x18); }
public Iterator<IndexEntry> iterator() { return new IndexEntryIterator(parentFileRecord, this, getHeader() .getFirstEntryOffset() + 0x18); }
12,645
public MarshalException(String s, Exception e) { super(s, e); }
public MarshalException(String s) { super(s, e); }
12,646
public MarshalException(String s, Exception e) { super(s, e); }
public MarshalException(String s, Exception e) { super(s); }
12,647
private void copyIso8859_1ReadBuffer (int count, char mask) throws IOException { int i, j; for (i = 0, j = readBufferPos; i < count; i++, j++) { char c = (char) (rawReadBuffer [i] & 0xff); if ((c & mask) != 0) throw new CharConversionException ("non-ASCII character U+" + Integer.toHexString (c)); if (c == 0x0085 && xmlVersion == XML_11) c = '\r'; readBuffer [j] = c; if (c == '\r') { sawCR = true; } } readBufferLength = j; }
private void copyIso8859_1ReadBuffer (int count, char mask) throws IOException { int i, j; for (i = 0, j = readBufferPos; i < count; i++, j++) { char c = (char) (rawReadBuffer [i] & 0xff); if ((c & mask) != 0) throw new CharConversionException ("non-ASCII character U+" + Integer.toHexString (c)); if (c == 0x0085 && xmlVersion == XML_11) c = '\r'; readBuffer [j] = c; if (c == '\r') { sawCR = true; } } readBufferLength = j; }
12,650
private void copyIso8859_1ReadBuffer (int count, char mask) throws IOException { int i, j; for (i = 0, j = readBufferPos; i < count; i++, j++) { char c = (char) (rawReadBuffer [i] & 0xff); if ((c & mask) != 0) throw new CharConversionException ("non-ASCII character U+" + Integer.toHexString (c)); if (c == 0x0085 && xmlVersion == XML_11) c = '\r'; readBuffer [j] = c; if (c == '\r') { sawCR = true; } } readBufferLength = j; }
private void copyIso8859_1ReadBuffer (int count, char mask) throws IOException { int i, j; for (i = 0, j = readBufferPos; i < count; i++, j++) { char c = (char) (rawReadBuffer [i] & 0xff); if ((c & mask) != 0) throw new CharConversionException ("non-ASCII character U+" + Integer.toHexString (c)); if (c == 0x0085 && xmlVersion == XML_11) c = '\r'; readBuffer [j] = c; if (c == '\r') { sawCR = true; } } readBufferLength = j; }
12,651
private void copyUcs2ReadBuffer (int count, int shift1, int shift2) throws SAXException { int j = readBufferPos; if (count > 0 && (count % 2) != 0) { encodingError ("odd number of bytes in UCS-2 encoding", -1, count); } // The loops are faster with less internal brancing; hence two if (shift1 == 0) { // "UTF-16-LE" for (int i = 0; i < count; i += 2) { char c = (char) (rawReadBuffer [i + 1] << 8); c |= 0xff & rawReadBuffer [i]; readBuffer [j++] = c; if (c == '\r') sawCR = true; } } else { // "UTF-16-BE" for (int i = 0; i < count; i += 2) { char c = (char) (rawReadBuffer [i] << 8); c |= 0xff & rawReadBuffer [i + 1]; readBuffer [j++] = c; if (c == '\r') sawCR = true; } } readBufferLength = j; }
private void copyUcs2ReadBuffer (int count, int shift1, int shift2) throws SAXException { int j = readBufferPos; if (count > 0 && (count % 2) != 0) { encodingError ("odd number of bytes in UCS-2 encoding", -1, count); } // The loops are faster with less internal brancing; hence two if (shift1 == 0) { // "UTF-16-LE" for (int i = 0; i < count; i += 2) { char c = (char) (rawReadBuffer [i + 1] << 8); c |= 0xff & rawReadBuffer [i]; readBuffer [j++] = c; if (c == '\r') sawCR = true; } } else { // "UTF-16-BE" for (int i = 0; i < count; i += 2) { char c = (char) (rawReadBuffer [i] << 8); c |= 0xff & rawReadBuffer [i + 1]; readBuffer [j++] = c; if (c == '\r') sawCR = true; } } readBufferLength = j; }
12,652
private void copyUcs4ReadBuffer (int count, int shift1, int shift2, int shift3, int shift4) throws SAXException { int j = readBufferPos; if (count > 0 && (count % 4) != 0) { encodingError ( "number of bytes in UCS-4 encoding not divisible by 4", -1, count); } for (int i = 0; i < count; i += 4) { int value = (((rawReadBuffer [i] & 0xff) << shift1) | ((rawReadBuffer [i + 1] & 0xff) << shift2) | ((rawReadBuffer [i + 2] & 0xff) << shift3) | ((rawReadBuffer [i + 3] & 0xff) << shift4)); if (value < 0x0000ffff) { readBuffer [j++] = (char) value; if (value == (int) '\r') { sawCR = true; } } else if (value < 0x0010ffff) { value -= 0x010000; readBuffer [j++] = (char) (0xd8 | ((value >> 10) & 0x03ff)); readBuffer [j++] = (char) (0xdc | (value & 0x03ff)); } else { encodingError ("UCS-4 value out of range for Unicode", value, i); } } readBufferLength = j; }
private void copyUcs4ReadBuffer (int count, int shift1, int shift2, int shift3, int shift4) throws SAXException { int j = readBufferPos; if (count > 0 && (count % 4) != 0) { encodingError ( "number of bytes in UCS-4 encoding not divisible by 4", -1, count); } for (int i = 0; i < count; i += 4) { int value = (((rawReadBuffer [i] & 0xff) << shift1) | ((rawReadBuffer [i + 1] & 0xff) << shift2) | ((rawReadBuffer [i + 2] & 0xff) << shift3) | ((rawReadBuffer [i + 3] & 0xff) << shift4)); if (value < 0x0000ffff) { readBuffer [j++] = (char) value; if (value == (int) '\r') { sawCR = true; } } else if (value < 0x0010ffff) { value -= 0x010000; readBuffer [j++] = (char) (0xd8 | ((value >> 10) & 0x03ff)); readBuffer [j++] = (char) (0xdc | (value & 0x03ff)); } else { encodingError ("UCS-4 value out of range for Unicode", value, i); } } readBufferLength = j; }
12,654
private void copyUtf8ReadBuffer (int count) throws SAXException, IOException { int i = 0; int j = readBufferPos; int b1; char c = 0; /* // check once, so the runtime won't (if it's smart enough) if (count < 0 || count > rawReadBuffer.length) throw new ArrayIndexOutOfBoundsException (Integer.toString (count)); */ while (i < count) { b1 = rawReadBuffer [i++]; // Determine whether we are dealing // with a one-, two-, three-, or four- // byte sequence. if (b1 < 0) { if ((b1 & 0xe0) == 0xc0) { // 2-byte sequence: 00000yyyyyxxxxxx = 110yyyyy 10xxxxxx c = (char) (((b1 & 0x1f) << 6) | getNextUtf8Byte (i++, count)); if (c < 0x0080) encodingError ("Illegal two byte UTF-8 sequence", c, 0); //Sec 2.11 // [1] the two-character sequence #xD #xA // [2] the two-character sequence #xD #x85 if ((c == 0x0085 || c == 0x000a) && sawCR) continue; // Sec 2.11 // [3] the single character #x85 if(c == 0x0085 && xmlVersion == XML_11) readBuffer[j++] = '\r'; } else if ((b1 & 0xf0) == 0xe0) { // 3-byte sequence: // zzzzyyyyyyxxxxxx = 1110zzzz 10yyyyyy 10xxxxxx // most CJKV characters c = (char) (((b1 & 0x0f) << 12) | (getNextUtf8Byte (i++, count) << 6) | getNextUtf8Byte (i++, count)); //sec 2.11 //[4] the single character #x2028 if(c == 0x2028 && xmlVersion == XML_11){ readBuffer[j++] = '\r'; sawCR = true; continue; } if (c < 0x0800 || (c >= 0xd800 && c <= 0xdfff)) encodingError ("Illegal three byte UTF-8 sequence", c, 0); } else if ((b1 & 0xf8) == 0xf0) { // 4-byte sequence: 11101110wwwwzzzzyy + 110111yyyyxxxxxx // = 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx // (uuuuu = wwww + 1) // "Surrogate Pairs" ... from the "Astral Planes" // Unicode 3.1 assigned the first characters there int iso646 = b1 & 07; iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); if (iso646 <= 0xffff) { encodingError ("Illegal four byte UTF-8 sequence", iso646, 0); } else { if (iso646 > 0x0010ffff) encodingError ( "UTF-8 value out of range for Unicode", iso646, 0); iso646 -= 0x010000; readBuffer [j++] = (char) (0xd800 | (iso646 >> 10)); readBuffer [j++] = (char) (0xdc00 | (iso646 & 0x03ff)); continue; } } else { // The five and six byte encodings aren't supported; // they exceed the Unicode (and XML) range. encodingError ( "unsupported five or six byte UTF-8 sequence", 0xff & b1, i); // NOTREACHED c = 0; } } else { // 1-byte sequence: 000000000xxxxxxx = 0xxxxxxx // (US-ASCII character, "common" case, one branch to here) c = (char) b1; } readBuffer [j++] = c; if (c == '\r') sawCR = true; } // How many characters have we read? readBufferLength = j; }
private void copyUtf8ReadBuffer (int count) throws SAXException, IOException { int i = 0; int j = readBufferPos; int b1; char c = 0; /* // check once, so the runtime won't (if it's smart enough) if (count < 0 || count > rawReadBuffer.length) throw new ArrayIndexOutOfBoundsException (Integer.toString (count)); */ while (i < count) { b1 = rawReadBuffer [i++]; // Determine whether we are dealing // with a one-, two-, three-, or four- // byte sequence. if (b1 < 0) { if ((b1 & 0xe0) == 0xc0) { // 2-byte sequence: 00000yyyyyxxxxxx = 110yyyyy 10xxxxxx c = (char) (((b1 & 0x1f) << 6) | getNextUtf8Byte (i++, count)); if (c < 0x0080) { encodingError("Illegal two byte UTF-8 sequence", c, 0); //Sec 2.11 // [1] the two-character sequence #xD #xA // [2] the two-character sequence #xD #x85 if ((c == 0x0085 || c == 0x000a) && sawCR) continue; // Sec 2.11 // [3] the single character #x85 if(c == 0x0085 && xmlVersion == XML_11) readBuffer[j++] = '\r'; } else if ((b1 & 0xf0) == 0xe0) { // 3-byte sequence: // zzzzyyyyyyxxxxxx = 1110zzzz 10yyyyyy 10xxxxxx // most CJKV characters c = (char) (((b1 & 0x0f) << 12) | (getNextUtf8Byte (i++, count) << 6) | getNextUtf8Byte (i++, count)); //sec 2.11 //[4] the single character #x2028 if(c == 0x2028 && xmlVersion == XML_11){ readBuffer[j++] = '\r'; sawCR = true; continue; } if (c < 0x0800 || (c >= 0xd800 && c <= 0xdfff)) encodingError ("Illegal three byte UTF-8 sequence", c, 0); } else if ((b1 & 0xf8) == 0xf0) { // 4-byte sequence: 11101110wwwwzzzzyy + 110111yyyyxxxxxx // = 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx // (uuuuu = wwww + 1) // "Surrogate Pairs" ... from the "Astral Planes" // Unicode 3.1 assigned the first characters there int iso646 = b1 & 07; iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); if (iso646 <= 0xffff) { encodingError ("Illegal four byte UTF-8 sequence", iso646, 0); } else { if (iso646 > 0x0010ffff) encodingError ( "UTF-8 value out of range for Unicode", iso646, 0); iso646 -= 0x010000; readBuffer [j++] = (char) (0xd800 | (iso646 >> 10)); readBuffer [j++] = (char) (0xdc00 | (iso646 & 0x03ff)); continue; } } else { // The five and six byte encodings aren't supported; // they exceed the Unicode (and XML) range. encodingError ( "unsupported five or six byte UTF-8 sequence", 0xff & b1, i); // NOTREACHED c = 0; } } else { // 1-byte sequence: 000000000xxxxxxx = 0xxxxxxx // (US-ASCII character, "common" case, one branch to here) c = (char) b1; } readBuffer [j++] = c; if (c == '\r') sawCR = true; } // How many characters have we read? readBufferLength = j; }
12,655
private void copyUtf8ReadBuffer (int count) throws SAXException, IOException { int i = 0; int j = readBufferPos; int b1; char c = 0; /* // check once, so the runtime won't (if it's smart enough) if (count < 0 || count > rawReadBuffer.length) throw new ArrayIndexOutOfBoundsException (Integer.toString (count)); */ while (i < count) { b1 = rawReadBuffer [i++]; // Determine whether we are dealing // with a one-, two-, three-, or four- // byte sequence. if (b1 < 0) { if ((b1 & 0xe0) == 0xc0) { // 2-byte sequence: 00000yyyyyxxxxxx = 110yyyyy 10xxxxxx c = (char) (((b1 & 0x1f) << 6) | getNextUtf8Byte (i++, count)); if (c < 0x0080) encodingError ("Illegal two byte UTF-8 sequence", c, 0); //Sec 2.11 // [1] the two-character sequence #xD #xA // [2] the two-character sequence #xD #x85 if ((c == 0x0085 || c == 0x000a) && sawCR) continue; // Sec 2.11 // [3] the single character #x85 if(c == 0x0085 && xmlVersion == XML_11) readBuffer[j++] = '\r'; } else if ((b1 & 0xf0) == 0xe0) { // 3-byte sequence: // zzzzyyyyyyxxxxxx = 1110zzzz 10yyyyyy 10xxxxxx // most CJKV characters c = (char) (((b1 & 0x0f) << 12) | (getNextUtf8Byte (i++, count) << 6) | getNextUtf8Byte (i++, count)); //sec 2.11 //[4] the single character #x2028 if(c == 0x2028 && xmlVersion == XML_11){ readBuffer[j++] = '\r'; sawCR = true; continue; } if (c < 0x0800 || (c >= 0xd800 && c <= 0xdfff)) encodingError ("Illegal three byte UTF-8 sequence", c, 0); } else if ((b1 & 0xf8) == 0xf0) { // 4-byte sequence: 11101110wwwwzzzzyy + 110111yyyyxxxxxx // = 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx // (uuuuu = wwww + 1) // "Surrogate Pairs" ... from the "Astral Planes" // Unicode 3.1 assigned the first characters there int iso646 = b1 & 07; iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); if (iso646 <= 0xffff) { encodingError ("Illegal four byte UTF-8 sequence", iso646, 0); } else { if (iso646 > 0x0010ffff) encodingError ( "UTF-8 value out of range for Unicode", iso646, 0); iso646 -= 0x010000; readBuffer [j++] = (char) (0xd800 | (iso646 >> 10)); readBuffer [j++] = (char) (0xdc00 | (iso646 & 0x03ff)); continue; } } else { // The five and six byte encodings aren't supported; // they exceed the Unicode (and XML) range. encodingError ( "unsupported five or six byte UTF-8 sequence", 0xff & b1, i); // NOTREACHED c = 0; } } else { // 1-byte sequence: 000000000xxxxxxx = 0xxxxxxx // (US-ASCII character, "common" case, one branch to here) c = (char) b1; } readBuffer [j++] = c; if (c == '\r') sawCR = true; } // How many characters have we read? readBufferLength = j; }
private void copyUtf8ReadBuffer (int count) throws SAXException, IOException { int i = 0; int j = readBufferPos; int b1; char c = 0; /* // check once, so the runtime won't (if it's smart enough) if (count < 0 || count > rawReadBuffer.length) throw new ArrayIndexOutOfBoundsException (Integer.toString (count)); */ while (i < count) { b1 = rawReadBuffer [i++]; // Determine whether we are dealing // with a one-, two-, three-, or four- // byte sequence. if (b1 < 0) { if ((b1 & 0xe0) == 0xc0) { // 2-byte sequence: 00000yyyyyxxxxxx = 110yyyyy 10xxxxxx c = (char) (((b1 & 0x1f) << 6) | getNextUtf8Byte (i++, count)); if (c < 0x0080) encodingError ("Illegal two byte UTF-8 sequence", c, 0); //Sec 2.11 // [1] the two-character sequence #xD #xA // [2] the two-character sequence #xD #x85 if ((c == 0x0085 || c == 0x000a) && sawCR) continue; // Sec 2.11 // [3] the single character #x85 if (c == 0x0085 && xmlVersion == XML_11) { readBuffer[j++] = '\r'; } else if ((b1 & 0xf0) == 0xe0) { // 3-byte sequence: // zzzzyyyyyyxxxxxx = 1110zzzz 10yyyyyy 10xxxxxx // most CJKV characters c = (char) (((b1 & 0x0f) << 12) | (getNextUtf8Byte (i++, count) << 6) | getNextUtf8Byte (i++, count)); //sec 2.11 //[4] the single character #x2028 if(c == 0x2028 && xmlVersion == XML_11){ readBuffer[j++] = '\r'; sawCR = true; continue; } if (c < 0x0800 || (c >= 0xd800 && c <= 0xdfff)) encodingError ("Illegal three byte UTF-8 sequence", c, 0); } else if ((b1 & 0xf8) == 0xf0) { // 4-byte sequence: 11101110wwwwzzzzyy + 110111yyyyxxxxxx // = 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx // (uuuuu = wwww + 1) // "Surrogate Pairs" ... from the "Astral Planes" // Unicode 3.1 assigned the first characters there int iso646 = b1 & 07; iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); if (iso646 <= 0xffff) { encodingError ("Illegal four byte UTF-8 sequence", iso646, 0); } else { if (iso646 > 0x0010ffff) encodingError ( "UTF-8 value out of range for Unicode", iso646, 0); iso646 -= 0x010000; readBuffer [j++] = (char) (0xd800 | (iso646 >> 10)); readBuffer [j++] = (char) (0xdc00 | (iso646 & 0x03ff)); continue; } } else { // The five and six byte encodings aren't supported; // they exceed the Unicode (and XML) range. encodingError ( "unsupported five or six byte UTF-8 sequence", 0xff & b1, i); // NOTREACHED c = 0; } } else { // 1-byte sequence: 000000000xxxxxxx = 0xxxxxxx // (US-ASCII character, "common" case, one branch to here) c = (char) b1; } readBuffer [j++] = c; if (c == '\r') sawCR = true; } // How many characters have we read? readBufferLength = j; }
12,656
private void copyUtf8ReadBuffer (int count) throws SAXException, IOException { int i = 0; int j = readBufferPos; int b1; char c = 0; /* // check once, so the runtime won't (if it's smart enough) if (count < 0 || count > rawReadBuffer.length) throw new ArrayIndexOutOfBoundsException (Integer.toString (count)); */ while (i < count) { b1 = rawReadBuffer [i++]; // Determine whether we are dealing // with a one-, two-, three-, or four- // byte sequence. if (b1 < 0) { if ((b1 & 0xe0) == 0xc0) { // 2-byte sequence: 00000yyyyyxxxxxx = 110yyyyy 10xxxxxx c = (char) (((b1 & 0x1f) << 6) | getNextUtf8Byte (i++, count)); if (c < 0x0080) encodingError ("Illegal two byte UTF-8 sequence", c, 0); //Sec 2.11 // [1] the two-character sequence #xD #xA // [2] the two-character sequence #xD #x85 if ((c == 0x0085 || c == 0x000a) && sawCR) continue; // Sec 2.11 // [3] the single character #x85 if(c == 0x0085 && xmlVersion == XML_11) readBuffer[j++] = '\r'; } else if ((b1 & 0xf0) == 0xe0) { // 3-byte sequence: // zzzzyyyyyyxxxxxx = 1110zzzz 10yyyyyy 10xxxxxx // most CJKV characters c = (char) (((b1 & 0x0f) << 12) | (getNextUtf8Byte (i++, count) << 6) | getNextUtf8Byte (i++, count)); //sec 2.11 //[4] the single character #x2028 if(c == 0x2028 && xmlVersion == XML_11){ readBuffer[j++] = '\r'; sawCR = true; continue; } if (c < 0x0800 || (c >= 0xd800 && c <= 0xdfff)) encodingError ("Illegal three byte UTF-8 sequence", c, 0); } else if ((b1 & 0xf8) == 0xf0) { // 4-byte sequence: 11101110wwwwzzzzyy + 110111yyyyxxxxxx // = 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx // (uuuuu = wwww + 1) // "Surrogate Pairs" ... from the "Astral Planes" // Unicode 3.1 assigned the first characters there int iso646 = b1 & 07; iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); if (iso646 <= 0xffff) { encodingError ("Illegal four byte UTF-8 sequence", iso646, 0); } else { if (iso646 > 0x0010ffff) encodingError ( "UTF-8 value out of range for Unicode", iso646, 0); iso646 -= 0x010000; readBuffer [j++] = (char) (0xd800 | (iso646 >> 10)); readBuffer [j++] = (char) (0xdc00 | (iso646 & 0x03ff)); continue; } } else { // The five and six byte encodings aren't supported; // they exceed the Unicode (and XML) range. encodingError ( "unsupported five or six byte UTF-8 sequence", 0xff & b1, i); // NOTREACHED c = 0; } } else { // 1-byte sequence: 000000000xxxxxxx = 0xxxxxxx // (US-ASCII character, "common" case, one branch to here) c = (char) b1; } readBuffer [j++] = c; if (c == '\r') sawCR = true; } // How many characters have we read? readBufferLength = j; }
private void copyUtf8ReadBuffer (int count) throws SAXException, IOException { int i = 0; int j = readBufferPos; int b1; char c = 0; /* // check once, so the runtime won't (if it's smart enough) if (count < 0 || count > rawReadBuffer.length) throw new ArrayIndexOutOfBoundsException (Integer.toString (count)); */ while (i < count) { b1 = rawReadBuffer [i++]; // Determine whether we are dealing // with a one-, two-, three-, or four- // byte sequence. if (b1 < 0) { if ((b1 & 0xe0) == 0xc0) { // 2-byte sequence: 00000yyyyyxxxxxx = 110yyyyy 10xxxxxx c = (char) (((b1 & 0x1f) << 6) | getNextUtf8Byte (i++, count)); if (c < 0x0080) encodingError ("Illegal two byte UTF-8 sequence", c, 0); //Sec 2.11 // [1] the two-character sequence #xD #xA // [2] the two-character sequence #xD #x85 if ((c == 0x0085 || c == 0x000a) && sawCR) continue; // Sec 2.11 // [3] the single character #x85 if(c == 0x0085 && xmlVersion == XML_11) readBuffer[j++] = '\r'; } } else if ((b1 & 0xf0) == 0xe0) { // 3-byte sequence: // zzzzyyyyyyxxxxxx = 1110zzzz 10yyyyyy 10xxxxxx // most CJKV characters c = (char) (((b1 & 0x0f) << 12) | (getNextUtf8Byte (i++, count) << 6) | getNextUtf8Byte (i++, count)); //sec 2.11 //[4] the single character #x2028 if(c == 0x2028 && xmlVersion == XML_11){ readBuffer[j++] = '\r'; sawCR = true; continue; } if (c < 0x0800 || (c >= 0xd800 && c <= 0xdfff)) encodingError ("Illegal three byte UTF-8 sequence", c, 0); } else if ((b1 & 0xf8) == 0xf0) { // 4-byte sequence: 11101110wwwwzzzzyy + 110111yyyyxxxxxx // = 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx // (uuuuu = wwww + 1) // "Surrogate Pairs" ... from the "Astral Planes" // Unicode 3.1 assigned the first characters there int iso646 = b1 & 07; iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); if (iso646 <= 0xffff) { encodingError ("Illegal four byte UTF-8 sequence", iso646, 0); } else { if (iso646 > 0x0010ffff) encodingError ( "UTF-8 value out of range for Unicode", iso646, 0); iso646 -= 0x010000; readBuffer [j++] = (char) (0xd800 | (iso646 >> 10)); readBuffer [j++] = (char) (0xdc00 | (iso646 & 0x03ff)); continue; } } else { // The five and six byte encodings aren't supported; // they exceed the Unicode (and XML) range. encodingError ( "unsupported five or six byte UTF-8 sequence", 0xff & b1, i); // NOTREACHED c = 0; } } else { // 1-byte sequence: 000000000xxxxxxx = 0xxxxxxx // (US-ASCII character, "common" case, one branch to here) c = (char) b1; } readBuffer [j++] = c; if (c == '\r') sawCR = true; } // How many characters have we read? readBufferLength = j; }
12,657
private void copyUtf8ReadBuffer (int count) throws SAXException, IOException { int i = 0; int j = readBufferPos; int b1; char c = 0; /* // check once, so the runtime won't (if it's smart enough) if (count < 0 || count > rawReadBuffer.length) throw new ArrayIndexOutOfBoundsException (Integer.toString (count)); */ while (i < count) { b1 = rawReadBuffer [i++]; // Determine whether we are dealing // with a one-, two-, three-, or four- // byte sequence. if (b1 < 0) { if ((b1 & 0xe0) == 0xc0) { // 2-byte sequence: 00000yyyyyxxxxxx = 110yyyyy 10xxxxxx c = (char) (((b1 & 0x1f) << 6) | getNextUtf8Byte (i++, count)); if (c < 0x0080) encodingError ("Illegal two byte UTF-8 sequence", c, 0); //Sec 2.11 // [1] the two-character sequence #xD #xA // [2] the two-character sequence #xD #x85 if ((c == 0x0085 || c == 0x000a) && sawCR) continue; // Sec 2.11 // [3] the single character #x85 if(c == 0x0085 && xmlVersion == XML_11) readBuffer[j++] = '\r'; } else if ((b1 & 0xf0) == 0xe0) { // 3-byte sequence: // zzzzyyyyyyxxxxxx = 1110zzzz 10yyyyyy 10xxxxxx // most CJKV characters c = (char) (((b1 & 0x0f) << 12) | (getNextUtf8Byte (i++, count) << 6) | getNextUtf8Byte (i++, count)); //sec 2.11 //[4] the single character #x2028 if(c == 0x2028 && xmlVersion == XML_11){ readBuffer[j++] = '\r'; sawCR = true; continue; } if (c < 0x0800 || (c >= 0xd800 && c <= 0xdfff)) encodingError ("Illegal three byte UTF-8 sequence", c, 0); } else if ((b1 & 0xf8) == 0xf0) { // 4-byte sequence: 11101110wwwwzzzzyy + 110111yyyyxxxxxx // = 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx // (uuuuu = wwww + 1) // "Surrogate Pairs" ... from the "Astral Planes" // Unicode 3.1 assigned the first characters there int iso646 = b1 & 07; iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); if (iso646 <= 0xffff) { encodingError ("Illegal four byte UTF-8 sequence", iso646, 0); } else { if (iso646 > 0x0010ffff) encodingError ( "UTF-8 value out of range for Unicode", iso646, 0); iso646 -= 0x010000; readBuffer [j++] = (char) (0xd800 | (iso646 >> 10)); readBuffer [j++] = (char) (0xdc00 | (iso646 & 0x03ff)); continue; } } else { // The five and six byte encodings aren't supported; // they exceed the Unicode (and XML) range. encodingError ( "unsupported five or six byte UTF-8 sequence", 0xff & b1, i); // NOTREACHED c = 0; } } else { // 1-byte sequence: 000000000xxxxxxx = 0xxxxxxx // (US-ASCII character, "common" case, one branch to here) c = (char) b1; } readBuffer [j++] = c; if (c == '\r') sawCR = true; } // How many characters have we read? readBufferLength = j; }
private void copyUtf8ReadBuffer (int count) throws SAXException, IOException { int i = 0; int j = readBufferPos; int b1; char c = 0; /* // check once, so the runtime won't (if it's smart enough) if (count < 0 || count > rawReadBuffer.length) throw new ArrayIndexOutOfBoundsException (Integer.toString (count)); */ while (i < count) { b1 = rawReadBuffer [i++]; // Determine whether we are dealing // with a one-, two-, three-, or four- // byte sequence. if (b1 < 0) { if ((b1 & 0xe0) == 0xc0) { // 2-byte sequence: 00000yyyyyxxxxxx = 110yyyyy 10xxxxxx c = (char) (((b1 & 0x1f) << 6) | getNextUtf8Byte (i++, count)); if (c < 0x0080) encodingError ("Illegal two byte UTF-8 sequence", c, 0); //Sec 2.11 // [1] the two-character sequence #xD #xA // [2] the two-character sequence #xD #x85 if ((c == 0x0085 || c == 0x000a) && sawCR) continue; // Sec 2.11 // [3] the single character #x85 if(c == 0x0085 && xmlVersion == XML_11) readBuffer[j++] = '\r'; } else if ((b1 & 0xf0) == 0xe0) { // 3-byte sequence: // zzzzyyyyyyxxxxxx = 1110zzzz 10yyyyyy 10xxxxxx // most CJKV characters c = (char) (((b1 & 0x0f) << 12) | (getNextUtf8Byte (i++, count) << 6) | getNextUtf8Byte (i++, count)); //sec 2.11 //[4] the single character #x2028 if(c == 0x2028 && xmlVersion == XML_11){ readBuffer[j++] = '\r'; sawCR = true; continue; } if (c < 0x0800 || (c >= 0xd800 && c <= 0xdfff)) { encodingError("Illegal three byte UTF-8 sequence", c, 0); } else if ((b1 & 0xf8) == 0xf0) { // 4-byte sequence: 11101110wwwwzzzzyy + 110111yyyyxxxxxx // = 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx // (uuuuu = wwww + 1) // "Surrogate Pairs" ... from the "Astral Planes" // Unicode 3.1 assigned the first characters there int iso646 = b1 & 07; iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); if (iso646 <= 0xffff) { encodingError ("Illegal four byte UTF-8 sequence", iso646, 0); } else { if (iso646 > 0x0010ffff) encodingError ( "UTF-8 value out of range for Unicode", iso646, 0); iso646 -= 0x010000; readBuffer [j++] = (char) (0xd800 | (iso646 >> 10)); readBuffer [j++] = (char) (0xdc00 | (iso646 & 0x03ff)); continue; } } else { // The five and six byte encodings aren't supported; // they exceed the Unicode (and XML) range. encodingError ( "unsupported five or six byte UTF-8 sequence", 0xff & b1, i); // NOTREACHED c = 0; } } else { // 1-byte sequence: 000000000xxxxxxx = 0xxxxxxx // (US-ASCII character, "common" case, one branch to here) c = (char) b1; } readBuffer [j++] = c; if (c == '\r') sawCR = true; } // How many characters have we read? readBufferLength = j; }
12,658
private void copyUtf8ReadBuffer (int count) throws SAXException, IOException { int i = 0; int j = readBufferPos; int b1; char c = 0; /* // check once, so the runtime won't (if it's smart enough) if (count < 0 || count > rawReadBuffer.length) throw new ArrayIndexOutOfBoundsException (Integer.toString (count)); */ while (i < count) { b1 = rawReadBuffer [i++]; // Determine whether we are dealing // with a one-, two-, three-, or four- // byte sequence. if (b1 < 0) { if ((b1 & 0xe0) == 0xc0) { // 2-byte sequence: 00000yyyyyxxxxxx = 110yyyyy 10xxxxxx c = (char) (((b1 & 0x1f) << 6) | getNextUtf8Byte (i++, count)); if (c < 0x0080) encodingError ("Illegal two byte UTF-8 sequence", c, 0); //Sec 2.11 // [1] the two-character sequence #xD #xA // [2] the two-character sequence #xD #x85 if ((c == 0x0085 || c == 0x000a) && sawCR) continue; // Sec 2.11 // [3] the single character #x85 if(c == 0x0085 && xmlVersion == XML_11) readBuffer[j++] = '\r'; } else if ((b1 & 0xf0) == 0xe0) { // 3-byte sequence: // zzzzyyyyyyxxxxxx = 1110zzzz 10yyyyyy 10xxxxxx // most CJKV characters c = (char) (((b1 & 0x0f) << 12) | (getNextUtf8Byte (i++, count) << 6) | getNextUtf8Byte (i++, count)); //sec 2.11 //[4] the single character #x2028 if(c == 0x2028 && xmlVersion == XML_11){ readBuffer[j++] = '\r'; sawCR = true; continue; } if (c < 0x0800 || (c >= 0xd800 && c <= 0xdfff)) encodingError ("Illegal three byte UTF-8 sequence", c, 0); } else if ((b1 & 0xf8) == 0xf0) { // 4-byte sequence: 11101110wwwwzzzzyy + 110111yyyyxxxxxx // = 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx // (uuuuu = wwww + 1) // "Surrogate Pairs" ... from the "Astral Planes" // Unicode 3.1 assigned the first characters there int iso646 = b1 & 07; iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); if (iso646 <= 0xffff) { encodingError ("Illegal four byte UTF-8 sequence", iso646, 0); } else { if (iso646 > 0x0010ffff) encodingError ( "UTF-8 value out of range for Unicode", iso646, 0); iso646 -= 0x010000; readBuffer [j++] = (char) (0xd800 | (iso646 >> 10)); readBuffer [j++] = (char) (0xdc00 | (iso646 & 0x03ff)); continue; } } else { // The five and six byte encodings aren't supported; // they exceed the Unicode (and XML) range. encodingError ( "unsupported five or six byte UTF-8 sequence", 0xff & b1, i); // NOTREACHED c = 0; } } else { // 1-byte sequence: 000000000xxxxxxx = 0xxxxxxx // (US-ASCII character, "common" case, one branch to here) c = (char) b1; } readBuffer [j++] = c; if (c == '\r') sawCR = true; } // How many characters have we read? readBufferLength = j; }
private void copyUtf8ReadBuffer (int count) throws SAXException, IOException { int i = 0; int j = readBufferPos; int b1; char c = 0; /* // check once, so the runtime won't (if it's smart enough) if (count < 0 || count > rawReadBuffer.length) throw new ArrayIndexOutOfBoundsException (Integer.toString (count)); */ while (i < count) { b1 = rawReadBuffer [i++]; // Determine whether we are dealing // with a one-, two-, three-, or four- // byte sequence. if (b1 < 0) { if ((b1 & 0xe0) == 0xc0) { // 2-byte sequence: 00000yyyyyxxxxxx = 110yyyyy 10xxxxxx c = (char) (((b1 & 0x1f) << 6) | getNextUtf8Byte (i++, count)); if (c < 0x0080) encodingError ("Illegal two byte UTF-8 sequence", c, 0); //Sec 2.11 // [1] the two-character sequence #xD #xA // [2] the two-character sequence #xD #x85 if ((c == 0x0085 || c == 0x000a) && sawCR) continue; // Sec 2.11 // [3] the single character #x85 if(c == 0x0085 && xmlVersion == XML_11) readBuffer[j++] = '\r'; } else if ((b1 & 0xf0) == 0xe0) { // 3-byte sequence: // zzzzyyyyyyxxxxxx = 1110zzzz 10yyyyyy 10xxxxxx // most CJKV characters c = (char) (((b1 & 0x0f) << 12) | (getNextUtf8Byte (i++, count) << 6) | getNextUtf8Byte (i++, count)); //sec 2.11 //[4] the single character #x2028 if(c == 0x2028 && xmlVersion == XML_11){ readBuffer[j++] = '\r'; sawCR = true; continue; } if (c < 0x0800 || (c >= 0xd800 && c <= 0xdfff)) encodingError ("Illegal three byte UTF-8 sequence", c, 0); } } else if ((b1 & 0xf8) == 0xf0) { // 4-byte sequence: 11101110wwwwzzzzyy + 110111yyyyxxxxxx // = 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx // (uuuuu = wwww + 1) // "Surrogate Pairs" ... from the "Astral Planes" // Unicode 3.1 assigned the first characters there int iso646 = b1 & 07; iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); if (iso646 <= 0xffff) { encodingError ("Illegal four byte UTF-8 sequence", iso646, 0); } else { if (iso646 > 0x0010ffff) encodingError ( "UTF-8 value out of range for Unicode", iso646, 0); iso646 -= 0x010000; readBuffer [j++] = (char) (0xd800 | (iso646 >> 10)); readBuffer [j++] = (char) (0xdc00 | (iso646 & 0x03ff)); continue; } } else { // The five and six byte encodings aren't supported; // they exceed the Unicode (and XML) range. encodingError ( "unsupported five or six byte UTF-8 sequence", 0xff & b1, i); // NOTREACHED c = 0; } } else { // 1-byte sequence: 000000000xxxxxxx = 0xxxxxxx // (US-ASCII character, "common" case, one branch to here) c = (char) b1; } readBuffer [j++] = c; if (c == '\r') sawCR = true; } // How many characters have we read? readBufferLength = j; }
12,659
private void copyUtf8ReadBuffer (int count) throws SAXException, IOException { int i = 0; int j = readBufferPos; int b1; char c = 0; /* // check once, so the runtime won't (if it's smart enough) if (count < 0 || count > rawReadBuffer.length) throw new ArrayIndexOutOfBoundsException (Integer.toString (count)); */ while (i < count) { b1 = rawReadBuffer [i++]; // Determine whether we are dealing // with a one-, two-, three-, or four- // byte sequence. if (b1 < 0) { if ((b1 & 0xe0) == 0xc0) { // 2-byte sequence: 00000yyyyyxxxxxx = 110yyyyy 10xxxxxx c = (char) (((b1 & 0x1f) << 6) | getNextUtf8Byte (i++, count)); if (c < 0x0080) encodingError ("Illegal two byte UTF-8 sequence", c, 0); //Sec 2.11 // [1] the two-character sequence #xD #xA // [2] the two-character sequence #xD #x85 if ((c == 0x0085 || c == 0x000a) && sawCR) continue; // Sec 2.11 // [3] the single character #x85 if(c == 0x0085 && xmlVersion == XML_11) readBuffer[j++] = '\r'; } else if ((b1 & 0xf0) == 0xe0) { // 3-byte sequence: // zzzzyyyyyyxxxxxx = 1110zzzz 10yyyyyy 10xxxxxx // most CJKV characters c = (char) (((b1 & 0x0f) << 12) | (getNextUtf8Byte (i++, count) << 6) | getNextUtf8Byte (i++, count)); //sec 2.11 //[4] the single character #x2028 if(c == 0x2028 && xmlVersion == XML_11){ readBuffer[j++] = '\r'; sawCR = true; continue; } if (c < 0x0800 || (c >= 0xd800 && c <= 0xdfff)) encodingError ("Illegal three byte UTF-8 sequence", c, 0); } else if ((b1 & 0xf8) == 0xf0) { // 4-byte sequence: 11101110wwwwzzzzyy + 110111yyyyxxxxxx // = 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx // (uuuuu = wwww + 1) // "Surrogate Pairs" ... from the "Astral Planes" // Unicode 3.1 assigned the first characters there int iso646 = b1 & 07; iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); if (iso646 <= 0xffff) { encodingError ("Illegal four byte UTF-8 sequence", iso646, 0); } else { if (iso646 > 0x0010ffff) encodingError ( "UTF-8 value out of range for Unicode", iso646, 0); iso646 -= 0x010000; readBuffer [j++] = (char) (0xd800 | (iso646 >> 10)); readBuffer [j++] = (char) (0xdc00 | (iso646 & 0x03ff)); continue; } } else { // The five and six byte encodings aren't supported; // they exceed the Unicode (and XML) range. encodingError ( "unsupported five or six byte UTF-8 sequence", 0xff & b1, i); // NOTREACHED c = 0; } } else { // 1-byte sequence: 000000000xxxxxxx = 0xxxxxxx // (US-ASCII character, "common" case, one branch to here) c = (char) b1; } readBuffer [j++] = c; if (c == '\r') sawCR = true; } // How many characters have we read? readBufferLength = j; }
private void copyUtf8ReadBuffer (int count) throws SAXException, IOException { int i = 0; int j = readBufferPos; int b1; char c = 0; /* // check once, so the runtime won't (if it's smart enough) if (count < 0 || count > rawReadBuffer.length) throw new ArrayIndexOutOfBoundsException (Integer.toString (count)); */ while (i < count) { b1 = rawReadBuffer [i++]; // Determine whether we are dealing // with a one-, two-, three-, or four- // byte sequence. if (b1 < 0) { if ((b1 & 0xe0) == 0xc0) { // 2-byte sequence: 00000yyyyyxxxxxx = 110yyyyy 10xxxxxx c = (char) (((b1 & 0x1f) << 6) | getNextUtf8Byte (i++, count)); if (c < 0x0080) encodingError ("Illegal two byte UTF-8 sequence", c, 0); //Sec 2.11 // [1] the two-character sequence #xD #xA // [2] the two-character sequence #xD #x85 if ((c == 0x0085 || c == 0x000a) && sawCR) continue; // Sec 2.11 // [3] the single character #x85 if(c == 0x0085 && xmlVersion == XML_11) readBuffer[j++] = '\r'; } else if ((b1 & 0xf0) == 0xe0) { // 3-byte sequence: // zzzzyyyyyyxxxxxx = 1110zzzz 10yyyyyy 10xxxxxx // most CJKV characters c = (char) (((b1 & 0x0f) << 12) | (getNextUtf8Byte (i++, count) << 6) | getNextUtf8Byte (i++, count)); //sec 2.11 //[4] the single character #x2028 if(c == 0x2028 && xmlVersion == XML_11){ readBuffer[j++] = '\r'; sawCR = true; continue; } if (c < 0x0800 || (c >= 0xd800 && c <= 0xdfff)) encodingError ("Illegal three byte UTF-8 sequence", c, 0); } else if ((b1 & 0xf8) == 0xf0) { // 4-byte sequence: 11101110wwwwzzzzyy + 110111yyyyxxxxxx // = 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx // (uuuuu = wwww + 1) // "Surrogate Pairs" ... from the "Astral Planes" // Unicode 3.1 assigned the first characters there int iso646 = b1 & 07; iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count); if (iso646 <= 0xffff) { encodingError ("Illegal four byte UTF-8 sequence", iso646, 0); } else { if (iso646 > 0x0010ffff) encodingError ( "UTF-8 value out of range for Unicode", iso646, 0); iso646 -= 0x010000; readBuffer [j++] = (char) (0xd800 | (iso646 >> 10)); readBuffer [j++] = (char) (0xdc00 | (iso646 & 0x03ff)); continue; } } else { // The five and six byte encodings aren't supported; // they exceed the Unicode (and XML) range. encodingError ( "unsupported five or six byte UTF-8 sequence", 0xff & b1, i); // NOTREACHED c = 0; } } else { // 1-byte sequence: 000000000xxxxxxx = 0xxxxxxx // (US-ASCII character, "common" case, one branch to here) c = (char) b1; } readBuffer [j++] = c; if (c == '\r') sawCR = true; } // How many characters have we read? readBufferLength = j; }
12,660
private void dataBufferAppend (char c) { // Expand buffer if necessary. if (dataBufferPos >= dataBuffer.length) dataBuffer = (char[]) extendArray (dataBuffer, dataBuffer.length, dataBufferPos); dataBuffer [dataBufferPos++] = c; }
private void dataBufferAppend (char c) { // Expand buffer if necessary. if (dataBufferPos >= dataBuffer.length) dataBuffer = (char[]) extendArray (dataBuffer, dataBuffer.length, dataBufferPos); dataBuffer [dataBufferPos++] = c; }
12,662
private void dataBufferAppend (char c) { // Expand buffer if necessary. if (dataBufferPos >= dataBuffer.length) dataBuffer = (char[]) extendArray (dataBuffer, dataBuffer.length, dataBufferPos); dataBuffer [dataBufferPos++] = c; }
private void dataBufferAppend (char c) { // Expand buffer if necessary. if (dataBufferPos >= dataBuffer.length) dataBuffer = (char[]) extendArray (dataBuffer, dataBuffer.length, dataBufferPos); }
12,663
private void dataBufferNormalize () { int i = 0; int j = 0; int end = dataBufferPos; // Skip spaces at the start. while (j < end && dataBuffer [j] == ' ') { j++; } // Skip whitespace at the end. while (end > j && dataBuffer [end - 1] == ' ') { end --; } // Start copying to the left. while (j < end) { char c = dataBuffer [j++]; // Normalise all other spaces to // a single space. if (c == ' ') { while (j < end && dataBuffer [j++] == ' ') continue; dataBuffer [i++] = ' '; dataBuffer [i++] = dataBuffer [j - 1]; } else { dataBuffer [i++] = c; } } // The new length is <= the old one. dataBufferPos = i; }
private void dataBufferNormalize () { int i = 0; int j = 0; int end = dataBufferPos; // Skip spaces at the start. while (j < end && dataBuffer [j] == ' ') { j++; } // Skip whitespace at the end. while (end > j && dataBuffer [end - 1] == ' ') { end --; } // Start copying to the left. while (j < end) { char c = dataBuffer [j++]; // Normalise all other spaces to // a single space. if (c == ' ') { while (j < end && dataBuffer [j++] == ' ') continue; dataBuffer [i++] = ' '; dataBuffer [i++] = dataBuffer [j - 1]; } else { dataBuffer [i++] = c; } } // The new length is <= the old one. dataBufferPos = i; }
12,665
private void dataBufferNormalize () { int i = 0; int j = 0; int end = dataBufferPos; // Skip spaces at the start. while (j < end && dataBuffer [j] == ' ') { j++; } // Skip whitespace at the end. while (end > j && dataBuffer [end - 1] == ' ') { end --; } // Start copying to the left. while (j < end) { char c = dataBuffer [j++]; // Normalise all other spaces to // a single space. if (c == ' ') { while (j < end && dataBuffer [j++] == ' ') continue; dataBuffer [i++] = ' '; dataBuffer [i++] = dataBuffer [j - 1]; } else { dataBuffer [i++] = c; } } // The new length is <= the old one. dataBufferPos = i; }
private void dataBufferNormalize () { int i = 0; int j = 0; int end = dataBufferPos; // Skip spaces at the start. while (j < end && dataBuffer [j] == ' ') { j++; } // Skip whitespace at the end. while (end > j && dataBuffer [end - 1] == ' ') { end --; } // Start copying to the left. while (j < end) { char c = dataBuffer [j++]; // Normalise all other spaces to // a single space. if (c == ' ') { while (j < end && dataBuffer [j++] == ' ') continue; dataBuffer [i++] = ' '; dataBuffer [i++] = dataBuffer [j - 1]; } else { dataBuffer [i++] = c; } } // The new length is <= the old one. dataBufferPos = i; }
12,666
private Enumeration declaredAttributes (Object element []) { Hashtable attlist; if (element == null) return null; if ((attlist = (Hashtable) element [2]) == null) return null; return attlist.keys (); }
private Iterator declaredAttributes(ElementDecl element) { Hashtable attlist; if (element == null) return null; if ((attlist = (Hashtable) element [2]) == null) return null; return attlist.keys (); }
12,667
private Enumeration declaredAttributes (Object element []) { Hashtable attlist; if (element == null) return null; if ((attlist = (Hashtable) element [2]) == null) return null; return attlist.keys (); }
private Enumeration declaredAttributes (Object element []) { HashMap attlist; if (element == null) return null; if ((attlist = (Hashtable) element [2]) == null) return null; return attlist.keys (); }
12,668
private Enumeration declaredAttributes (Object element []) { Hashtable attlist; if (element == null) return null; if ((attlist = (Hashtable) element [2]) == null) return null; return attlist.keys (); }
private Enumeration declaredAttributes (Object element []) { Hashtable attlist; if (element == null) return null; } if ((attlist = element.attributes) == null) { return null; return attlist.keys (); }
12,669
private Enumeration declaredAttributes (Object element []) { Hashtable attlist; if (element == null) return null; if ((attlist = (Hashtable) element [2]) == null) return null; return attlist.keys (); }
private Enumeration declaredAttributes (Object element []) { Hashtable attlist; if (element == null) return null; if ((attlist = (Hashtable) element [2]) == null) return null; } return attlist.keySet().iterator(); }
12,670
private void detectEncoding () throws SAXException, IOException { byte signature[] = new byte [4]; // Read the first four bytes for // autodetection. is.mark (4); is.read (signature); is.reset (); // // FIRST: four byte encodings (who uses these?) // if (tryEncoding (signature, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x3c)) { // UCS-4 must begin with "<?xml" // 0x00 0x00 0x00 0x3c: UCS-4, big-endian (1234) // "UTF-32BE" encoding = ENCODING_UCS_4_1234; } else if (tryEncoding (signature, (byte) 0x3c, (byte) 0x00, (byte) 0x00, (byte) 0x00)) { // 0x3c 0x00 0x00 0x00: UCS-4, little-endian (4321) // "UTF-32LE" encoding = ENCODING_UCS_4_4321; } else if (tryEncoding (signature, (byte) 0x00, (byte) 0x00, (byte) 0x3c, (byte) 0x00)) { // 0x00 0x00 0x3c 0x00: UCS-4, unusual (2143) encoding = ENCODING_UCS_4_2143; } else if (tryEncoding (signature, (byte) 0x00, (byte) 0x3c, (byte) 0x00, (byte) 0x00)) { // 0x00 0x3c 0x00 0x00: UCS-4, unusual (3421) encoding = ENCODING_UCS_4_3412; // 00 00 fe ff UCS_4_1234 (with BOM) // ff fe 00 00 UCS_4_4321 (with BOM) } // // SECOND: two byte encodings // note ... with 1/14/2000 errata the XML spec identifies some // more "broken UTF-16" autodetection cases, with no XML decl, // which we don't handle here (that's legal too). // else if (tryEncoding (signature, (byte) 0xfe, (byte) 0xff)) { // UCS-2 with a byte-order marker. (UTF-16) // 0xfe 0xff: UCS-2, big-endian (12) encoding = ENCODING_UCS_2_12; is.read (); is.read (); } else if (tryEncoding (signature, (byte) 0xff, (byte) 0xfe)) { // UCS-2 with a byte-order marker. (UTF-16) // 0xff 0xfe: UCS-2, little-endian (21) encoding = ENCODING_UCS_2_21; is.read (); is.read (); } else if (tryEncoding (signature, (byte) 0x00, (byte) 0x3c, (byte) 0x00, (byte) 0x3f)) { // UTF-16BE (otherwise, malformed UTF-16) // 0x00 0x3c 0x00 0x3f: UCS-2, big-endian, no byte-order mark encoding = ENCODING_UCS_2_12; error ("no byte-order mark for UCS-2 entity"); } else if (tryEncoding (signature, (byte) 0x3c, (byte) 0x00, (byte) 0x3f, (byte) 0x00)) { // UTF-16LE (otherwise, malformed UTF-16) // 0x3c 0x00 0x3f 0x00: UCS-2, little-endian, no byte-order mark encoding = ENCODING_UCS_2_21; error ("no byte-order mark for UCS-2 entity"); } // // THIRD: ASCII-derived encodings, fixed and variable lengths // else if (tryEncoding (signature, (byte) 0x3c, (byte) 0x3f, (byte) 0x78, (byte) 0x6d)) { // ASCII derived // 0x3c 0x3f 0x78 0x6d: UTF-8 or other 8-bit markup (read ENCODING) encoding = ENCODING_UTF_8; prefetchASCIIEncodingDecl (); } else if (signature [0] == (byte) 0xef && signature [1] == (byte) 0xbb && signature [2] == (byte) 0xbf) { // 0xef 0xbb 0xbf: UTF-8 BOM (not part of document text) // this un-needed notion slipped into XML 2nd ed through a // "non-normative" erratum; now required by MSFT and UDDI, // and E22 made it normative. encoding = ENCODING_UTF_8; is.read (); is.read (); is.read (); } else { // 4c 6f a7 94 ... we don't understand EBCDIC flavors // ... but we COULD at least kick in some fixed code page // (default) UTF-8 without encoding/XML declaration encoding = ENCODING_UTF_8; } }
private void detectEncoding () throws SAXException, IOException { byte[] signature = new byte[4]; // Read the first four bytes for // autodetection. is.mark (4); is.read (signature); is.reset (); // // FIRST: four byte encodings (who uses these?) // if (tryEncoding (signature, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x3c)) { // UCS-4 must begin with "<?xml" // 0x00 0x00 0x00 0x3c: UCS-4, big-endian (1234) // "UTF-32BE" encoding = ENCODING_UCS_4_1234; } else if (tryEncoding (signature, (byte) 0x3c, (byte) 0x00, (byte) 0x00, (byte) 0x00)) { // 0x3c 0x00 0x00 0x00: UCS-4, little-endian (4321) // "UTF-32LE" encoding = ENCODING_UCS_4_4321; } else if (tryEncoding (signature, (byte) 0x00, (byte) 0x00, (byte) 0x3c, (byte) 0x00)) { // 0x00 0x00 0x3c 0x00: UCS-4, unusual (2143) encoding = ENCODING_UCS_4_2143; } else if (tryEncoding (signature, (byte) 0x00, (byte) 0x3c, (byte) 0x00, (byte) 0x00)) { // 0x00 0x3c 0x00 0x00: UCS-4, unusual (3421) encoding = ENCODING_UCS_4_3412; // 00 00 fe ff UCS_4_1234 (with BOM) // ff fe 00 00 UCS_4_4321 (with BOM) } // // SECOND: two byte encodings // note ... with 1/14/2000 errata the XML spec identifies some // more "broken UTF-16" autodetection cases, with no XML decl, // which we don't handle here (that's legal too). // else if (tryEncoding (signature, (byte) 0xfe, (byte) 0xff)) { // UCS-2 with a byte-order marker. (UTF-16) // 0xfe 0xff: UCS-2, big-endian (12) encoding = ENCODING_UCS_2_12; is.read (); is.read (); } else if (tryEncoding (signature, (byte) 0xff, (byte) 0xfe)) { // UCS-2 with a byte-order marker. (UTF-16) // 0xff 0xfe: UCS-2, little-endian (21) encoding = ENCODING_UCS_2_21; is.read (); is.read (); } else if (tryEncoding (signature, (byte) 0x00, (byte) 0x3c, (byte) 0x00, (byte) 0x3f)) { // UTF-16BE (otherwise, malformed UTF-16) // 0x00 0x3c 0x00 0x3f: UCS-2, big-endian, no byte-order mark encoding = ENCODING_UCS_2_12; error ("no byte-order mark for UCS-2 entity"); } else if (tryEncoding (signature, (byte) 0x3c, (byte) 0x00, (byte) 0x3f, (byte) 0x00)) { // UTF-16LE (otherwise, malformed UTF-16) // 0x3c 0x00 0x3f 0x00: UCS-2, little-endian, no byte-order mark encoding = ENCODING_UCS_2_21; error ("no byte-order mark for UCS-2 entity"); } // // THIRD: ASCII-derived encodings, fixed and variable lengths // else if (tryEncoding (signature, (byte) 0x3c, (byte) 0x3f, (byte) 0x78, (byte) 0x6d)) { // ASCII derived // 0x3c 0x3f 0x78 0x6d: UTF-8 or other 8-bit markup (read ENCODING) encoding = ENCODING_UTF_8; prefetchASCIIEncodingDecl (); } else if (signature [0] == (byte) 0xef && signature [1] == (byte) 0xbb && signature [2] == (byte) 0xbf) { // 0xef 0xbb 0xbf: UTF-8 BOM (not part of document text) // this un-needed notion slipped into XML 2nd ed through a // "non-normative" erratum; now required by MSFT and UDDI, // and E22 made it normative. encoding = ENCODING_UTF_8; is.read (); is.read (); is.read (); } else { // 4c 6f a7 94 ... we don't understand EBCDIC flavors // ... but we COULD at least kick in some fixed code page // (default) UTF-8 without encoding/XML declaration encoding = ENCODING_UTF_8; } }
12,671
private void encodingError (String message, int value, int offset) throws SAXException { if (value != -1) message = message + " (character code: 0x" + Integer.toHexString (value) + ')'; error (message); }
private void encodingError (String message, int value, int offset) throws SAXException { if (value != -1) message = message + " (character code: 0x" + Integer.toHexString (value) + ')'; error (message); }
12,672
private Object extendArray (Object array, int currentSize, int requiredSize) { if (requiredSize < currentSize) { return array; } else { Object newArray = null; int newSize = currentSize * 2; if (newSize <= requiredSize) newSize = requiredSize + 1; if (array instanceof char[]) newArray = new char [newSize]; else if (array instanceof Object[]) newArray = new Object [newSize]; else throw new RuntimeException (); System.arraycopy (array, 0, newArray, 0, currentSize); return newArray; } }
private Object extendArray(Object array, int currentSize, int requiredSize) { if (requiredSize < currentSize) { if (requiredSize < currentSize) { return array; } else { Object newArray = null; int newSize = currentSize * 2; if (newSize <= requiredSize) newSize = requiredSize + 1; if (array instanceof char[]) newArray = new char [newSize]; else if (array instanceof Object[]) newArray = new Object [newSize]; else throw new RuntimeException (); System.arraycopy (array, 0, newArray, 0, currentSize); return newArray; } }
12,673
private Object extendArray (Object array, int currentSize, int requiredSize) { if (requiredSize < currentSize) { return array; } else { Object newArray = null; int newSize = currentSize * 2; if (newSize <= requiredSize) newSize = requiredSize + 1; if (array instanceof char[]) newArray = new char [newSize]; else if (array instanceof Object[]) newArray = new Object [newSize]; else throw new RuntimeException (); System.arraycopy (array, 0, newArray, 0, currentSize); return newArray; } }
private Object extendArray (Object array, int currentSize, int requiredSize) { return array; } else { Object newArray = null; int newSize = currentSize * 2; if (newSize <= requiredSize) newSize = requiredSize + 1; if (array instanceof char[]) newArray = new char [newSize]; else if (array instanceof Object[]) newArray = new Object [newSize]; else throw new RuntimeException (); System.arraycopy (array, 0, newArray, 0, currentSize); return newArray; } }
12,674
private Object extendArray (Object array, int currentSize, int requiredSize) { if (requiredSize < currentSize) { return array; } else { Object newArray = null; int newSize = currentSize * 2; if (newSize <= requiredSize) newSize = requiredSize + 1; if (array instanceof char[]) newArray = new char [newSize]; else if (array instanceof Object[]) newArray = new Object [newSize]; else throw new RuntimeException (); System.arraycopy (array, 0, newArray, 0, currentSize); return newArray; } }
private Object extendArray (Object array, int currentSize, int requiredSize) { if (requiredSize < currentSize) { return array; } else { Object newArray = null; int newSize = currentSize * 2; if (newSize <= requiredSize) newSize = requiredSize + 1; if (array instanceof char[]) { newArray = new char[newSize]; } else if (array instanceof Object[]) newArray = new Object [newSize]; else throw new RuntimeException (); System.arraycopy (array, 0, newArray, 0, currentSize); return newArray; } }
12,675
private Object extendArray (Object array, int currentSize, int requiredSize) { if (requiredSize < currentSize) { return array; } else { Object newArray = null; int newSize = currentSize * 2; if (newSize <= requiredSize) newSize = requiredSize + 1; if (array instanceof char[]) newArray = new char [newSize]; else if (array instanceof Object[]) newArray = new Object [newSize]; else throw new RuntimeException (); System.arraycopy (array, 0, newArray, 0, currentSize); return newArray; } }
private Object extendArray (Object array, int currentSize, int requiredSize) { if (requiredSize < currentSize) { return array; } else { Object newArray = null; int newSize = currentSize * 2; if (newSize <= requiredSize) newSize = requiredSize + 1; if (array instanceof char[]) newArray = new char [newSize]; else if (array instanceof Object[]) { newArray = new Object[newSize]; } else throw new RuntimeException (); System.arraycopy (array, 0, newArray, 0, currentSize); return newArray; } }
12,676
private Object extendArray (Object array, int currentSize, int requiredSize) { if (requiredSize < currentSize) { return array; } else { Object newArray = null; int newSize = currentSize * 2; if (newSize <= requiredSize) newSize = requiredSize + 1; if (array instanceof char[]) newArray = new char [newSize]; else if (array instanceof Object[]) newArray = new Object [newSize]; else throw new RuntimeException (); System.arraycopy (array, 0, newArray, 0, currentSize); return newArray; } }
private Object extendArray (Object array, int currentSize, int requiredSize) { if (requiredSize < currentSize) { return array; } else { Object newArray = null; int newSize = currentSize * 2; if (newSize <= requiredSize) newSize = requiredSize + 1; if (array instanceof char[]) newArray = new char [newSize]; else if (array instanceof Object[]) newArray = new Object [newSize]; else { throw new RuntimeException(); } System.arraycopy (array, 0, newArray, 0, currentSize); return newArray; } }
12,677
private void filterCR (boolean moreData) { int i, j; readBufferOverflow = -1;loop: for (i = j = readBufferPos; j < readBufferLength; i++, j++) { switch (readBuffer [j]) { case '\r': if (j == readBufferLength - 1) { if (moreData) { readBufferOverflow = '\r'; readBufferLength--; } else // CR at end of buffer readBuffer [i++] = '\n'; break loop; } else if (readBuffer [j + 1] == '\n') { j++; } readBuffer [i] = '\n'; break; case '\n': default: readBuffer [i] = readBuffer [j]; break; } } readBufferLength = i; }
private void filterCR (boolean moreData) { int i, j; readBufferOverflow = -1;loop: for (i = j = readBufferPos; j < readBufferLength; i++, j++) { switch (readBuffer [j]) { case '\r': if (j == readBufferLength - 1) { if (moreData) { readBufferOverflow = '\r'; readBufferLength--; } else // CR at end of buffer readBuffer [i++] = '\n'; break loop; } else if (readBuffer [j + 1] == '\n') { j++; } readBuffer [i] = '\n'; break; case '\n': default: readBuffer [i] = readBuffer [j]; break; } } readBufferLength = i; }
12,678
private Object[] getAttribute (String elName, String name) { Hashtable attlist; attlist = getElementAttributes (elName); if (attlist == null) return null; return (Object[]) attlist.get (name); }
private AttributeDecl getAttribute(String elName, String name) { Hashtable attlist; attlist = getElementAttributes (elName); if (attlist == null) return null; return (Object[]) attlist.get (name); }
12,679
private Object[] getAttribute (String elName, String name) { Hashtable attlist; attlist = getElementAttributes (elName); if (attlist == null) return null; return (Object[]) attlist.get (name); }
private Object[] getAttribute (String elName, String name) { Hashtable attlist; attlist = getElementAttributes (elName); if (attlist == null) return null; return (Object[]) attlist.get (name); }
12,680
public String getAttributeDefaultValue (String name, String aname) { Object attribute[] = getAttribute (name, aname); if (attribute == null) { return null; } else { return (String) attribute [1]; } }
public String getAttributeDefaultValue (String name, String aname) { Object attribute[] = getAttribute (name, aname); if (attribute == null) { return null; } else { return (String) attribute [1]; } }
12,681
public int getAttributeDefaultValueType (String name, String aname) { Object attribute[] = getAttribute (name, aname); if (attribute == null) { return ATTRIBUTE_DEFAULT_UNDECLARED; } else { return ((Integer) attribute [2]).intValue (); } }
public int getAttributeDefaultValueType (String name, String aname) { Object attribute[] = getAttribute (name, aname); if (attribute == null) { return ATTRIBUTE_DEFAULT_UNDECLARED; } else { return ((Integer) attribute [2]).intValue (); } }
12,682
public String getAttributeEnumeration (String name, String aname) { Object attribute[] = getAttribute (name, aname); if (attribute == null) { return null; } else { // assert: attribute [0] is "ENUMERATION" or "NOTATION" return (String) attribute [3]; } }
public String getAttributeEnumeration (String name, String aname) { Object attribute[] = getAttribute (name, aname); if (attribute == null) { return null; } else { // assert: attribute [0] is "ENUMERATION" or "NOTATION" return (String) attribute [3]; } }
12,683
private int getContentType (Object element [], int defaultType) { int retval; if (element == null) return defaultType; retval = ((Integer) element [0]).intValue (); if (retval == CONTENT_UNDECLARED) retval = defaultType; return retval; }
private int getContentType(ElementDecl element, int defaultType) { int retval; if (element == null) return defaultType; retval = ((Integer) element [0]).intValue (); if (retval == CONTENT_UNDECLARED) retval = defaultType; return retval; }
12,684
private int getContentType (Object element [], int defaultType) { int retval; if (element == null) return defaultType; retval = ((Integer) element [0]).intValue (); if (retval == CONTENT_UNDECLARED) retval = defaultType; return retval; }
private int getContentType (Object element [], int defaultType) { int retval; if (element == null) return defaultType; } retval = element.contentType; if (retval == CONTENT_UNDECLARED) retval = defaultType; return retval; }
12,685
private Hashtable getElementAttributes (String name) { Object element[] = (Object[]) elementInfo.get (name); if (element == null) return null; else return (Hashtable) element [2]; }
private HashMap getElementAttributes(String name) { Object element[] = (Object[]) elementInfo.get (name); if (element == null) return null; else return (Hashtable) element [2]; }
12,687
private Hashtable getElementAttributes (String name) { Object element[] = (Object[]) elementInfo.get (name); if (element == null) return null; else return (Hashtable) element [2]; }
private Hashtable getElementAttributes (String name) { Object element[] = (Object[]) elementInfo.get (name); if (element == null) return null; else return (Hashtable) element [2]; }
12,688
public int getElementContentType (String name) { Object element [] = (Object []) elementInfo.get (name); return getContentType (element, CONTENT_UNDECLARED); }
public int getElementContentType (String name) { Object element [] = (Object []) elementInfo.get (name); return getContentType (element, CONTENT_UNDECLARED); }
12,689
public String [] getEntityIds (String ename) { Object entity[] = (Object[]) entityInfo.get (ename); if (entity == null) { return null; } else { return (String []) entity [1]; } }
public ExternalIdentifiers getEntityIds(String ename) { Object entity[] = (Object[]) entityInfo.get (ename); if (entity == null) { return null; } else { return (String []) entity [1]; } }
12,690
public String [] getEntityIds (String ename) { Object entity[] = (Object[]) entityInfo.get (ename); if (entity == null) { return null; } else { return (String []) entity [1]; } }
public String [] getEntityIds (String ename) { Object entity[] = (Object[]) entityInfo.get (ename); if (entity == null) { return null; } else { return (String []) entity [1]; } }
12,691
public int getEntityType (String ename) { Object entity[] = (Object[]) entityInfo.get (ename); if (entity == null) { return ENTITY_UNDECLARED; } else { return ((Integer) entity [0]).intValue (); } }
public int getEntityType (String ename) { Object entity[] = (Object[]) entityInfo.get (ename); if (entity == null) { return ENTITY_UNDECLARED; } else { return ((Integer) entity [0]).intValue (); } }
12,692
public int getEntityType (String ename) { Object entity[] = (Object[]) entityInfo.get (ename); if (entity == null) { return ENTITY_UNDECLARED; } else { return ((Integer) entity [0]).intValue (); } }
public int getEntityType (String ename) { Object entity[] = (Object[]) entityInfo.get (ename); if (entity == null) { return ENTITY_UNDECLARED; else { return ((Integer) entity [0]).intValue ();
12,693
public String getEntityValue (String ename) { Object entity[] = (Object[]) entityInfo.get (ename); if (entity == null) { return null; } else { return (String) entity [3]; } }
public String getEntityValue (String ename) { Object entity[] = (Object[]) entityInfo.get (ename); if (entity == null) { return null; } else { return (String) entity [3]; } }
12,694
public String getEntityValue (String ename) { Object entity[] = (Object[]) entityInfo.get (ename); if (entity == null) { return null; } else { return (String) entity [3]; } }
public String getEntityValue (String ename) { Object entity[] = (Object[]) entityInfo.get (ename); if (entity == null) { return null; else { return (String) entity [3];
12,695
private void initializeVariables () { // First line line = 1; column = 0; // Set up the buffers for data and names dataBufferPos = 0; dataBuffer = new char [DATA_BUFFER_INITIAL]; nameBufferPos = 0; nameBuffer = new char [NAME_BUFFER_INITIAL]; // Set up the DTD hash tables elementInfo = new Hashtable (); entityInfo = new Hashtable (); notationInfo = new Hashtable (); skippedPE = false; // Set up the variables for the current // element context. currentElement = null; currentElementContent = CONTENT_UNDECLARED; // Set up the input variables sourceType = INPUT_NONE; inputStack = new Stack (); entityStack = new Stack (); externalEntity = null; tagAttributePos = 0; tagAttributes = new String [100]; rawReadBuffer = new byte [READ_BUFFER_MAX]; readBufferOverflow = -1; scratch = new InputSource (); inLiteral = false; expandPE = false; peIsError = false; doReport = false; inCDATA = false; symbolTable = new Object [SYMBOL_TABLE_LENGTH][]; }
private void initializeVariables () { // First line line = 1; column = 0; // Set up the buffers for data and names dataBufferPos = 0; dataBuffer = new char [DATA_BUFFER_INITIAL]; nameBufferPos = 0; nameBuffer = new char [NAME_BUFFER_INITIAL]; // Set up the DTD hash tables elementInfo = new Hashtable (); entityInfo = new Hashtable (); notationInfo = new Hashtable (); skippedPE = false; // Set up the variables for the current // element context. currentElement = null; currentElementContent = CONTENT_UNDECLARED; // Set up the input variables sourceType = INPUT_NONE; inputStack = new Stack (); entityStack = new Stack (); externalEntity = null; tagAttributePos = 0; tagAttributes = new String [100]; rawReadBuffer = new byte [READ_BUFFER_MAX]; readBufferOverflow = -1; scratch = new InputSource (); inLiteral = false; expandPE = false; peIsError = false; doReport = false; inCDATA = false; symbolTable = new Object [SYMBOL_TABLE_LENGTH][]; }
12,696
private void initializeVariables () { // First line line = 1; column = 0; // Set up the buffers for data and names dataBufferPos = 0; dataBuffer = new char [DATA_BUFFER_INITIAL]; nameBufferPos = 0; nameBuffer = new char [NAME_BUFFER_INITIAL]; // Set up the DTD hash tables elementInfo = new Hashtable (); entityInfo = new Hashtable (); notationInfo = new Hashtable (); skippedPE = false; // Set up the variables for the current // element context. currentElement = null; currentElementContent = CONTENT_UNDECLARED; // Set up the input variables sourceType = INPUT_NONE; inputStack = new Stack (); entityStack = new Stack (); externalEntity = null; tagAttributePos = 0; tagAttributes = new String [100]; rawReadBuffer = new byte [READ_BUFFER_MAX]; readBufferOverflow = -1; scratch = new InputSource (); inLiteral = false; expandPE = false; peIsError = false; doReport = false; inCDATA = false; symbolTable = new Object [SYMBOL_TABLE_LENGTH][]; }
private void initializeVariables () { // First line line = 1; column = 0; // Set up the buffers for data and names dataBufferPos = 0; dataBuffer = new char [DATA_BUFFER_INITIAL]; nameBufferPos = 0; nameBuffer = new char [NAME_BUFFER_INITIAL]; // Set up the DTD hash tables elementInfo = new Hashtable (); entityInfo = new Hashtable (); notationInfo = new Hashtable (); skippedPE = false; // Set up the variables for the current // element context. currentElement = null; currentElementContent = CONTENT_UNDECLARED; // Set up the input variables sourceType = INPUT_NONE; inputStack = new Stack (); entityStack = new Stack (); externalEntity = null; tagAttributePos = 0; tagAttributes = new String [100]; rawReadBuffer = new byte [READ_BUFFER_MAX]; readBufferOverflow = -1; scratch = new InputSource (); inLiteral = false; expandPE = false; peIsError = false; doReport = false; inCDATA = false; symbolTable = new Object [SYMBOL_TABLE_LENGTH][]; }
12,697
public String intern (char ch[], int start, int length) { int index = 0; int hash = 0; Object bucket []; // Generate a hash code. This is a widely used string hash, // often attributed to Brian Kernighan. for (int i = start; i < start + length; i++) hash = 31 * hash + ch [i]; hash = (hash & 0x7fffffff) % SYMBOL_TABLE_LENGTH; // Get the bucket -- consists of {array,String} pairs if ((bucket = symbolTable [hash]) == null) { // first string in this bucket bucket = new Object [8]; // Search for a matching tuple, and // return the string if we find one. } else { while (index < bucket.length) { char chFound [] = (char []) bucket [index]; // Stop when we hit an empty entry. if (chFound == null) break; // If they're the same length, check for a match. if (chFound.length == length) { for (int i = 0; i < chFound.length; i++) { // continue search on failure if (ch [start + i] != chFound [i]) { break; } else if (i == length - 1) { // That's it, we have a match! return (String) bucket [index + 1]; } } } index += 2; } // Not found -- we'll have to add it. // Do we have to grow the bucket? bucket = (Object []) extendArray (bucket, bucket.length, index); } symbolTable [hash] = bucket; // OK, add it to the end of the bucket -- "local" interning. // Intern "globally" to let applications share interning benefits. // That is, "!=" and "==" work on our strings, not just equals(). String s = new String (ch, start, length).intern (); bucket [index] = s.toCharArray (); bucket [index + 1] = s; return s; }
public String intern(char[] ch, int start, int length) { int index = 0; int hash = 0; Object bucket []; // Generate a hash code. This is a widely used string hash, // often attributed to Brian Kernighan. for (int i = start; i < start + length; i++) hash = 31 * hash + ch [i]; hash = (hash & 0x7fffffff) % SYMBOL_TABLE_LENGTH; // Get the bucket -- consists of {array,String} pairs if ((bucket = symbolTable [hash]) == null) { // first string in this bucket bucket = new Object [8]; // Search for a matching tuple, and // return the string if we find one. } else { while (index < bucket.length) { char chFound [] = (char []) bucket [index]; // Stop when we hit an empty entry. if (chFound == null) break; // If they're the same length, check for a match. if (chFound.length == length) { for (int i = 0; i < chFound.length; i++) { // continue search on failure if (ch [start + i] != chFound [i]) { break; } else if (i == length - 1) { // That's it, we have a match! return (String) bucket [index + 1]; } } } index += 2; } // Not found -- we'll have to add it. // Do we have to grow the bucket? bucket = (Object []) extendArray (bucket, bucket.length, index); } symbolTable [hash] = bucket; // OK, add it to the end of the bucket -- "local" interning. // Intern "globally" to let applications share interning benefits. // That is, "!=" and "==" work on our strings, not just equals(). String s = new String (ch, start, length).intern (); bucket [index] = s.toCharArray (); bucket [index + 1] = s; return s; }
12,698
public String intern (char ch[], int start, int length) { int index = 0; int hash = 0; Object bucket []; // Generate a hash code. This is a widely used string hash, // often attributed to Brian Kernighan. for (int i = start; i < start + length; i++) hash = 31 * hash + ch [i]; hash = (hash & 0x7fffffff) % SYMBOL_TABLE_LENGTH; // Get the bucket -- consists of {array,String} pairs if ((bucket = symbolTable [hash]) == null) { // first string in this bucket bucket = new Object [8]; // Search for a matching tuple, and // return the string if we find one. } else { while (index < bucket.length) { char chFound [] = (char []) bucket [index]; // Stop when we hit an empty entry. if (chFound == null) break; // If they're the same length, check for a match. if (chFound.length == length) { for (int i = 0; i < chFound.length; i++) { // continue search on failure if (ch [start + i] != chFound [i]) { break; } else if (i == length - 1) { // That's it, we have a match! return (String) bucket [index + 1]; } } } index += 2; } // Not found -- we'll have to add it. // Do we have to grow the bucket? bucket = (Object []) extendArray (bucket, bucket.length, index); } symbolTable [hash] = bucket; // OK, add it to the end of the bucket -- "local" interning. // Intern "globally" to let applications share interning benefits. // That is, "!=" and "==" work on our strings, not just equals(). String s = new String (ch, start, length).intern (); bucket [index] = s.toCharArray (); bucket [index + 1] = s; return s; }
public String intern (char ch[], int start, int length) { int index = 0; int hash = 0; Object[] bucket; // Generate a hash code. This is a widely used string hash, // often attributed to Brian Kernighan. for (int i = start; i < start + length; i++) hash = 31 * hash + ch [i]; hash = (hash & 0x7fffffff) % SYMBOL_TABLE_LENGTH; // Get the bucket -- consists of {array,String} pairs if ((bucket = symbolTable [hash]) == null) { // first string in this bucket bucket = new Object [8]; // Search for a matching tuple, and // return the string if we find one. } else { while (index < bucket.length) { char chFound [] = (char []) bucket [index]; // Stop when we hit an empty entry. if (chFound == null) break; // If they're the same length, check for a match. if (chFound.length == length) { for (int i = 0; i < chFound.length; i++) { // continue search on failure if (ch [start + i] != chFound [i]) { break; } else if (i == length - 1) { // That's it, we have a match! return (String) bucket [index + 1]; } } } index += 2; } // Not found -- we'll have to add it. // Do we have to grow the bucket? bucket = (Object []) extendArray (bucket, bucket.length, index); } symbolTable [hash] = bucket; // OK, add it to the end of the bucket -- "local" interning. // Intern "globally" to let applications share interning benefits. // That is, "!=" and "==" work on our strings, not just equals(). String s = new String (ch, start, length).intern (); bucket [index] = s.toCharArray (); bucket [index + 1] = s; return s; }
12,699
public String intern (char ch[], int start, int length) { int index = 0; int hash = 0; Object bucket []; // Generate a hash code. This is a widely used string hash, // often attributed to Brian Kernighan. for (int i = start; i < start + length; i++) hash = 31 * hash + ch [i]; hash = (hash & 0x7fffffff) % SYMBOL_TABLE_LENGTH; // Get the bucket -- consists of {array,String} pairs if ((bucket = symbolTable [hash]) == null) { // first string in this bucket bucket = new Object [8]; // Search for a matching tuple, and // return the string if we find one. } else { while (index < bucket.length) { char chFound [] = (char []) bucket [index]; // Stop when we hit an empty entry. if (chFound == null) break; // If they're the same length, check for a match. if (chFound.length == length) { for (int i = 0; i < chFound.length; i++) { // continue search on failure if (ch [start + i] != chFound [i]) { break; } else if (i == length - 1) { // That's it, we have a match! return (String) bucket [index + 1]; } } } index += 2; } // Not found -- we'll have to add it. // Do we have to grow the bucket? bucket = (Object []) extendArray (bucket, bucket.length, index); } symbolTable [hash] = bucket; // OK, add it to the end of the bucket -- "local" interning. // Intern "globally" to let applications share interning benefits. // That is, "!=" and "==" work on our strings, not just equals(). String s = new String (ch, start, length).intern (); bucket [index] = s.toCharArray (); bucket [index + 1] = s; return s; }
public String intern (char ch[], int start, int length) { int index = 0; int hash = 0; Object bucket []; // Generate a hash code. This is a widely used string hash, // often attributed to Brian Kernighan. for (int i = start; i < start + length; i++) { hash = 31 * hash + ch[i]; } hash = (hash & 0x7fffffff) % SYMBOL_TABLE_LENGTH; // Get the bucket -- consists of {array,String} pairs if ((bucket = symbolTable [hash]) == null) { // first string in this bucket bucket = new Object [8]; // Search for a matching tuple, and // return the string if we find one. } else { while (index < bucket.length) { char chFound [] = (char []) bucket [index]; // Stop when we hit an empty entry. if (chFound == null) break; // If they're the same length, check for a match. if (chFound.length == length) { for (int i = 0; i < chFound.length; i++) { // continue search on failure if (ch [start + i] != chFound [i]) { break; } else if (i == length - 1) { // That's it, we have a match! return (String) bucket [index + 1]; } } } index += 2; } // Not found -- we'll have to add it. // Do we have to grow the bucket? bucket = (Object []) extendArray (bucket, bucket.length, index); } symbolTable [hash] = bucket; // OK, add it to the end of the bucket -- "local" interning. // Intern "globally" to let applications share interning benefits. // That is, "!=" and "==" work on our strings, not just equals(). String s = new String (ch, start, length).intern (); bucket [index] = s.toCharArray (); bucket [index + 1] = s; return s; }
12,700
public String intern (char ch[], int start, int length) { int index = 0; int hash = 0; Object bucket []; // Generate a hash code. This is a widely used string hash, // often attributed to Brian Kernighan. for (int i = start; i < start + length; i++) hash = 31 * hash + ch [i]; hash = (hash & 0x7fffffff) % SYMBOL_TABLE_LENGTH; // Get the bucket -- consists of {array,String} pairs if ((bucket = symbolTable [hash]) == null) { // first string in this bucket bucket = new Object [8]; // Search for a matching tuple, and // return the string if we find one. } else { while (index < bucket.length) { char chFound [] = (char []) bucket [index]; // Stop when we hit an empty entry. if (chFound == null) break; // If they're the same length, check for a match. if (chFound.length == length) { for (int i = 0; i < chFound.length; i++) { // continue search on failure if (ch [start + i] != chFound [i]) { break; } else if (i == length - 1) { // That's it, we have a match! return (String) bucket [index + 1]; } } } index += 2; } // Not found -- we'll have to add it. // Do we have to grow the bucket? bucket = (Object []) extendArray (bucket, bucket.length, index); } symbolTable [hash] = bucket; // OK, add it to the end of the bucket -- "local" interning. // Intern "globally" to let applications share interning benefits. // That is, "!=" and "==" work on our strings, not just equals(). String s = new String (ch, start, length).intern (); bucket [index] = s.toCharArray (); bucket [index + 1] = s; return s; }
public String intern (char ch[], int start, int length) { int index = 0; int hash = 0; Object bucket []; // Generate a hash code. This is a widely used string hash, // often attributed to Brian Kernighan. for (int i = start; i < start + length; i++) hash = 31 * hash + ch [i]; hash = (hash & 0x7fffffff) % SYMBOL_TABLE_LENGTH; // Get the bucket -- consists of {array,String} pairs if ((bucket = symbolTable [hash]) == null) { // first string in this bucket bucket = new Object [8]; // Search for a matching tuple, and // return the string if we find one. } else { while (index < bucket.length) { char chFound [] = (char []) bucket [index]; // Stop when we hit an empty entry. if (chFound == null) break; // If they're the same length, check for a match. if (chFound.length == length) { for (int i = 0; i < chFound.length; i++) { // continue search on failure if (ch [start + i] != chFound [i]) { break; } else if (i == length - 1) { // That's it, we have a match! return (String) bucket [index + 1]; } } } index += 2; } // Not found -- we'll have to add it. // Do we have to grow the bucket? bucket = (Object []) extendArray (bucket, bucket.length, index); } symbolTable [hash] = bucket; // OK, add it to the end of the bucket -- "local" interning. // Intern "globally" to let applications share interning benefits. // That is, "!=" and "==" work on our strings, not just equals(). String s = new String (ch, start, length).intern (); bucket [index] = s.toCharArray (); bucket [index + 1] = s; return s; }
12,701
private void parseAttDef (String elementName) throws Exception { String name; String type; String enumer = null; // Read the attribute name. name = readNmtoken (true); // Read the attribute type. requireWhitespace (); type = readAttType (); // Get the string of enumerated values if necessary. if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) { if ("ENUMERATION" == type || "NOTATION" == type) enumer = dataBufferToString (); } else { if ("ENUMERATION".equals(type) || "NOTATION".equals(type)) enumer = dataBufferToString (); } // Read the default value. requireWhitespace (); parseDefault (elementName, name, type, enumer); }
private void parseAttDef (String elementName) throws Exception { String name; String type; String enumer = null; // Read the attribute name. name = readNmtoken (true); // Read the attribute type. requireWhitespace (); type = readAttType (); // Get the string of enumerated values if necessary. if (handler.stringInterning) { if ("ENUMERATION" == type || "NOTATION" == type) enumer = dataBufferToString (); } else { if ("ENUMERATION".equals(type) || "NOTATION".equals(type)) enumer = dataBufferToString (); } // Read the default value. requireWhitespace (); parseDefault (elementName, name, type, enumer); }
12,703
private void parseAttDef (String elementName) throws Exception { String name; String type; String enumer = null; // Read the attribute name. name = readNmtoken (true); // Read the attribute type. requireWhitespace (); type = readAttType (); // Get the string of enumerated values if necessary. if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) { if ("ENUMERATION" == type || "NOTATION" == type) enumer = dataBufferToString (); } else { if ("ENUMERATION".equals(type) || "NOTATION".equals(type)) enumer = dataBufferToString (); } // Read the default value. requireWhitespace (); parseDefault (elementName, name, type, enumer); }
private void parseAttDef (String elementName) throws Exception { String name; String type; String enumer = null; // Read the attribute name. name = readNmtoken (true); // Read the attribute type. requireWhitespace (); type = readAttType (); // Get the string of enumerated values if necessary. if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) { if ("ENUMERATION" == type || "NOTATION" == type) enumer = dataBufferToString (); } else { if ("ENUMERATION".equals(type) || "NOTATION".equals(type)) enumer = dataBufferToString (); } // Read the default value. requireWhitespace (); parseDefault (elementName, name, type, enumer); }
12,704
private void parseAttDef (String elementName) throws Exception { String name; String type; String enumer = null; // Read the attribute name. name = readNmtoken (true); // Read the attribute type. requireWhitespace (); type = readAttType (); // Get the string of enumerated values if necessary. if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) { if ("ENUMERATION" == type || "NOTATION" == type) enumer = dataBufferToString (); } else { if ("ENUMERATION".equals(type) || "NOTATION".equals(type)) enumer = dataBufferToString (); } // Read the default value. requireWhitespace (); parseDefault (elementName, name, type, enumer); }
private void parseAttDef (String elementName) throws Exception { String name; String type; String enumer = null; // Read the attribute name. name = readNmtoken (true); // Read the attribute type. requireWhitespace (); type = readAttType (); // Get the string of enumerated values if necessary. if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) { if ("ENUMERATION" == type || "NOTATION" == type) { enumer = dataBufferToString(); } } else { if ("ENUMERATION".equals(type) || "NOTATION".equals(type)) { enumer = dataBufferToString(); } } // Read the default value. requireWhitespace (); parseDefault (elementName, name, type, enumer); }
12,705
private void parseAttlistDecl () throws Exception { String elementName; requireWhitespace (); elementName = readNmtoken (true); boolean white = tryWhitespace (); while (!tryRead ('>')) { if (!white) error ("whitespace required before attribute definition"); parseAttDef (elementName); white = tryWhitespace (); } }
private void parseAttlistDecl () throws Exception { String elementName; requireWhitespace (); elementName = readNmtoken (true); boolean white = tryWhitespace (); while (!tryRead ('>')) { if (!white) error ("whitespace required before attribute definition"); parseAttDef (elementName); white = tryWhitespace (); } }
12,706
private void parseAttribute (String name) throws Exception { String aname; String type; String value; int flags = LIT_ATTRIBUTE | LIT_ENTITY_REF; // Read the attribute name. aname = readNmtoken (true); type = getAttributeType (name, aname); // Parse '=' parseEq (); // Read the value, normalizing whitespace // unless it is CDATA. if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) { if (type == "CDATA" || type == null) { value = readLiteral (flags); } else { value = readLiteral (flags | LIT_NORMALIZE); } } else { if (type.equals("CDATA") || type == null) { value = readLiteral (flags); } else { value = readLiteral (flags | LIT_NORMALIZE); } } // WFC: no duplicate attributes for (int i = 0; i < tagAttributePos; i++) if (aname.equals (tagAttributes [i])) error ("duplicate attribute", aname, null); // Inform the handler about the // attribute. handler.attribute (aname, value, true); dataBufferPos = 0; // Note that the attribute has been // specified. if (tagAttributePos == tagAttributes.length) { String newAttrib[] = new String [tagAttributes.length * 2]; System.arraycopy (tagAttributes, 0, newAttrib, 0, tagAttributePos); tagAttributes = newAttrib; } tagAttributes [tagAttributePos++] = aname; }
private void parseAttribute (String name) throws Exception { String aname; String type; String value; int flags = LIT_ATTRIBUTE | LIT_ENTITY_REF; // Read the attribute name. aname = readNmtoken (true); type = getAttributeType (name, aname); // Parse '=' parseEq (); // Read the value, normalizing whitespace // unless it is CDATA. if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) { if (type == "CDATA" || type == null) { value = readLiteral (flags); } else { value = readLiteral (flags | LIT_NORMALIZE); } } else { if (type.equals("CDATA") || type == null) { value = readLiteral (flags); } else { value = readLiteral (flags | LIT_NORMALIZE); } } // WFC: no duplicate attributes for (int i = 0; i < tagAttributePos; i++) if (aname.equals (tagAttributes [i])) error ("duplicate attribute", aname, null); // Inform the handler about the // attribute. handler.attribute (aname, value, true); dataBufferPos = 0; // Note that the attribute has been // specified. if (tagAttributePos == tagAttributes.length) { String newAttrib[] = new String [tagAttributes.length * 2]; System.arraycopy (tagAttributes, 0, newAttrib, 0, tagAttributePos); tagAttributes = newAttrib; } tagAttributes [tagAttributePos++] = aname; }
12,707
private void parseAttribute (String name) throws Exception { String aname; String type; String value; int flags = LIT_ATTRIBUTE | LIT_ENTITY_REF; // Read the attribute name. aname = readNmtoken (true); type = getAttributeType (name, aname); // Parse '=' parseEq (); // Read the value, normalizing whitespace // unless it is CDATA. if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) { if (type == "CDATA" || type == null) { value = readLiteral (flags); } else { value = readLiteral (flags | LIT_NORMALIZE); } } else { if (type.equals("CDATA") || type == null) { value = readLiteral (flags); } else { value = readLiteral (flags | LIT_NORMALIZE); } } // WFC: no duplicate attributes for (int i = 0; i < tagAttributePos; i++) if (aname.equals (tagAttributes [i])) error ("duplicate attribute", aname, null); // Inform the handler about the // attribute. handler.attribute (aname, value, true); dataBufferPos = 0; // Note that the attribute has been // specified. if (tagAttributePos == tagAttributes.length) { String newAttrib[] = new String [tagAttributes.length * 2]; System.arraycopy (tagAttributes, 0, newAttrib, 0, tagAttributePos); tagAttributes = newAttrib; } tagAttributes [tagAttributePos++] = aname; }
private void parseAttribute (String name) throws Exception { String aname; String type; String value; int flags = LIT_ATTRIBUTE | LIT_ENTITY_REF; // Read the attribute name. aname = readNmtoken (true); type = getAttributeType (name, aname); // Parse '=' parseEq (); // Read the value, normalizing whitespace // unless it is CDATA. if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) { if (type == "CDATA" || type == null) { value = readLiteral (flags); } else { value = readLiteral (flags | LIT_NORMALIZE); } } else { if (type.equals("CDATA") || type == null) { value = readLiteral (flags); } else { value = readLiteral (flags | LIT_NORMALIZE); } } // WFC: no duplicate attributes for (int i = 0; i < tagAttributePos; i++) if (aname.equals (tagAttributes [i])) error ("duplicate attribute", aname, null); // Inform the handler about the // attribute. handler.attribute (aname, value, true); dataBufferPos = 0; // Note that the attribute has been // specified. if (tagAttributePos == tagAttributes.length) { String newAttrib[] = new String [tagAttributes.length * 2]; System.arraycopy (tagAttributes, 0, newAttrib, 0, tagAttributePos); tagAttributes = newAttrib; } tagAttributes [tagAttributePos++] = aname; }
12,708
private void parseCharData () throws Exception { char c; int state = 0; boolean pureWhite = false; // assert (dataBufferPos == 0); // are we expecting pure whitespace? it might be dirty... if ((currentElementContent == CONTENT_ELEMENTS) && !isDirtyCurrentElement) pureWhite = true; // always report right out of readBuffer // to minimize (pointless) buffer copies while (true) { int lineAugment = 0; int columnAugment = 0; int i;loop: for (i = readBufferPos; i < readBufferLength; i++) { switch (c = readBuffer [i]) { case '\n': lineAugment++; columnAugment = 0; // pureWhite unmodified break; case '\r': // should not happen!! case '\t': case ' ': // pureWhite unmodified columnAugment++; break; case '&': case '<': columnAugment++; // pureWhite unmodified // CLEAN end of text sequence state = 1; break loop; case ']': // that's not a whitespace char, and // can not terminate pure whitespace either pureWhite = false; if ((i + 2) < readBufferLength) { if (readBuffer [i + 1] == ']' && readBuffer [i + 2] == '>') { // ERROR end of text sequence state = 2; break loop; } } else { // FIXME missing two end-of-buffer cases } columnAugment++; break; default: if ((c < 0x0020 || c > 0xFFFD) || ((c >= 0x007f) && (c <= 0x009f) && (c != 0x0085) && xmlVersion == XML_11)) error ("illegal XML character U+" + Integer.toHexString (c)); // that's not a whitespace char pureWhite = false; columnAugment++; } } // report text thus far if (lineAugment > 0) { line += lineAugment; column = columnAugment; } else { column += columnAugment; } // report characters/whitspace int length = i - readBufferPos; if (length != 0) { if (pureWhite) handler.ignorableWhitespace (readBuffer, readBufferPos, length); else handler.charData (readBuffer, readBufferPos, length); readBufferPos = i; } if (state != 0) break; // fill next buffer from this entity, or // pop stack and continue with previous entity unread (readCh ()); } if (!pureWhite) isDirtyCurrentElement = true; // finish, maybe with error if (state != 1) // finish, no error error ("character data may not contain ']]>'"); }
private void parseCharData () throws Exception { char c; int state = 0; boolean pureWhite = false; // assert (dataBufferPos == 0); // are we expecting pure whitespace? it might be dirty... if ((currentElementContent == CONTENT_ELEMENTS) && !isDirtyCurrentElement) pureWhite = true; // always report right out of readBuffer // to minimize (pointless) buffer copies while (true) { int lineAugment = 0; int columnAugment = 0; int i;loop: for (i = readBufferPos; i < readBufferLength; i++) { switch (c = readBuffer [i]) { case '\n': lineAugment++; columnAugment = 0; // pureWhite unmodified break; case '\r': // should not happen!! case '\t': case ' ': // pureWhite unmodified columnAugment++; break; case '&': case '<': columnAugment++; // pureWhite unmodified // CLEAN end of text sequence state = 1; break loop; case ']': // that's not a whitespace char, and // can not terminate pure whitespace either pureWhite = false; if ((i + 2) < readBufferLength) { if (readBuffer [i + 1] == ']' && readBuffer [i + 2] == '>') { // ERROR end of text sequence state = 2; break loop; } } else { // FIXME missing two end-of-buffer cases } columnAugment++; break; default: if ((c < 0x0020 || c > 0xFFFD) || ((c >= 0x007f) && (c <= 0x009f) && (c != 0x0085) && xmlVersion == XML_11)) error ("illegal XML character U+" + Integer.toHexString (c)); // that's not a whitespace char pureWhite = false; columnAugment++; } } // report text thus far if (lineAugment > 0) { line += lineAugment; column = columnAugment; } else { column += columnAugment; } // report characters/whitspace int length = i - readBufferPos; if (length != 0) { if (pureWhite) handler.ignorableWhitespace (readBuffer, readBufferPos, length); else handler.charData (readBuffer, readBufferPos, length); readBufferPos = i; } if (state != 0) break; // fill next buffer from this entity, or // pop stack and continue with previous entity unread (readCh ()); } if (!pureWhite) isDirtyCurrentElement = true; // finish, maybe with error if (state != 1) // finish, no error error ("character data may not contain ']]>'"); }
12,709
private void parseCharData () throws Exception { char c; int state = 0; boolean pureWhite = false; // assert (dataBufferPos == 0); // are we expecting pure whitespace? it might be dirty... if ((currentElementContent == CONTENT_ELEMENTS) && !isDirtyCurrentElement) pureWhite = true; // always report right out of readBuffer // to minimize (pointless) buffer copies while (true) { int lineAugment = 0; int columnAugment = 0; int i;loop: for (i = readBufferPos; i < readBufferLength; i++) { switch (c = readBuffer [i]) { case '\n': lineAugment++; columnAugment = 0; // pureWhite unmodified break; case '\r': // should not happen!! case '\t': case ' ': // pureWhite unmodified columnAugment++; break; case '&': case '<': columnAugment++; // pureWhite unmodified // CLEAN end of text sequence state = 1; break loop; case ']': // that's not a whitespace char, and // can not terminate pure whitespace either pureWhite = false; if ((i + 2) < readBufferLength) { if (readBuffer [i + 1] == ']' && readBuffer [i + 2] == '>') { // ERROR end of text sequence state = 2; break loop; } } else { // FIXME missing two end-of-buffer cases } columnAugment++; break; default: if ((c < 0x0020 || c > 0xFFFD) || ((c >= 0x007f) && (c <= 0x009f) && (c != 0x0085) && xmlVersion == XML_11)) error ("illegal XML character U+" + Integer.toHexString (c)); // that's not a whitespace char pureWhite = false; columnAugment++; } } // report text thus far if (lineAugment > 0) { line += lineAugment; column = columnAugment; } else { column += columnAugment; } // report characters/whitspace int length = i - readBufferPos; if (length != 0) { if (pureWhite) handler.ignorableWhitespace (readBuffer, readBufferPos, length); else handler.charData (readBuffer, readBufferPos, length); readBufferPos = i; } if (state != 0) break; // fill next buffer from this entity, or // pop stack and continue with previous entity unread (readCh ()); } if (!pureWhite) isDirtyCurrentElement = true; // finish, maybe with error if (state != 1) // finish, no error error ("character data may not contain ']]>'"); }
private void parseCharData () throws Exception { char c; int state = 0; boolean pureWhite = false; // assert (dataBufferPos == 0); // are we expecting pure whitespace? it might be dirty... if ((currentElementContent == CONTENT_ELEMENTS) && !isDirtyCurrentElement) pureWhite = true; // always report right out of readBuffer // to minimize (pointless) buffer copies while (true) { int lineAugment = 0; int columnAugment = 0; int i;loop: for (i = readBufferPos; i < readBufferLength; i++) { switch (c = readBuffer [i]) { case '\n': lineAugment++; columnAugment = 0; // pureWhite unmodified break; case '\r': // should not happen!! case '\t': case ' ': // pureWhite unmodified columnAugment++; break; case '&': case '<': columnAugment++; // pureWhite unmodified // CLEAN end of text sequence state = 1; break loop; case ']': // that's not a whitespace char, and // can not terminate pure whitespace either pureWhite = false; if ((i + 2) < readBufferLength) { if (readBuffer [i + 1] == ']' && readBuffer [i + 2] == '>') { // ERROR end of text sequence state = 2; break loop; } } else { // FIXME missing two end-of-buffer cases } columnAugment++; break; default: if ((c < 0x0020 || c > 0xFFFD) || ((c >= 0x007f) && (c <= 0x009f) && (c != 0x0085) && xmlVersion == XML_11)) error ("illegal XML character U+" + Integer.toHexString (c)); // that's not a whitespace char pureWhite = false; columnAugment++; } } // report text thus far if (lineAugment > 0) { line += lineAugment; column = columnAugment; } else { column += columnAugment; } // report characters/whitspace int length = i - readBufferPos; if (length != 0) { if (pureWhite) { handler.ignorableWhitespace(readBuffer, readBufferPos, length); else handler.charData (readBuffer, readBufferPos, length); readBufferPos = i; } if (state != 0) break; // fill next buffer from this entity, or // pop stack and continue with previous entity unread (readCh ()); } if (!pureWhite) isDirtyCurrentElement = true; // finish, maybe with error if (state != 1) // finish, no error error ("character data may not contain ']]>'"); }
12,710
private void parseCharData () throws Exception { char c; int state = 0; boolean pureWhite = false; // assert (dataBufferPos == 0); // are we expecting pure whitespace? it might be dirty... if ((currentElementContent == CONTENT_ELEMENTS) && !isDirtyCurrentElement) pureWhite = true; // always report right out of readBuffer // to minimize (pointless) buffer copies while (true) { int lineAugment = 0; int columnAugment = 0; int i;loop: for (i = readBufferPos; i < readBufferLength; i++) { switch (c = readBuffer [i]) { case '\n': lineAugment++; columnAugment = 0; // pureWhite unmodified break; case '\r': // should not happen!! case '\t': case ' ': // pureWhite unmodified columnAugment++; break; case '&': case '<': columnAugment++; // pureWhite unmodified // CLEAN end of text sequence state = 1; break loop; case ']': // that's not a whitespace char, and // can not terminate pure whitespace either pureWhite = false; if ((i + 2) < readBufferLength) { if (readBuffer [i + 1] == ']' && readBuffer [i + 2] == '>') { // ERROR end of text sequence state = 2; break loop; } } else { // FIXME missing two end-of-buffer cases } columnAugment++; break; default: if ((c < 0x0020 || c > 0xFFFD) || ((c >= 0x007f) && (c <= 0x009f) && (c != 0x0085) && xmlVersion == XML_11)) error ("illegal XML character U+" + Integer.toHexString (c)); // that's not a whitespace char pureWhite = false; columnAugment++; } } // report text thus far if (lineAugment > 0) { line += lineAugment; column = columnAugment; } else { column += columnAugment; } // report characters/whitspace int length = i - readBufferPos; if (length != 0) { if (pureWhite) handler.ignorableWhitespace (readBuffer, readBufferPos, length); else handler.charData (readBuffer, readBufferPos, length); readBufferPos = i; } if (state != 0) break; // fill next buffer from this entity, or // pop stack and continue with previous entity unread (readCh ()); } if (!pureWhite) isDirtyCurrentElement = true; // finish, maybe with error if (state != 1) // finish, no error error ("character data may not contain ']]>'"); }
private void parseCharData () throws Exception { char c; int state = 0; boolean pureWhite = false; // assert (dataBufferPos == 0); // are we expecting pure whitespace? it might be dirty... if ((currentElementContent == CONTENT_ELEMENTS) && !isDirtyCurrentElement) pureWhite = true; // always report right out of readBuffer // to minimize (pointless) buffer copies while (true) { int lineAugment = 0; int columnAugment = 0; int i;loop: for (i = readBufferPos; i < readBufferLength; i++) { switch (c = readBuffer [i]) { case '\n': lineAugment++; columnAugment = 0; // pureWhite unmodified break; case '\r': // should not happen!! case '\t': case ' ': // pureWhite unmodified columnAugment++; break; case '&': case '<': columnAugment++; // pureWhite unmodified // CLEAN end of text sequence state = 1; break loop; case ']': // that's not a whitespace char, and // can not terminate pure whitespace either pureWhite = false; if ((i + 2) < readBufferLength) { if (readBuffer [i + 1] == ']' && readBuffer [i + 2] == '>') { // ERROR end of text sequence state = 2; break loop; } } else { // FIXME missing two end-of-buffer cases } columnAugment++; break; default: if ((c < 0x0020 || c > 0xFFFD) || ((c >= 0x007f) && (c <= 0x009f) && (c != 0x0085) && xmlVersion == XML_11)) error ("illegal XML character U+" + Integer.toHexString (c)); // that's not a whitespace char pureWhite = false; columnAugment++; } } // report text thus far if (lineAugment > 0) { line += lineAugment; column = columnAugment; } else { column += columnAugment; } // report characters/whitspace int length = i - readBufferPos; if (length != 0) { if (pureWhite) handler.ignorableWhitespace (readBuffer, readBufferPos, length); else { handler.charData(readBuffer, readBufferPos, length); } readBufferPos = i; } if (state != 0) break; // fill next buffer from this entity, or // pop stack and continue with previous entity unread (readCh ()); } if (!pureWhite) isDirtyCurrentElement = true; // finish, maybe with error if (state != 1) // finish, no error error ("character data may not contain ']]>'"); }
12,711
private void parseCharData () throws Exception { char c; int state = 0; boolean pureWhite = false; // assert (dataBufferPos == 0); // are we expecting pure whitespace? it might be dirty... if ((currentElementContent == CONTENT_ELEMENTS) && !isDirtyCurrentElement) pureWhite = true; // always report right out of readBuffer // to minimize (pointless) buffer copies while (true) { int lineAugment = 0; int columnAugment = 0; int i;loop: for (i = readBufferPos; i < readBufferLength; i++) { switch (c = readBuffer [i]) { case '\n': lineAugment++; columnAugment = 0; // pureWhite unmodified break; case '\r': // should not happen!! case '\t': case ' ': // pureWhite unmodified columnAugment++; break; case '&': case '<': columnAugment++; // pureWhite unmodified // CLEAN end of text sequence state = 1; break loop; case ']': // that's not a whitespace char, and // can not terminate pure whitespace either pureWhite = false; if ((i + 2) < readBufferLength) { if (readBuffer [i + 1] == ']' && readBuffer [i + 2] == '>') { // ERROR end of text sequence state = 2; break loop; } } else { // FIXME missing two end-of-buffer cases } columnAugment++; break; default: if ((c < 0x0020 || c > 0xFFFD) || ((c >= 0x007f) && (c <= 0x009f) && (c != 0x0085) && xmlVersion == XML_11)) error ("illegal XML character U+" + Integer.toHexString (c)); // that's not a whitespace char pureWhite = false; columnAugment++; } } // report text thus far if (lineAugment > 0) { line += lineAugment; column = columnAugment; } else { column += columnAugment; } // report characters/whitspace int length = i - readBufferPos; if (length != 0) { if (pureWhite) handler.ignorableWhitespace (readBuffer, readBufferPos, length); else handler.charData (readBuffer, readBufferPos, length); readBufferPos = i; } if (state != 0) break; // fill next buffer from this entity, or // pop stack and continue with previous entity unread (readCh ()); } if (!pureWhite) isDirtyCurrentElement = true; // finish, maybe with error if (state != 1) // finish, no error error ("character data may not contain ']]>'"); }
private void parseCharData () throws Exception { char c; int state = 0; boolean pureWhite = false; // assert (dataBufferPos == 0); // are we expecting pure whitespace? it might be dirty... if ((currentElementContent == CONTENT_ELEMENTS) && !isDirtyCurrentElement) pureWhite = true; // always report right out of readBuffer // to minimize (pointless) buffer copies while (true) { int lineAugment = 0; int columnAugment = 0; int i;loop: for (i = readBufferPos; i < readBufferLength; i++) { switch (c = readBuffer [i]) { case '\n': lineAugment++; columnAugment = 0; // pureWhite unmodified break; case '\r': // should not happen!! case '\t': case ' ': // pureWhite unmodified columnAugment++; break; case '&': case '<': columnAugment++; // pureWhite unmodified // CLEAN end of text sequence state = 1; break loop; case ']': // that's not a whitespace char, and // can not terminate pure whitespace either pureWhite = false; if ((i + 2) < readBufferLength) { if (readBuffer [i + 1] == ']' && readBuffer [i + 2] == '>') { // ERROR end of text sequence state = 2; break loop; } } else { // FIXME missing two end-of-buffer cases } columnAugment++; break; default: if ((c < 0x0020 || c > 0xFFFD) || ((c >= 0x007f) && (c <= 0x009f) && (c != 0x0085) && xmlVersion == XML_11)) error ("illegal XML character U+" + Integer.toHexString (c)); // that's not a whitespace char pureWhite = false; columnAugment++; } } // report text thus far if (lineAugment > 0) { line += lineAugment; column = columnAugment; } else { column += columnAugment; } // report characters/whitspace int length = i - readBufferPos; if (length != 0) { if (pureWhite) handler.ignorableWhitespace (readBuffer, readBufferPos, length); else handler.charData (readBuffer, readBufferPos, length); readBufferPos = i; } if (state != 0) break; // fill next buffer from this entity, or // pop stack and continue with previous entity unread (readCh ()); } if (!pureWhite) isDirtyCurrentElement = true; // finish, maybe with error if (state != 1) // finish, no error { error("character data may not contain ']]>'"); } }
12,712
private void parseConditionalSect (char saved []) throws Exception { skipWhitespace (); if (tryRead ("INCLUDE")) { skipWhitespace (); require ('['); // VC: Proper Conditional Section/PE Nesting if (readBuffer != saved) handler.verror ("Illegal Conditional Section/PE nesting"); skipWhitespace (); while (!tryRead ("]]>")) { parseMarkupdecl (); skipWhitespace (); } } else if (tryRead ("IGNORE")) { skipWhitespace (); require ('['); // VC: Proper Conditional Section/PE Nesting if (readBuffer != saved) handler.verror ("Illegal Conditional Section/PE nesting"); int nesting = 1; char c; expandPE = false; for (int nest = 1; nest > 0;) { c = readCh (); switch (c) { case '<': if (tryRead ("![")) { nest++; } case ']': if (tryRead ("]>")) { nest--; } } } expandPE = true; } else { error ("conditional section must begin with INCLUDE or IGNORE"); } }
private void parseConditionalSect(char[] saved) throws Exception { skipWhitespace (); if (tryRead ("INCLUDE")) { skipWhitespace (); require ('['); // VC: Proper Conditional Section/PE Nesting if (readBuffer != saved) handler.verror ("Illegal Conditional Section/PE nesting"); skipWhitespace (); while (!tryRead ("]]>")) { parseMarkupdecl (); skipWhitespace (); } } else if (tryRead ("IGNORE")) { skipWhitespace (); require ('['); // VC: Proper Conditional Section/PE Nesting if (readBuffer != saved) handler.verror ("Illegal Conditional Section/PE nesting"); int nesting = 1; char c; expandPE = false; for (int nest = 1; nest > 0;) { c = readCh (); switch (c) { case '<': if (tryRead ("![")) { nest++; } case ']': if (tryRead ("]>")) { nest--; } } } expandPE = true; } else { error ("conditional section must begin with INCLUDE or IGNORE"); } }
12,713
private void parseConditionalSect (char saved []) throws Exception { skipWhitespace (); if (tryRead ("INCLUDE")) { skipWhitespace (); require ('['); // VC: Proper Conditional Section/PE Nesting if (readBuffer != saved) handler.verror ("Illegal Conditional Section/PE nesting"); skipWhitespace (); while (!tryRead ("]]>")) { parseMarkupdecl (); skipWhitespace (); } } else if (tryRead ("IGNORE")) { skipWhitespace (); require ('['); // VC: Proper Conditional Section/PE Nesting if (readBuffer != saved) handler.verror ("Illegal Conditional Section/PE nesting"); int nesting = 1; char c; expandPE = false; for (int nest = 1; nest > 0;) { c = readCh (); switch (c) { case '<': if (tryRead ("![")) { nest++; } case ']': if (tryRead ("]>")) { nest--; } } } expandPE = true; } else { error ("conditional section must begin with INCLUDE or IGNORE"); } }
private void parseConditionalSect (char saved []) throws Exception { skipWhitespace (); if (tryRead ("INCLUDE")) { skipWhitespace (); require ('['); // VC: Proper Conditional Section/PE Nesting if (readBuffer != saved) handler.verror ("Illegal Conditional Section/PE nesting"); skipWhitespace (); while (!tryRead ("]]>")) { parseMarkupdecl (); skipWhitespace (); } } else if (tryRead ("IGNORE")) { skipWhitespace (); require ('['); // VC: Proper Conditional Section/PE Nesting if (readBuffer != saved) handler.verror ("Illegal Conditional Section/PE nesting"); int nesting = 1; char c; expandPE = false; for (int nest = 1; nest > 0;) { c = readCh (); switch (c) { case '<': if (tryRead ("![")) { nest++; } case ']': if (tryRead ("]>")) { nest--; } } } expandPE = true; } else { error ("conditional section must begin with INCLUDE or IGNORE"); } }
12,714
private void parseConditionalSect (char saved []) throws Exception { skipWhitespace (); if (tryRead ("INCLUDE")) { skipWhitespace (); require ('['); // VC: Proper Conditional Section/PE Nesting if (readBuffer != saved) handler.verror ("Illegal Conditional Section/PE nesting"); skipWhitespace (); while (!tryRead ("]]>")) { parseMarkupdecl (); skipWhitespace (); } } else if (tryRead ("IGNORE")) { skipWhitespace (); require ('['); // VC: Proper Conditional Section/PE Nesting if (readBuffer != saved) handler.verror ("Illegal Conditional Section/PE nesting"); int nesting = 1; char c; expandPE = false; for (int nest = 1; nest > 0;) { c = readCh (); switch (c) { case '<': if (tryRead ("![")) { nest++; } case ']': if (tryRead ("]>")) { nest--; } } } expandPE = true; } else { error ("conditional section must begin with INCLUDE or IGNORE"); } }
private void parseConditionalSect (char saved []) throws Exception { skipWhitespace (); if (tryRead ("INCLUDE")) { skipWhitespace (); require ('['); // VC: Proper Conditional Section/PE Nesting if (readBuffer != saved) { handler.verror("Illegal Conditional Section/PE nesting"); } skipWhitespace (); while (!tryRead ("]]>")) { parseMarkupdecl (); skipWhitespace (); } } else if (tryRead ("IGNORE")) { skipWhitespace (); require ('['); // VC: Proper Conditional Section/PE Nesting if (readBuffer != saved) { handler.verror("Illegal Conditional Section/PE nesting"); } int nesting = 1; char c; expandPE = false; for (int nest = 1; nest > 0;) { c = readCh (); switch (c) { case '<': if (tryRead ("![")) { nest++; } case ']': if (tryRead ("]>")) { nest--; } } } expandPE = true; } else { error ("conditional section must begin with INCLUDE or IGNORE"); } }
12,715
private void parseContentspec (String name) throws Exception {// FIXME: move elementDecl() into setElement(), pass EMTPY/ANY ... if (tryRead ("EMPTY")) { setElement (name, CONTENT_EMPTY, null, null); if (!skippedPE) handler.getDeclHandler ().elementDecl (name, "EMPTY"); return; } else if (tryRead ("ANY")) { setElement (name, CONTENT_ANY, null, null); if (!skippedPE) handler.getDeclHandler ().elementDecl (name, "ANY"); return; } else { String model; char saved []; require ('('); saved = readBuffer; dataBufferAppend ('('); skipWhitespace (); if (tryRead ("#PCDATA")) { dataBufferAppend ("#PCDATA"); parseMixed (saved); model = dataBufferToString (); setElement (name, CONTENT_MIXED, model, null); } else { parseElements (saved); model = dataBufferToString (); setElement (name, CONTENT_ELEMENTS, model, null); } if (!skippedPE) handler.getDeclHandler ().elementDecl (name, model); } }
private void parseContentspec (String name) throws Exception {// FIXME: move elementDecl() into setElement(), pass EMTPY/ANY ... if (tryRead ("EMPTY")) { setElement (name, CONTENT_EMPTY, null, null); if (!skippedPE) { handler.getDeclHandler().elementDecl(name, "EMPTY"); } return; } else if (tryRead ("ANY")) { setElement (name, CONTENT_ANY, null, null); if (!skippedPE) handler.getDeclHandler ().elementDecl (name, "ANY"); return; } else { String model; char saved []; require ('('); saved = readBuffer; dataBufferAppend ('('); skipWhitespace (); if (tryRead ("#PCDATA")) { dataBufferAppend ("#PCDATA"); parseMixed (saved); model = dataBufferToString (); setElement (name, CONTENT_MIXED, model, null); } else { parseElements (saved); model = dataBufferToString (); setElement (name, CONTENT_ELEMENTS, model, null); } if (!skippedPE) handler.getDeclHandler ().elementDecl (name, model); } }
12,716
private void parseContentspec (String name) throws Exception {// FIXME: move elementDecl() into setElement(), pass EMTPY/ANY ... if (tryRead ("EMPTY")) { setElement (name, CONTENT_EMPTY, null, null); if (!skippedPE) handler.getDeclHandler ().elementDecl (name, "EMPTY"); return; } else if (tryRead ("ANY")) { setElement (name, CONTENT_ANY, null, null); if (!skippedPE) handler.getDeclHandler ().elementDecl (name, "ANY"); return; } else { String model; char saved []; require ('('); saved = readBuffer; dataBufferAppend ('('); skipWhitespace (); if (tryRead ("#PCDATA")) { dataBufferAppend ("#PCDATA"); parseMixed (saved); model = dataBufferToString (); setElement (name, CONTENT_MIXED, model, null); } else { parseElements (saved); model = dataBufferToString (); setElement (name, CONTENT_ELEMENTS, model, null); } if (!skippedPE) handler.getDeclHandler ().elementDecl (name, model); } }
private void parseContentspec (String name) throws Exception {// FIXME: move elementDecl() into setElement(), pass EMTPY/ANY ... if (tryRead ("EMPTY")) { setElement (name, CONTENT_EMPTY, null, null); if (!skippedPE) handler.getDeclHandler ().elementDecl (name, "EMPTY"); return; } else if (tryRead ("ANY")) { setElement (name, CONTENT_ANY, null, null); if (!skippedPE) { handler.getDeclHandler().elementDecl(name, "ANY"); } return; } else { String model; char saved []; require ('('); saved = readBuffer; dataBufferAppend ('('); skipWhitespace (); if (tryRead ("#PCDATA")) { dataBufferAppend ("#PCDATA"); parseMixed (saved); model = dataBufferToString (); setElement (name, CONTENT_MIXED, model, null); } else { parseElements (saved); model = dataBufferToString (); setElement (name, CONTENT_ELEMENTS, model, null); } if (!skippedPE) handler.getDeclHandler ().elementDecl (name, model); } }
12,717
private void parseContentspec (String name) throws Exception {// FIXME: move elementDecl() into setElement(), pass EMTPY/ANY ... if (tryRead ("EMPTY")) { setElement (name, CONTENT_EMPTY, null, null); if (!skippedPE) handler.getDeclHandler ().elementDecl (name, "EMPTY"); return; } else if (tryRead ("ANY")) { setElement (name, CONTENT_ANY, null, null); if (!skippedPE) handler.getDeclHandler ().elementDecl (name, "ANY"); return; } else { String model; char saved []; require ('('); saved = readBuffer; dataBufferAppend ('('); skipWhitespace (); if (tryRead ("#PCDATA")) { dataBufferAppend ("#PCDATA"); parseMixed (saved); model = dataBufferToString (); setElement (name, CONTENT_MIXED, model, null); } else { parseElements (saved); model = dataBufferToString (); setElement (name, CONTENT_ELEMENTS, model, null); } if (!skippedPE) handler.getDeclHandler ().elementDecl (name, model); } }
private void parseContentspec (String name) throws Exception {// FIXME: move elementDecl() into setElement(), pass EMTPY/ANY ... if (tryRead ("EMPTY")) { setElement (name, CONTENT_EMPTY, null, null); if (!skippedPE) handler.getDeclHandler ().elementDecl (name, "EMPTY"); return; } else if (tryRead ("ANY")) { setElement (name, CONTENT_ANY, null, null); if (!skippedPE) handler.getDeclHandler ().elementDecl (name, "ANY"); return; } else { String model; char[] saved; require ('('); saved = readBuffer; dataBufferAppend ('('); skipWhitespace (); if (tryRead ("#PCDATA")) { dataBufferAppend ("#PCDATA"); parseMixed (saved); model = dataBufferToString (); setElement (name, CONTENT_MIXED, model, null); } else { parseElements (saved); model = dataBufferToString (); setElement (name, CONTENT_ELEMENTS, model, null); } if (!skippedPE) handler.getDeclHandler ().elementDecl (name, model); } }
12,718
private void parseContentspec (String name) throws Exception {// FIXME: move elementDecl() into setElement(), pass EMTPY/ANY ... if (tryRead ("EMPTY")) { setElement (name, CONTENT_EMPTY, null, null); if (!skippedPE) handler.getDeclHandler ().elementDecl (name, "EMPTY"); return; } else if (tryRead ("ANY")) { setElement (name, CONTENT_ANY, null, null); if (!skippedPE) handler.getDeclHandler ().elementDecl (name, "ANY"); return; } else { String model; char saved []; require ('('); saved = readBuffer; dataBufferAppend ('('); skipWhitespace (); if (tryRead ("#PCDATA")) { dataBufferAppend ("#PCDATA"); parseMixed (saved); model = dataBufferToString (); setElement (name, CONTENT_MIXED, model, null); } else { parseElements (saved); model = dataBufferToString (); setElement (name, CONTENT_ELEMENTS, model, null); } if (!skippedPE) handler.getDeclHandler ().elementDecl (name, model); } }
private void parseContentspec (String name) throws Exception {// FIXME: move elementDecl() into setElement(), pass EMTPY/ANY ... if (tryRead ("EMPTY")) { setElement (name, CONTENT_EMPTY, null, null); if (!skippedPE) handler.getDeclHandler ().elementDecl (name, "EMPTY"); return; } else if (tryRead ("ANY")) { setElement (name, CONTENT_ANY, null, null); if (!skippedPE) handler.getDeclHandler ().elementDecl (name, "ANY"); return; } else { String model; char saved []; require ('('); saved = readBuffer; dataBufferAppend ('('); skipWhitespace (); if (tryRead ("#PCDATA")) { dataBufferAppend ("#PCDATA"); parseMixed (saved); model = dataBufferToString (); setElement (name, CONTENT_MIXED, model, null); } else { parseElements (saved); model = dataBufferToString (); setElement (name, CONTENT_ELEMENTS, model, null); } if (!skippedPE) { handler.getDeclHandler().elementDecl(name, model); } } }
12,719