rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
g.setColor(new Color(153, 153, 204));
if (slider.isEnabled()) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getControlDisabled());
protected void paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y) { // Note the incoming 'g' has a translation in place to get us to the // start of the tick rect already... // TODO: get color from UIManager... g.setColor(new Color(153, 153, ...
g.setColor(new Color(153, 153, 204));
if (slider.isEnabled()) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getControlDisabled());
protected void paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x) { // Note the incoming 'g' has a translation in place to get us to the // start of the tick rect already... // TODO: get color from UIManager... g.setColor(new Color(153, 153...
g.setColor(new Color(153, 153, 204));
if (slider.isEnabled()) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getControlDisabled());
protected void paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y) { // Note the incoming 'g' has a translation in place to get us to the // start of the tick rect already... // TODO: get color from UIManager... g.setColor(new Color(153, 153, ...
int xPos = xPositionForValue(slider.getValue()); int x = (slider.getInverted() ? xPos : trackRect.x); int w = (slider.getInverted() ? trackX + trackW - xPos : xPos - trackRect.x); g.setColor(MetalLookAndFeel.getControlShadow()); g.fillRect(x + 1, trackY + 1, w - 3, getTrackWidth() - 3); if (slider.isEnabled()) { g.setC...
public void paintTrack(Graphics g) { if (slider.getOrientation() == JSlider.HORIZONTAL) { if (filledSlider) { // TODO: fill the track } BasicGraphicsUtils.drawEtchedRect(g, trackRect.x, trackRect.y + (trackRect.height - getTrackWidth()) / 2, trackRect.width - 1, ...
BasicGraphicsUtils.drawEtchedRect(g, trackRect.x, trackRect.y + (trackRect.height - getTrackWidth()) / 2, trackRect.width - 1, getTrackWidth(), Color.darkGray, Color.gray, Color.darkGray, Color.white);
public void paintTrack(Graphics g) { if (slider.getOrientation() == JSlider.HORIZONTAL) { if (filledSlider) { // TODO: fill the track } BasicGraphicsUtils.drawEtchedRect(g, trackRect.x, trackRect.y + (trackRect.height - getTrackWidth()) / 2, trackRect.width - 1, ...
int yPos = yPositionForValue(slider.getValue()); int y = (slider.getInverted() ? trackY : yPos); int h = (slider.getInverted() ? yPos - trackY : trackY + trackH - yPos); g.setColor(MetalLookAndFeel.getControlShadow()); g.fillRect(trackX + 1, y + 1, getTrackWidth() - 3, h - 3); if (slider.isEnabled()) { g.setColor(Metal...
public void paintTrack(Graphics g) { if (slider.getOrientation() == JSlider.HORIZONTAL) { if (filledSlider) { // TODO: fill the track } BasicGraphicsUtils.drawEtchedRect(g, trackRect.x, trackRect.y + (trackRect.height - getTrackWidth()) / 2, trackRect.width - 1, ...
BasicGraphicsUtils.drawEtchedRect(g, trackRect.x + (trackRect.width - getTrackWidth()) / 2, trackRect.y, getTrackWidth(), trackRect.height - 1, Color.darkGray, Color.gray, Color.darkGray, Color.white);
public void paintTrack(Graphics g) { if (slider.getOrientation() == JSlider.HORIZONTAL) { if (filledSlider) { // TODO: fill the track } BasicGraphicsUtils.drawEtchedRect(g, trackRect.x, trackRect.y + (trackRect.height - getTrackWidth()) / 2, trackRect.width - 1, ...
log.info("Emitting objects ");
log("Emitting objects", Project.MSG_DEBUG);
private final void emitObjects(NativeStream os, VmArchitecture arch, Object skipMe) throws BuildException { log.info("Emitting objects "); PrintWriter debugOut = null; try { if (debug) { debugOut = new PrintWriter(new FileWriter(debugFile)); } final ObjectEmitter emitter = new ObjectEmitter(clsMgr, os, deb...
log.info("Emitted " + cnt + " objects, took " + (end - start) + "ms in " + loops + " loops");
log("Emitted " + cnt + " objects, took " + (end - start) + "ms in " + loops + " loops");
private final void emitObjects(NativeStream os, VmArchitecture arch, Object skipMe) throws BuildException { log.info("Emitting objects "); PrintWriter debugOut = null; try { if (debug) { debugOut = new PrintWriter(new FileWriter(debugFile)); } final ObjectEmitter emitter = new ObjectEmitter(clsMgr, os, deb...
log.info("Done.");
log("Done.");
public final void execute() throws BuildException { final long lmJar = jarFile.lastModified(); final long lmKernel = kernelFile.lastModified(); final long lmDest = destFile.lastModified(); final long lmPIL = getPluginListFile().lastModified(); final PluginList piList; final long lmPI; try { piList = getPlugin...
add(new BootClassInfo("org.jnode.vm.MemoryBlockManager", core));
protected void setupBootClasses() { final int core = BootClassInfo.F_ALL; //final int core = BootClassInfo.F_RESOLVEALL; final int nonCore = BootClassInfo.F_RESOLVEALL; //int nonCore = BootClassInfo.F_ALL; add(new BootClassInfo("java.lang.Class", true, core)); add(new BootClassInfo("java.lang.Object", true, core...
log.info("Creating image");
log("Creating image");
protected void storeImage(NativeStream os) throws BuildException { try { log.info("Creating image"); FileOutputStream fos = new FileOutputStream(destFile); fos.write(os.getBytes(), 0, os.getLength()); fos.close(); } catch (IOException ex) { throw new BuildException(ex); } }
private IntItem(int kind, Register reg, int value, int local) { super(kind, reg, local); this.value = value;
IntItem(ItemFactory factory) { super(factory);
private IntItem(int kind, Register reg, int value, int local) { super(kind, reg, local); this.value = value; }
return createConst(getValue());
return factory.createIConst(getValue());
protected WordItem cloneConstant() { return createConst(getValue()); }
throw new BAD_OPERATION("Invalid enumeration code " + code);
BAD_OPERATION bad = new BAD_OPERATION("Invalid policy code " + code); bad.minor = Minor.PolicyType; throw bad;
public static LifespanPolicyValue from_int(int code) { try { return enume [ code ]; } catch (ArrayIndexOutOfBoundsException ex) { throw new BAD_OPERATION("Invalid enumeration code " + code); } }
return KeyPairCodecFactory.getEncodingShortName(defaultFormat);
return FormatUtil.getEncodingShortName(defaultFormat);
public String getFormat() { return KeyPairCodecFactory.getEncodingShortName(defaultFormat); }
if (key != null)
if (key != null && key.isValid())
public final SelectionKey register(Selector selin, int ops, Object att) throws ClosedChannelException { if (! isOpen()) throw new ClosedChannelException(); if ((ops & ~validOps()) != 0) throw new IllegalArgumentException(); SelectionKey key = null; AbstractSelector selector = (AbstractSe...
wnd.add(sb, BorderLayout.SOUTH);
System.out.println(wnd.getFont().getName()); System.out.println(wnd.getFont().getClass().getName()); System.out.println(wnd.getFontMetrics(wnd.getFont()).getClass().getName());
public static void main(String[] args) throws InterruptedException { boolean useDoubleBuffer = (args.length > 0) && args[0].equals("buffer"); final Frame wnd = new Frame("AWTTest"); try { //wnd.setSize(GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().ge...
AccessController.doPrivileged(this.new GetHTTPPropertiesAction());
proxyHostname = SystemProperties.getProperty("http.proxyHost"); if (proxyHostname != null && proxyHostname.length() > 0) { String port = SystemProperties.getProperty("http.proxyPort"); if (port != null && port.length() > 0) { proxyPort = Integer.parseInt(port); } else { proxyHostname = null; proxyPort = -1; } } agent =...
public HTTPURLConnection(URL url) throws IOException { super(url); requestHeaders = new Headers(); AccessController.doPrivileged(this.new GetHTTPPropertiesAction()); }
String old = requestHeaders.getValue(key); if (old == null) { requestHeaders.put(key, value); } else { requestHeaders.put(key, old + "," + value); }
requestHeaders.addValue(key, value);
public void addRequestProperty(String key, String value) { super.addRequestProperty(key, value); String old = requestHeaders.getValue(key); if (old == null) { requestHeaders.put(key, value); } else { requestHeaders.put(key, old + "," + value); } }
Iterator i = response.getHeaders().entrySet().iterator(); Map.Entry entry; int count = 1; do { if (!i.hasNext()) { return null; } entry = (Map.Entry) i.next(); count++; } while (count <= index); return (String) entry.getValue();
return response.getHeaders().getHeaderValue(index - 1);
public String getHeaderField(int index) { if (!connected) { try { connect(); } catch (IOException e) { return null; } } if (index == 0) { return getStatusLine(response); } Iterator i = response.getHeaders().en...
if (index == 0) { return null; } Iterator i = response.getHeaders().entrySet().iterator(); Map.Entry entry; int count = 1; do { if (!i.hasNext()) { return null; } entry = (Map.Entry) i.next(); count++; } while (count <= index); return (String) entry.getKey();
return response.getHeaders().getHeaderName(index - 1);
public String getHeaderFieldKey(int index) { if (!connected) { try { connect(); } catch (IOException e) { return null; } } if (index == 0) { return null; } Iterator i = response.getHeaders().entrySet().iterato...
Headers headers = response.getHeaders(); LinkedHashMap ret = new LinkedHashMap(); ret.put(null, Collections.singletonList(getStatusLine(response))); for (Iterator i = headers.entrySet().iterator(); i.hasNext(); ) { Map.Entry entry = (Map.Entry) i.next(); String key = (String) entry.getKey(); String value = (String) ent...
Map m = response.getHeaders().getAsMap(); m.put(null, Collections.singletonList(getStatusLine(response))); return Collections.unmodifiableMap(m);
public Map getHeaderFields() { if (!connected) { try { connect(); } catch (IOException e) { return null; } } Headers headers = response.getHeaders(); LinkedHashMap ret = new LinkedHashMap(); ret.put(null, Collections.single...
return requestHeaders;
Map m = requestHeaders.getAsMap(); return Collections.unmodifiableMap(m);
public Map getRequestProperties() { if (connected) throw new IllegalStateException("Already connected"); return requestHeaders; }
if (key == null) return null;
public String getRequestProperty(String key) { if (key == null) return null; return requestHeaders.getValue(key); }
SimpleAttributeSet atts = new SimpleAttributeSet(); atts.addAttribute(StyleConstants.IconAttribute, icon); atts.addAttribute(StyleConstants.NameAttribute, StyleConstants.IconElementName); try { getDocument().insertString(getCaret().getDot(), " ", atts); } catch (BadLocationException ex) { AssertionError err = new Asser...
MutableAttributeSet inputAtts = getInputAttributes(); inputAtts.removeAttributes(inputAtts); StyleConstants.setIcon(inputAtts, icon); replaceSelection(" "); inputAtts.removeAttributes(inputAtts);
public void insertIcon(Icon icon) { SimpleAttributeSet atts = new SimpleAttributeSet(); atts.addAttribute(StyleConstants.IconAttribute, icon); atts.addAttribute(StyleConstants.NameAttribute, StyleConstants.IconElementName); try { getDocument().insertString(getCaret().getD...
Runtime.getRuntime().load(filename);
Runtime.getRuntime().load(filename, VMStackWalker.getCallingClassLoader());
public static void load(String filename) { Runtime.getRuntime().load(filename); }
Runtime.getRuntime().loadLibrary(libname);
Runtime.getRuntime().loadLibrary(libname, VMStackWalker.getCallingClassLoader());
public static void loadLibrary(String libname) { Runtime.getRuntime().loadLibrary(libname); }
return new Position() { int off = offset;
if (offset < 0 || offset > length()) throw new BadLocationException("The offset was out of the bounds of this" + " buffer", offset);
public Position createPosition(final int offset) throws BadLocationException { return new Position() { int off = offset; public int getOffset() { return off; } }; }
public int getOffset() { return off; } };
int mark = offset; if (offset > gapStart) mark += gapEnd - gapStart; GapContentPosition pos = new GapContentPosition(mark); int index = Collections.binarySearch(positions, pos); if (index < 0) index = -(index + 1); positions.add(index, pos); return pos;
public Position createPosition(final int offset) throws BadLocationException { return new Position() { int off = offset; public int getOffset() { return off; } }; }
int index = Collections.binarySearch(positions, new GapContentPosition( gapEnd)); if (index < 0) { index = -(index + 1); } for (ListIterator i = positions.listIterator(index); i.hasNext();) { GapContentPosition p = (GapContentPosition) i.next(); p.mark += delta; }
protected void shiftEnd(int newSize) { char[] newBuf = (char[]) allocateArray(length() + newSize); System.arraycopy(buffer, 0, newBuf, 0, gapStart); System.arraycopy(buffer, gapEnd, newBuf, gapStart + newSize, buffer.length - gapEnd); gapEnd = gapStart + newSize; buffer = newBuf; ...
}
protected void shiftGap(int newGapStart) { int newGapEnd = newGapStart + (gapEnd - gapStart); if (newGapStart == gapStart) return; else if (newGapStart < gapStart) { System.arraycopy(buffer, newGapStart, buffer, newGapEnd, gapStart - newGapStart); gapStart = n...
public boolean addValueList (ValueListInterface valueListObj)
public boolean addValueList (ValueList valueListObj)
public boolean addValueList (ValueListInterface valueListObj) { List values = valueListObj.getValues(); // do we have any new values? if (values.size() > 0) { addValueListObj(valueListObj); // append in new values to Parameter obj Iterator iter = values.iterator(); ...
cloneObj.valueListObjects.add( ((ValueListInterface) this.valueListObjects.get(i)).clone());
cloneObj.valueListObjects.add( ((ValueList) this.valueListObjects.get(i)).clone());
public Object clone() throws CloneNotSupportedException { BaseObjectWithValueList cloneObj = (BaseObjectWithValueList) super.clone(); cloneObj.valueListObjects = Collections.synchronizedList(new ArrayList()); int stop = this.valueListObjects.size(); for (int i = 0; i < stop; i++) { clone...
public JRadioButton(String text)
public JRadioButton()
public JRadioButton(String text) { this(text, null, false); }
this(text, null, false);
this(null, null, false);
public JRadioButton(String text) { this(text, null, false); }
public CertificateException(String msg)
public CertificateException()
public CertificateException(String msg) { super(msg); }
super(msg);
public CertificateException(String msg) { super(msg); }
if (e.getPropertyName().equals(JComboBox.ENABLED_CHANGED_PROPERTY))
if (e.getPropertyName().equals("enabled"))
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JComboBox.ENABLED_CHANGED_PROPERTY)) { arrowButton.setEnabled(comboBox.isEnabled()); if (comboBox.isEditable()) comboBox.getEditor().getEditorComponent().setEnabled(comboBox ...
else if (e.getPropertyName().equals(JComboBox.EDITABLE_CHANGED_PROPERTY))
else if (e.getPropertyName().equals("editable"))
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JComboBox.ENABLED_CHANGED_PROPERTY)) { arrowButton.setEnabled(comboBox.isEnabled()); if (comboBox.isEditable()) comboBox.getEditor().getEditorComponent().setEnabled(comboBox ...
else if (e.getPropertyName().equals(JComboBox.MODEL_CHANGED_PROPERTY))
else if (e.getPropertyName().equals("dataModel"))
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JComboBox.ENABLED_CHANGED_PROPERTY)) { arrowButton.setEnabled(comboBox.isEnabled()); if (comboBox.isEditable()) comboBox.getEditor().getEditorComponent().setEnabled(comboBox ...
if (isSpecified("-sslType")) sesProps.put(TN5250jConstants.SSL_TYPE,getParameter("-sslType"));
private void jbInit() throws Exception { this.setSize(new Dimension(400,300)); if (isSpecified("-L")) LangTool.init(parseLocale(getParameter("-L"))); else LangTool.init(); //Let's check some permissions try { System.getProperty(".java.policy"); } catch (SecurityExcep...
menuBar.getMenu(i).setSelected(false);
{ JMenu menu = menuBar.getMenu(i); if (menu != null) menu.setSelected(false); }
public void mouseClicked(MouseEvent e) { MenuElement[] me = menuBar.getSubElements(); for (int i = 0; i < me.length; i++) menuBar.getMenu(i).setSelected(false); }
if (!SwingUtilities.isRightMouseButton(e) && !isSomethingBounded) start(canvas.translateStart(e.getPoint()));
if (!SwingUtilities.isRightMouseButton(e)) { if (!isSomethingBounded) start(canvas.translateStart(e.getPoint())); else { if (isSomethingBounded) { erase(); notifyRubberBandCanvas(); reset(); start(canvas.translateStart(e.getPoint())); } } }
public void mousePressed(MouseEvent e) { if (!SwingUtilities.isRightMouseButton(e) && !isSomethingBounded) start(canvas.translateStart(e.getPoint()));// System.out.println("mouse pressed rb"); }
erase(); stop(canvas.translateEnd(e.getPoint())); draw(); notifyRubberBandCanvas(); } }
erase(); stop(canvas.translateEnd(e.getPoint())); notifyRubberBandCanvas(); draw(); notifyRubberBandCanvas(); } }
public void mouseDragged(MouseEvent e) { if(!SwingUtilities.isRightMouseButton(e) && getCanvas().canDrawRubberBand(RubberBand.this)) { erase(); stop(canvas.translateEnd(e.getPoint())); draw(); notifyRubberBandCanvas(); } }
firePropertyChange(BORDER_PAINTED_CHANGED_PROPERTY, ! paintBorder,
firePropertyChange("borderPainted", ! paintBorder,
public void setBorderPainted(boolean painted) { if (painted != paintBorder) { paintBorder = painted; firePropertyChange(BORDER_PAINTED_CHANGED_PROPERTY, ! paintBorder, paintBorder); repaint(); } } // setBorderPainted()
firePropertyChange(FLOATABLE_CHANGED_PROPERTY, ! floatable, floatable);
firePropertyChange("floatable", ! floatable, floatable);
public void setFloatable(boolean floatable) { if (floatable != this.floatable) { this.floatable = floatable; firePropertyChange(FLOATABLE_CHANGED_PROPERTY, ! floatable, floatable); } } // setFloatable()
firePropertyChange(MARGIN_CHANGED_PROPERTY, oldMargin, this.margin);
firePropertyChange("margin", oldMargin, this.margin);
public void setMargin(Insets margin) { if ((this.margin != null && margin == null) || (this.margin == null && margin != null) || (margin != null && this.margin != null && (margin.left != this.margin.left || margin.right != this.margin.right || margin.top != this.margin.top || ma...
firePropertyChange(ORIENTATION_CHANGED_PROPERTY, oldOrientation, this.orientation);
firePropertyChange("orientation", oldOrientation, this.orientation);
public void setOrientation(int orientation) { if (orientation != HORIZONTAL && orientation != VERTICAL) throw new IllegalArgumentException(orientation + " is not a legal orientation"); if (orientation != this.orientation) { int oldOrientation = this.orientation;...
firePropertyChange(ROLLOVER_CHANGED_PROPERTY, ! rollover, rollover);
firePropertyChange("rollover", ! rollover, rollover);
public void setRollover(boolean b) { if (b != rollover) { rollover = b; firePropertyChange(ROLLOVER_CHANGED_PROPERTY, ! rollover, rollover); revalidate(); repaint(); } }
void dump()
protected void dump()
void dump() { // Climb up the hierarchy to the parent. View parent = getParent(); if (parent != null) parent.dump(); else dump(0); }
int startIndex = getViewIndex(startOffset, Position.Bias.Forward);
int startIndex = getViewIndex(startOffset, Position.Bias.Backward);
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); // FIXME: What about...
protected static boolean isFree(byte data, int index) {
protected static boolean isFree(byte[] data, int index) { int byteIndex = index / 8; byte bitIndex = (byte) (index % 8); byte mask = (byte) (1 << bitIndex);
protected static boolean isFree(byte data, int index) { //byte bitIndex = (byte) (index % 8); byte mask = (byte) (1 << index); return ((data & mask) == 0)? true : false; }
byte mask = (byte) (1 << index); return ((data & mask) == 0)? true : false;
return ((data[byteIndex] & mask) == 0)? true : false;
protected static boolean isFree(byte data, int index) { //byte bitIndex = (byte) (index % 8); byte mask = (byte) (1 << index); return ((data & mask) == 0)? true : false; }
Rectangle oldClip = g.getClipBounds (); g.setClip (oldClip.intersection (viewBounds));
Rectangle oldClip = g.getClipBounds(); g.setClip(portBounds);
private void paintSimple(Graphics g, JViewport v, Component view, Point pos, Rectangle viewBounds, Rectangle portBounds) { Rectangle oldClip = g.getClipBounds (); g.setClip (ol...
textComponent.setSelectedTextColor(UIManager.getColor(prefix + ".selectionForeground"));
protected void installDefaults() { Caret caret = textComponent.getCaret(); if (caret == null) { caret = createCaret(); textComponent.setCaret(caret); } Highlighter highlighter = textComponent.getHighlighter(); if (highlighter == null) textComponent.setHighlighter(createHighli...
}
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { Boolean boolValue = (B...
JCheckBox box = new BooleanCellRenderer().getCheckBox(); setDefaultEditor(Boolean.class, new DefaultCellEditor(box));
protected void createDefaultEditors() { //FIXME: Create the editor object. }
if (editorComp!=null) moveToCellBeingEdited(editorComp); repaint();
public void doLayout() { TableColumn resizingColumn = null; int ncols = getColumnCount(); if (ncols < 1) return; int[] pref = new int[ncols]; int prefSum = 0; int rCol = -1; if (tableHeader != null) resizingColumn = tableHeader.getResizingColumn(); for (int i = 0; i < ncols; ++i) ...
oldCellValue = getValueAt(row, column);
if (isEditing()) editingStopped(new ChangeEvent("editingStopped")); editingRow = row; editingColumn = column;
public boolean editCellAt (int row, int column) { oldCellValue = getValueAt(row, column); setCellEditor(getCellEditor(row, column)); editorComp = prepareEditor(cellEditor, row, column); cellEditor.addCellEditorListener(this); rowBeingEdited = row; columnBeingEdited = column; setValueAt(editorCom...
cellEditor.addCellEditorListener(this); rowBeingEdited = row; columnBeingEdited = column; setValueAt(editorComp, row, column); ((JTextField)editorComp).requestFocusInWindow(false); editorTimer.start();
removeAll(); add(editorComp); moveToCellBeingEdited(editorComp); scrollRectToVisible(editorComp.getBounds()); editorComp.requestFocusInWindow();
public boolean editCellAt (int row, int column) { oldCellValue = getValueAt(row, column); setCellEditor(getCellEditor(row, column)); editorComp = prepareEditor(cellEditor, row, column); cellEditor.addCellEditorListener(this); rowBeingEdited = row; columnBeingEdited = column; setValueAt(editorCom...
if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField)
if (editorComp!=null)
public void editingCanceled (ChangeEvent event) { if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField) { remove ((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(oldCellValue, r...
remove ((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(oldCellValue, rowBeingEdited, columnBeingEdited); } rowBeingEdited = -1; columnBeingEdited = -1;
remove(editorComp); repaint(editorComp.getBounds()); editorComp = null;
public void editingCanceled (ChangeEvent event) { if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField) { remove ((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(oldCellValue, r...
editorTimer.stop(); editorComp = null; cellEditor = null; requestFocusInWindow(false); repaint();
public void editingCanceled (ChangeEvent event) { if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField) { remove ((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(oldCellValue, r...
if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField)
if (editorComp!=null)
public void editingStopped (ChangeEvent event) { if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField) { remove((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(((JTextField)edit...
remove((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(((JTextField)editorComp).getText(), rowBeingEdited, columnBeingEdited); } rowBeingEdited = -1; columnBeingEdited = -1;
remove(editorComp); setValueAt(cellEditor.getCellEditorValue(), editingRow, editingColumn); repaint(editorComp.getBounds()); editorComp = null;
public void editingStopped (ChangeEvent event) { if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField) { remove((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(((JTextField)edit...
editorTimer.stop(); editorComp = null; cellEditor = null; requestFocusInWindow(false); repaint();
requestFocusInWindow();
public void editingStopped (ChangeEvent event) { if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField) { remove((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(((JTextField)edit...
TableCellEditor r = new DefaultCellEditor(new JTextField());
JTextField t = new TableTextField(); TableCellEditor r = new DefaultCellEditor(t);
public TableCellEditor getDefaultEditor(Class columnClass) { if (defaultEditorsByColumnClass.containsKey(columnClass)) return (TableCellEditor) defaultEditorsByColumnClass.get(columnClass); else { // FIXME: We have at least an editor for Object.class in our defaults. TableCellEditor r = new De...
int height = getRowHeight();
int height = getRowHeight() + getRowMargin();
public int rowAtPoint(Point point) { if (point != null) { int nrows = getRowCount(); int height = getRowHeight(); int y = point.y; for (int i = 0; i < nrows; ++i) { if (0 <= y && y < height) return i; y -= height; } } re...
for (int i = 0; i < nrows; ++i) { if (0 <= y && y < height) return i; y -= height; }
int r = y / height; if (r < 0 || r > nrows) return -1; else return r;
public int rowAtPoint(Point point) { if (point != null) { int nrows = getRowCount(); int height = getRowHeight(); int y = point.y; for (int i = 0; i < nrows; ++i) { if (0 <= y && y < height) return i; y -= height; } } re...
else
public int rowAtPoint(Point point) { if (point != null) { int nrows = getRowCount(); int height = getRowHeight(); int y = point.y; for (int i = 0; i < nrows; ++i) { if (0 <= y && y < height) return i; y -= height; } } re...
if (value instanceof Component) add((Component)value);
public void setValueAt(Object value, int row, int column) { if (!isCellEditable(row, column)) return; if (value instanceof Component) add((Component)value); dataModel.setValueAt(value, row, convertColumnIndexToModel(column)); }
repaint(getCellRect(row, column, true));
public void setValueAt(Object value, int row, int column) { if (!isCellEditable(row, column)) return; if (value instanceof Component) add((Component)value); dataModel.setValueAt(value, row, convertColumnIndexToModel(column)); }
return -1;
return 1;
public int getHeight(ImageObserver observer) { return -1; }
HashSet<ImageConsumer> consumers = new HashSet<ImageConsumer>();
Set<ImageConsumer> consumers = new HashSet<ImageConsumer>();
public ImageProducer getSource() { return new ImageProducer() { HashSet<ImageConsumer> consumers = new HashSet<ImageConsumer>(); public void addConsumer(ImageConsumer ic) { consumers.add(ic); } public boolean isConsumer(Im...
public void addConsumer(ImageConsumer ic) {
synchronized public void addConsumer(ImageConsumer ic) {
public ImageProducer getSource() { return new ImageProducer() { HashSet<ImageConsumer> consumers = new HashSet<ImageConsumer>(); public void addConsumer(ImageConsumer ic) { consumers.add(ic); } public boolean isConsumer(Im...
public boolean isConsumer(ImageConsumer ic) {
synchronized public boolean isConsumer(ImageConsumer ic) {
public ImageProducer getSource() { return new ImageProducer() { HashSet<ImageConsumer> consumers = new HashSet<ImageConsumer>(); public void addConsumer(ImageConsumer ic) { consumers.add(ic); } public boolean isConsumer(Im...
public void removeConsumer(ImageConsumer ic) {
synchronized public void removeConsumer(ImageConsumer ic) {
public ImageProducer getSource() { return new ImageProducer() { HashSet<ImageConsumer> consumers = new HashSet<ImageConsumer>(); public void addConsumer(ImageConsumer ic) { consumers.add(ic); } public boolean isConsumer(Im...
public void startProduction(ImageConsumer ic) {
synchronized public void startProduction(ImageConsumer ic) {
public ImageProducer getSource() { return new ImageProducer() { HashSet<ImageConsumer> consumers = new HashSet<ImageConsumer>(); public void addConsumer(ImageConsumer ic) { consumers.add(ic); } public boolean isConsumer(Im...
public void addConsumer(ImageConsumer ic) {
synchronized public void addConsumer(ImageConsumer ic) {
public void addConsumer(ImageConsumer ic) { consumers.add(ic); }
public boolean isConsumer(ImageConsumer ic) {
synchronized public boolean isConsumer(ImageConsumer ic) {
public boolean isConsumer(ImageConsumer ic) { return consumers.contains(ic); }
public void removeConsumer(ImageConsumer ic) {
synchronized public void removeConsumer(ImageConsumer ic) {
public void removeConsumer(ImageConsumer ic) { consumers.remove(ic); }
public void startProduction(ImageConsumer ic) {
synchronized public void startProduction(ImageConsumer ic) {
public void startProduction(ImageConsumer ic) { consumers.add(ic); for (ImageConsumer c : consumers) { c.imageComplete(ImageConsumer.IMAGEERROR); } }
return -1;
return 1;
public int getWidth(ImageObserver observer) { return -1; }
return null;
return getFontManager().createFont(format, stream);
public Font createFont(int format, InputStream stream) { // TODO Auto-generated method stub return null; }
ImageProducer producer = new FilteredImageSource(this.getSource(), new ReplicateScaleFilter(width, height)); return Toolkit.getDefaultToolkit().createImage(producer);
filter = new ReplicateScaleFilter(width, height); break; case SCALE_AREA_AVERAGING: filter = new AreaAveragingScaleFilter(width, height); break;
public Image getScaledInstance(int width, int height, int flags) { switch (flags) { case SCALE_DEFAULT: case SCALE_FAST: case SCALE_REPLICATE: ImageProducer producer = new FilteredImageSource(this.getSource(), new ReplicateScaleFilter(width, heigh...
case SCALE_AREA_AVERAGING:
throw new Error("SCALE_SMOOTH: not implemented");
public Image getScaledInstance(int width, int height, int flags) { switch (flags) { case SCALE_DEFAULT: case SCALE_FAST: case SCALE_REPLICATE: ImageProducer producer = new FilteredImageSource(this.getSource(), new ReplicateScaleFilter(width, heigh...
throw new Error("not implemented");
throw new Error("Unknown flag or not implemented: " + flags);
public Image getScaledInstance(int width, int height, int flags) { switch (flags) { case SCALE_DEFAULT: case SCALE_FAST: case SCALE_REPLICATE: ImageProducer producer = new FilteredImageSource(this.getSource(), new ReplicateScaleFilter(width, heigh...
ImageProducer producer = new FilteredImageSource(getSource(), filter); return Toolkit.getDefaultToolkit().createImage(producer);
public Image getScaledInstance(int width, int height, int flags) { switch (flags) { case SCALE_DEFAULT: case SCALE_FAST: case SCALE_REPLICATE: ImageProducer producer = new FilteredImageSource(this.getSource(), new ReplicateScaleFilter(width, heigh...
public JNodeFontPeer(String name, Map attrs) { super(name, attrs);
public JNodeFontPeer(String name, int style, int size) { super(name, style, size);
public JNodeFontPeer(String name, Map attrs) { super(name, attrs); // TODO Auto-generated constructor stub }
String taggedIndent = indent; if (writeHrefAttribute) { dataOutputWriter.write("<"+nodeName+">"); taggedIndent = ""; }
protected String basicXMLWriter ( Writer outputWriter, String strIndent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ...
indent,
taggedIndent,
protected String basicXMLWriter ( Writer outputWriter, String strIndent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ...
if (writeHrefAttribute) { if (niceOutput) dataOutputWriter.write(Constants.NEW_LINE); dataOutputWriter.write("</"+nodeName+">"); }
protected String basicXMLWriter ( Writer outputWriter, String strIndent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ...
ICC_ProfileRGB()
ICC_ProfileRGB(int cspace)
ICC_ProfileRGB() { super(ColorSpace.CS_sRGB); }
super(ColorSpace.CS_sRGB);
super(cspace); matrix = createMatrix(); whitePoint = getXYZData(icSigMediaWhitePointTag);
ICC_ProfileRGB() { super(ColorSpace.CS_sRGB); }
return 0;
short[] data; switch (component) { case REDCOMPONENT: data = getCurve(icSigRedTRCTag); break; case GREENCOMPONENT: data = getCurve(icSigGreenTRCTag); break; case BLUECOMPONENT: data = getCurve(icSigBlueTRCTag); break; default: throw new IllegalArgumentException("Not a valid component"); } if (data == null) throw new Il...
public float getGamma(int component) { return 0; }
return null;
float[][] mat = new float[3][3]; for (int i = 0; i < 3; i++) for (int j = 0; j < 3; j++) mat[i][j] = matrix[i][j]; return mat;
public float[][] getMatrix() { return null; }
return null;
short[] data; switch (component) { case REDCOMPONENT: data = getCurve(icSigRedTRCTag); break; case GREENCOMPONENT: data = getCurve(icSigGreenTRCTag); break; case BLUECOMPONENT: data = getCurve(icSigBlueTRCTag); break; default: throw new IllegalArgumentException("Not a valid component"); } if (data == null) throw new Il...
public short[] getTRC(int component) { return null; }
firePropertyChange("componentOrientation", oldOrientation, o);
public void setComponentOrientation(ComponentOrientation o) { if (o == null) throw new NullPointerException(); orientation = o; }
public void setDisplayedMnemonic(char mnemonic)
public void setDisplayedMnemonic(int mnemonic)
public void setDisplayedMnemonic(char mnemonic) { setDisplayedMnemonic((int) Character.toUpperCase(mnemonic)); }