rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
ComponentUI ui = null; if (userUIDefaults != null && userUIDefaults.get(target.getUIClassID()) != null) ui = userUIDefaults.getUI(target); if (ui == null) ui = currentUIDefaults.getUI(target); return ui;
return getDefaults().getUI(target);
public static ComponentUI getUI(JComponent target) { ComponentUI ui = null; if (userUIDefaults != null && userUIDefaults.get(target.getUIClassID()) != null) ui = userUIDefaults.getUI(target); if (ui == null) ui = currentUIDefaults.getUI(target); return ui; }
Object old = get(key); if (userUIDefaults == null) userUIDefaults = new UIDefaults(); userUIDefaults.put(key, value); return old;
return getDefaults().put(key, value);
public static Object put(Object key, Object value) { Object old = get(key); if (userUIDefaults == null) userUIDefaults = new UIDefaults(); userUIDefaults.put(key, value); return old; }
throw new UnsupportedLookAndFeelException(newLookAndFeel.getName());
throw new UnsupportedLookAndFeelException(newLookAndFeel.getName() + " not supported on this platform");
public static void setLookAndFeel(LookAndFeel newLookAndFeel) throws UnsupportedLookAndFeelException { if (newLookAndFeel != null && ! newLookAndFeel.isSupportedLookAndFeel()) throw new UnsupportedLookAndFeelException(newLookAndFeel.getName()); LookAndFeel oldLookAndFeel = currentLookAndFeel; if (ol...
currentUIDefaults = newLookAndFeel.getDefaults();
lookAndFeelDefaults = newLookAndFeel.getDefaults(); if (currentUIDefaults == null) currentUIDefaults = new MultiplexUIDefaults(lookAndFeelDefaults); else currentUIDefaults.fallback = lookAndFeelDefaults;
public static void setLookAndFeel(LookAndFeel newLookAndFeel) throws UnsupportedLookAndFeelException { if (newLookAndFeel != null && ! newLookAndFeel.isSupportedLookAndFeel()) throw new UnsupportedLookAndFeelException(newLookAndFeel.getName()); LookAndFeel oldLookAndFeel = currentLookAndFeel; if (ol...
log.debug("PointerId == " + id);
log.debug("PointerId 0x" + NumberUtils.hex(id, 2));
public boolean probe(AbstractPointerDriver d) { try { // reset the mouse if (!d.initPointer()) { log.debug("Reset mouse failed"); return false; } int id = d.getPointerId(); if (id != 0) { // does not seem to be a mouse, more likely a tablet of touch screen log.debug("PointerId == " + id); ret...
log.debug("Actual pointerId 0x" + NumberUtils.hex(id, 2));
public boolean probe(AbstractPointerDriver d) { try { // reset the mouse if (!d.initPointer()) { log.debug("Reset mouse failed"); return false; } int id = d.getPointerId(); if (id != 0) { // does not seem to be a mouse, more likely a tablet of touch screen log.debug("PointerId == " + id); ret...
throw new BAD_OPERATION("Policy[] expected");
BAD_OPERATION bad = new BAD_OPERATION("Policy[] expected"); bad.minor = Minor.Any; throw bad;
public static Policy[] extract(Any any) { try { PolicyListHolder holds = (PolicyListHolder) any.extract_Streamable(); return holds.value; } catch (ClassCastException ex) { throw new BAD_OPERATION("Policy[] expected"); } }
vt.negotiate(baosin.toByteArray());
vt.negotiate(rBytes); return null;
public final byte[] readIncoming() throws IOException { boolean done = false; boolean negotiate = false; baosin.reset(); int j = -1; int i = 0; while(!done) { i = bin.read(); // WVL - LDC : 16/07/2003 : TR.000345 // The inStream return -1 when end-of-strea...
if (dumpBytes) { dump(baosin.toByteArray()); } return baosin.toByteArray(); }
else { return rBytes; } }
public final byte[] readIncoming() throws IOException { boolean done = false; boolean negotiate = false; baosin.reset(); int j = -1; int i = 0; while(!done) { i = bin.read(); // WVL - LDC : 16/07/2003 : TR.000345 // The inStream return -1 when end-of-strea...
try { byte[] abyte0 = readIncoming(); if (abyte0.length > 0) { loadStream(abyte0, 0); } else { done = true; vt.disconnect(); }
try { byte[] abyte0 = readIncoming(); if (abyte0 != null) { if (abyte0.length > 0) { loadStream(abyte0, 0); } else { done = true; vt.disconnect(); } }
public final void run() { boolean done = false; me = Thread.currentThread(); // load the first response screen try { loadStream(abyte2, 0); } catch (IOException ioef) { log.warn(" run() " + ioef.getMessage()); } while (!done) { try { byte[] a...
catch (SocketException se) { log.warn(" DataStreamProducer thread interrupted and stopping ");
catch (SocketException se) { log.warn(" DataStreamProducer thread interrupted and stopping " + se.getMessage());
public final void run() { boolean done = false; me = Thread.currentThread(); // load the first response screen try { loadStream(abyte2, 0); } catch (IOException ioef) { log.warn(" run() " + ioef.getMessage()); } while (!done) { try { byte[] a...
throws BadLocationException
protected int getNextEastWestVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) { // FIXME: Implement this correctly. return pos; }
throws BadLocationException
protected int getNextNorthSouthVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) { // FIXME: Implement this correctly. return pos; }
throws BadLocationException
public int getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) { int retVal = -1; switch (direction) { case SwingConstants.WEST: case SwingConstants.EAST: retVal = getNextEastWestVisualPositionFrom(pos,...
throw new BAD_OPERATION(method, 0, CompletionStatus.COMPLETED_MAYBE);
throw new BAD_OPERATION(method, Minor.Method, CompletionStatus.COMPLETED_MAYBE);
public OutputStream _invoke(String method, InputStream in, ResponseHandler rh) { OutputStream out = null; // We suppose that the next_n should be the most popular. if (method.equals("next_n")) { // The next_n has been invoked. int amount = in.read_ulong(); BindingListHolder a_list ...
boolean niceOutput = sPrettyXDFOutput;
boolean niceOutput = Specification.getInstance().isPrettyXDFOutput();
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
String moreIndent = myIndent + sPrettyXDFOutputIndentation;
String moreIndent = myIndent + Specification.getInstance().getPrettyXDFOutputIndentation();
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString,...
return getComponents().length;
return getMenuComponentCount();
public int getItemCount() { // returns the number of items on // the menu, including separators. return getComponents().length; }
return uiClassID;
return "MenuUI";
public String getUIClassID() { return uiClassID; }
if (getParent() instanceof JMenuBar) return true; else return false;
return getParent() instanceof JMenuBar;
public boolean isTopLevelMenu() { if (getParent() instanceof JMenuBar) return true; else return false; }
return "JMenu";
return super.paramString();
protected String paramString() { return "JMenu"; }
if (e.getPropertyName().equals(JMenuBar.BORDER_PAINTED_CHANGED_PROPERTY))
if (e.getPropertyName().equals("borderPainted"))
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JMenuBar.BORDER_PAINTED_CHANGED_PROPERTY)) menuBar.repaint(); if (e.getPropertyName().equals(JMenuBar.MARGIN_CHANGED_PROPERTY)) menuBar.repaint(); }
if (e.getPropertyName().equals(JMenuBar.MARGIN_CHANGED_PROPERTY))
if (e.getPropertyName().equals("margin"))
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JMenuBar.BORDER_PAINTED_CHANGED_PROPERTY)) menuBar.repaint(); if (e.getPropertyName().equals(JMenuBar.MARGIN_CHANGED_PROPERTY)) menuBar.repaint(); }
Vm._assert(pool.request(reg, item), "request");
Vm._assert(ok, "request");
public void writePUSH(int jvmType, X86Register.GPR reg) { final Item item = ifac.createReg(ec, jvmType, reg); if (Vm.VerifyAssertions) Vm._assert(pool.request(reg, item), "request"); push(item); }
Vm._assert(pool.request(lsbReg, item), "request-lsb"); Vm._assert(pool.request(msbReg, item), "request-msb");
Vm._assert(lsbOk, "request-lsb"); Vm._assert(msbOk, "request-msb");
public void writePUSH64(int jvmType, X86Register.GPR lsbReg, X86Register.GPR msbReg) { final Item item = ifac.createReg(ec, jvmType, lsbReg, msbReg); if (Vm.VerifyAssertions) { Vm._assert(pool.request(lsbReg, item), "request-lsb"); Vm._assert(pool.request(msbReg, item), "request-msb"); } push(item); ...
layoutCL(lab, fm, lab.getText(), lab.getIcon(), vr, ir, tr); Rectangle cr = SwingUtilities.computeUnion(tr.x, tr.y, tr.width, tr.height, ir); return new Dimension(insets.left + cr.width + insets.right, insets.top + cr.height + insets.bottom);
ir.x = 0; ir.y = 0; ir.width = 0; ir.height = 0; tr.x = 0; tr.y = 0; tr.width = 0; tr.height = 0; vr.x = 0; vr.y = 0; vr.width = Short.MAX_VALUE; vr.height = Short.MAX_VALUE; layoutCL(lab, fm, text, icon, vr, ir, tr); Rectangle cr = SwingUtilities.computeUnion(tr.x, tr.y, tr.width, tr.height, ir); ret = new Dimension(c...
public Dimension getPreferredSize(JComponent c) { JLabel lab = (JLabel) c; Insets insets = lab.getInsets(); FontMetrics fm = lab.getFontMetrics(lab.getFont()); layoutCL(lab, fm, lab.getText(), lab.getIcon(), vr, ir, tr); Rectangle cr = SwingUtilities.computeUnion(tr.x, tr.y, tr.width, tr.height...
throws NotImplementedException
protected void installKeyboardActions(JLabel l) throws NotImplementedException { //FIXME: implement. }
Component c = l.getLabelFor(); if (c != null) { int mnemonic = l.getDisplayedMnemonic(); if (mnemonic > 0) { InputMap keyMap = new InputMap(); keyMap.put(KeyStroke.getKeyStroke(mnemonic, KeyEvent.VK_ALT), "press"); SwingUtilities.replaceUIInputMap(l, JComponent.WHEN_IN_FOCUSED_WINDOW, keyMap); ActionMap map = new Ac...
protected void installKeyboardActions(JLabel l) throws NotImplementedException { //FIXME: implement. }
vr = SwingUtilities.calculateInnerArea(c, vr);
public void paint(Graphics g, JComponent c) { JLabel b = (JLabel) c; FontMetrics fm = g.getFontMetrics(); vr = SwingUtilities.calculateInnerArea(c, vr); if (vr.width < 0) vr.width = 0; if (vr.height < 0) vr.height = 0; Icon icon = (b.isEnabled()) ? b.getIcon() : b.getDisabledIcon(); St...
if (vr.width < 0) vr.width = 0; if (vr.height < 0) vr.height = 0;
Insets i = c.getInsets(); vr.x = i.left; vr.y = i.right; vr.width = c.getWidth() - i.left + i.right; vr.height = c.getHeight() - i.top + i.bottom; ir.x = 0; ir.y = 0; ir.width = 0; ir.height = 0; tr.x = 0; tr.y = 0; tr.width = 0; tr.height = 0;
public void paint(Graphics g, JComponent c) { JLabel b = (JLabel) c; FontMetrics fm = g.getFontMetrics(); vr = SwingUtilities.calculateInnerArea(c, vr); if (vr.width < 0) vr.width = 0; if (vr.height < 0) vr.height = 0; Icon icon = (b.isEnabled()) ? b.getIcon() : b.getDisabledIcon(); St...
else if (e.getPropertyName().equals("displayedMnemonic")) { JLabel label = (JLabel) e.getSource(); if (label.getLabelFor() != null) { int oldMnemonic = ((Integer) e.getOldValue()).intValue(); int newMnemonic = ((Integer) e.getNewValue()).intValue(); InputMap keyMap = label.getInputMap( JComponent.WHEN_IN_FOCUSED_WINDO...
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("text")) { String text = (String) e.getNewValue(); JLabel l = (JLabel) e.getSource(); BasicHTML.updateRenderer(l, text); } }
throws NotImplementedException
protected void uninstallKeyboardActions(JLabel l) throws NotImplementedException { //FIXME: implement. }
SwingUtilities.replaceUIActionMap(l, null); SwingUtilities.replaceUIInputMap(l, JComponent.WHEN_IN_FOCUSED_WINDOW, null);
protected void uninstallKeyboardActions(JLabel l) throws NotImplementedException { //FIXME: implement. }
if (!evt.isShiftDown())
if (evt.getModifiers() == 0)
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
else
else if (evt.getModifiers() == InputEvent.SHIFT_MASK)
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
if (evt.isShiftDown())
if (evt.getModifiers() == InputEvent.SHIFT_MASK)
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
else
else if (evt.getModifiers() == 0)
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
if (evt.isControlDown() && evt.isShiftDown())
if (evt.getModifiers() == (InputEvent.SHIFT_MASK | InputEvent.CTRL_MASK))
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
else if (evt.isControlDown())
else if (evt.getModifiers() == InputEvent.CTRL_MASK)
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
else if (evt.isShiftDown())
else if (evt.getModifiers() == InputEvent.SHIFT_MASK)
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
int target; if (!evt.isControlDown()) { if (rowLead == getFirstVisibleRowIndex()) target = Math.max (0, rowLead - (getLastVisibleRowIndex() - getFirstVisibleRowIndex() + 1)); else target = getFirstVisibleRowIndex(); if (evt.getModifiers() == 0) { rowModel.setSelectionInterval(target, target); colModel.setSelectionInte...
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
} else if (evt.getKeyCode() == KeyEvent.VK_TAB) { } else if (evt.getKeyCode() == KeyEvent.VK_ENTER) {
int target; if (!evt.isControlDown()) { if (rowLead == getLastVisibleRowIndex()) target = Math.min (rowMax, rowLead + (getLastVisibleRowIndex() - getFirstVisibleRowIndex() + 1)); else target = getLastVisibleRowIndex(); if (evt.getModifiers() == 0) { rowModel.setSelectionInterval(target, target); colModel.setSelectionI...
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
boolean multRowsSelected, multColsSelected; multRowsSelected = (table.getSelectedRowCount() > 1) || (!table.getRowSelectionAllowed() && table.getSelectedColumnCount() > 0); multColsSelected = (table.getSelectedColumnCount() > 1) || (!table.getColumnSelectionAllowed() && table.getSelectedRowCount() > 0);
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
if ((table.getSelectedRowCount() <= 1 && table.getSelectedColumnCount() <= 1) || (table.getRowSelectionAllowed() == false && table.getColumnSelectionAllowed() == false)) { rowModel.setSelectionInterval((rowLead + 1)%(rowMax + 1), (rowLead + 1)%(rowMax + 1)); if (rowLead == rowMax) colModel.setSelectionInterval((colLead...
if (!multColsSelected || !multRowsSelected) { if (evt.getKeyCode() == KeyEvent.VK_TAB) advanceSingleSelection(colModel, colMax, rowModel, rowMax, (evt.getModifiers() == InputEvent.SHIFT_MASK)); else advanceSingleSelection(rowModel, rowMax, colModel, colMax, (evt.getModifiers() == InputEvent.SHIFT_MASK));
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
if (rowLead == rowMaxSelected) { rowModel.addSelectionInterval(rowMinSelected, rowMinSelected); if (colLead == colMaxSelected) colModel.addSelectionInterval(colMinSelected, colMinSelected); else { int[] colsSelected; if (table.getColumnSelectionAllowed()) colsSelected = table.getSelectedColumns(); else { colsSelected...
if (evt.getKeyCode() == KeyEvent.VK_TAB) advanceMultipleSelection(colModel, colMinSelected, colMaxSelected, rowModel, rowMinSelected, rowMaxSelected, (evt.getModifiers() == InputEvent.SHIFT_MASK), true);
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
{ int[] rowsSelected; if (table.getRowSelectionAllowed()) rowsSelected = table.getSelectedRows(); else { rowsSelected = new int[table.getModel().getRowCount()]; for (int i = 0; i < table.getModel().getRowCount(); i++) rowsSelected[i] = i; } int rowIndex = 0; while (rowsSelected[rowIndex] <= rowLead) rowIndex++; rowMode...
advanceMultipleSelection(rowModel, rowMinSelected, rowMaxSelected, colModel, colMinSelected, colMaxSelected, (evt.getModifiers() == InputEvent.SHIFT_MASK), false);
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
== KeyEvent.VK_SLASH) && evt.isControlDown()) { rowModel.setSelectionInterval(0, rowMax); colModel.setSelectionInterval(0, colMax); rowModel.addSelectionInterval(rowLead, rowLead); colModel.addSelectionInterval(colLead, colLead);
== KeyEvent.VK_SLASH) && (evt.getModifiers() == InputEvent.CTRL_MASK)) { table.selectAll();
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
&& evt.isControlDown())
&& (evt.getModifiers() == InputEvent.CTRL_MASK))
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
else if (evt.getKeyCode() == KeyEvent.VK_SPACE && (evt.getModifiers() == InputEvent.CTRL_MASK)) { table.changeSelection(rowLead, colLead, true, false); } table.scrollRectToVisible (table.getCellRect(rowModel.getLeadSelectionIndex(), colModel.getLeadSelectionIndex(), false));
public void keyPressed(KeyEvent evt) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; int colLead = colMod...
} else if (children.getClass().isArray())
} else if (children != null && children.getClass().isArray())
public static void createChildren(DefaultMutableTreeNode parent, Object children) { if (children instanceof Hashtable) { Hashtable tab = (Hashtable) children; Enumeration e = tab.keys(); while (e.hasMoreElements()) { ...
JTree.this.repaint();
public void valueChanged(TreeSelectionEvent ev) { TreeSelectionEvent rewritten = (TreeSelectionEvent) ev.cloneWithSource(JTree.this); fireValueChanged(rewritten); }
}
private void doExpandParents(TreePath path, boolean state) { TreePath parent = path.getParentPath(); if (isExpanded(parent)) return; if (parent != null) doExpandParents(parent, false); nodeStates.put(path, state ? EXPANDED : COLLAPSED); }
return selectionModel.isRowSelected(row);
return selectionModel.isPathSelected(getPathForRow(row));
public boolean isRowSelected(int row) { return selectionModel.isRowSelected(row); }
while (parent != null)
if (parent != null)
protected void setExpandedState(TreePath path, boolean state) { if (path == null) return; TreePath parent = path.getParentPath(); try { while (parent != null) checkExpandParents(parent); } catch (ExpandVetoException e) { // Expansion vetoed. return; } doExpandParents(path, s...
revalidate(); repaint();
public void setSelectionModel(TreeSelectionModel model) { if (selectionModel == model) return; TreeSelectionModel oldValue = selectionModel; selectionModel = model; firePropertyChange(SELECTION_MODEL_PROPERTY, oldValue, model); }
k += ((String)hm.getSelectedValue()).charAt(7);
if (((String)hm.getSelectedValue()).length() > 7) k += ((String)hm.getSelectedValue()).charAt(9); else k += ((String)hm.getSelectedValue()).charAt(7);
private void showHexMap() { JPanel srp = new JPanel(); srp.setLayout(new BorderLayout()); DefaultListModel listModel = new DefaultListModel(); StringBuffer sb = new StringBuffer(); // we will use a collator here so that we can take advantage of the locales Collator collator = Collator.g...
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); p.setBackground(defaults.getColor("Panel.background"));
public void installDefaults(JPanel p) { p.setOpaque(true); }
return 80;
return HTTPConnection.HTTP_PORT;
protected int getDefaultPort() { return 80; }
protected URLConnection openConnection (URL url) throws IOException
public URLConnection openConnection(URL url) throws IOException
protected URLConnection openConnection (URL url) throws IOException { return new Connection (url); }
return new Connection (url);
return new HTTPURLConnection(url);
protected URLConnection openConnection (URL url) throws IOException { return new Connection (url); }
setTitle();
setSessionTitle();
public void addSessionView(String tabText,Session sessionView) { final Session session = sessionView; if (hideTabBar && sessionPane.getTabCount() == 0 && !embedded) { this.getContentPane().add(session, BorderLayout.CENTER); session.addSessionListener(this); session.resizeMe(); ...
setTitle();
if (count == 0) setSessionTitle();
private void jbInit() throws Exception { this.getContentPane().setLayout(borderLayout1); // update the frame sequences frameSeq = sequence++; sessionPane.setBorder(BorderFactory.createEtchedBorder()); sessionPane.setBounds(new Rectangle(78, 57, 5, 5)); sessionPane.setOpaque(true); ...
setTitle();
setSessionTitle();
private void nextSession() { final int index = sessionPane.getSelectedIndex(); sessionPane.setForegroundAt(index,Color.black); sessionPane.setIconAt(index,unfocused); SwingUtilities.invokeLater(new Runnable() { public void run() { int index1 = index; if (index1 < ses...
setTitle();
setSessionTitle();
public void run() { int index1 = index; if (index1 < sessionPane.getTabCount() - 1) { sessionPane.setSelectedIndex(++index1); sessionPane.setForegroundAt(index1,Color.blue); sessionPane.setIconAt(index1,focused); } else { ...
setTitle();
setSessionTitle();
public void onSessionChanged(SessionChangeEvent changeEvent) { Session ses = (Session)changeEvent.getSource(); switch (changeEvent.getState()) { case STATE_CONNECTED: final String d = ses.getAllocDeviceName(); if (d != null) { System.out.println(changeEvent.getSt...
setTitle();
setSessionTitle();
private void prevSession() { final int index = sessionPane.getSelectedIndex(); sessionPane.setForegroundAt(index,Color.black); sessionPane.setIconAt(index,unfocused); SwingUtilities.invokeLater(new Runnable() { public void run() { int index1 = index; if (index1 == 0)...
setTitle();
setSessionTitle();
public void run() { int index1 = index; if (index1 == 0) { sessionPane.setSelectedIndex(sessionPane.getTabCount() - 1); sessionPane.setForegroundAt(sessionPane.getSelectedIndex(),Color.blue); sessionPane.setIconAt(sessionPane.getSelectedIndex(),fo...
setTitle();
setSessionTitle();
public void stateChanged(ChangeEvent e) { JTabbedPane p = (JTabbedPane)e.getSource(); p.setForegroundAt(selectedIndex,Color.black); p.setIconAt(selectedIndex,unfocused); Session sg = (Session)p.getComponentAt(selectedIndex); sg.setVisible(false); sg = (Session)p.getSelectedComponent(); ...
firePropertyChange(INVERTED_CHANGED_PROPERTY, oldInverted, isInverted);
firePropertyChange("inverted", oldInverted, isInverted);
public void setInverted(boolean inverted) { if (isInverted != inverted) { boolean oldInverted = isInverted; isInverted = inverted; firePropertyChange(INVERTED_CHANGED_PROPERTY, oldInverted, isInverted); } }
firePropertyChange(LABEL_TABLE_CHANGED_PROPERTY, oldTable, labelTable);
firePropertyChange("labelTable", oldTable, labelTable);
public void setLabelTable(Dictionary table) { if (table != labelTable) { Dictionary oldTable = labelTable; labelTable = table; firePropertyChange(LABEL_TABLE_CHANGED_PROPERTY, oldTable, labelTable); } }
firePropertyChange(MAJOR_TICK_SPACING_CHANGED_PROPERTY, oldSpacing,
firePropertyChange("majorTickSpacing", oldSpacing,
public void setMajorTickSpacing(int spacing) { if (majorTickSpacing != spacing) { int oldSpacing = majorTickSpacing; majorTickSpacing = spacing; firePropertyChange(MAJOR_TICK_SPACING_CHANGED_PROPERTY, oldSpacing, majorTickSpacing); } }
firePropertyChange(MINOR_TICK_SPACING_CHANGED_PROPERTY, oldSpacing,
firePropertyChange("minorTickSpacing", oldSpacing,
public void setMinorTickSpacing(int spacing) { if (minorTickSpacing != spacing) { int oldSpacing = minorTickSpacing; minorTickSpacing = spacing; firePropertyChange(MINOR_TICK_SPACING_CHANGED_PROPERTY, oldSpacing, minorTickSpacing); } }
firePropertyChange(MODEL_CHANGED_PROPERTY, oldModel, sliderModel);
firePropertyChange("model", oldModel, sliderModel);
public void setModel(BoundedRangeModel model) { // I didn't do the null pointer check on purpose. // If you try it with Sun's, it'll go ahead and set it to null // and bork the next time it tries to access the model. if (model != sliderModel) { BoundedRangeModel oldModel = sliderModel; sliderModel =...
firePropertyChange(ORIENTATION_CHANGED_PROPERTY, oldOrientation,
firePropertyChange("orientation", oldOrientation,
public void setOrientation(int orientation) { if (orientation != VERTICAL && orientation != HORIZONTAL) throw new IllegalArgumentException("orientation must be one of: VERTICAL, HORIZONTAL"); if (orientation != this.orientation) { int oldOrientation = this.orientation; this.orientation = orientation;...
firePropertyChange(PAINT_LABELS_CHANGED_PROPERTY, oldPaintLabels, paintLabels);
firePropertyChange("paintLabels", oldPaintLabels, paintLabels);
public void setPaintLabels(boolean paint) { if (paint != paintLabels) { boolean oldPaintLabels = paintLabels; paintLabels = paint; firePropertyChange(PAINT_LABELS_CHANGED_PROPERTY, oldPaintLabels, paintLabels); } }
firePropertyChange(PAINT_TICKS_CHANGED_PROPERTY, oldPaintTicks, paintTicks);
firePropertyChange("paintTicks", oldPaintTicks, paintTicks);
public void setPaintTicks(boolean paint) { if (paint != paintTicks) { boolean oldPaintTicks = paintTicks; paintTicks = paint; firePropertyChange(PAINT_TICKS_CHANGED_PROPERTY, oldPaintTicks, paintTicks); } }
jComponent.add(((SwingMenuItemPeer)item.getPeer()).jComponent);
jComponent.add(((SwingBaseMenuItemPeer)item.getPeer()).jComponent);
public void addItem(MenuItem item) { item.addNotify(); jComponent.add(((SwingMenuItemPeer)item.getPeer()).jComponent); }
constraints.setWidth (Spring.constant(c.getMinimumSize().width,
} constraints.setWidth(Spring.constant(c.getMinimumSize().width,
public SpringLayout.Constraints getConstraints(Component c) { Constraints constraints = (Constraints) constraintsMap.get(c); if (constraints == null) { Container parent = c.getParent(); constraints = new Constraints(); if (parent != null) { constraints.setX ...
}
public SpringLayout.Constraints getConstraints(Component c) { Constraints constraints = (Constraints) constraintsMap.get(c); if (constraints == null) { Container parent = c.getParent(); constraints = new Constraints(); if (parent != null) { constraints.setX ...
MediaTracker tracker = new MediaTracker(this); tracker.addImage(image,0); try { tracker.waitForAll(); } catch(Exception e) { System.out.println(e.getMessage()); }
protected void initialize(ImageIcon iimage) { image = iimage.getImage(); // if no image, return if (image == null) { throw new IllegalArgumentException("Image specified is invalid."); }// System.out.println(" here in splash ");// MediaTracker tracker = new MediaTracker(this);// tra...
Dimension s = new Dimension(image.getWidth(this) + 2, image.getHeight(this) + 2); dialog.setSize(s);
Dimension s = new Dimension(image.getWidth(this) + 2, image.getHeight(this) + 2); setSize(s); dialog.setLayout(new BorderLayout()); dialog.setSize(s);
protected void initialize(ImageIcon iimage) { image = iimage.getImage(); // if no image, return if (image == null) { throw new IllegalArgumentException("Image specified is invalid."); }// System.out.println(" here in splash ");// MediaTracker tracker = new MediaTracker(this);// tra...
dialog.add(this); dialog.validate();
dialog.add(this,BorderLayout.CENTER);
protected void initialize(ImageIcon iimage) { image = iimage.getImage(); // if no image, return if (image == null) { throw new IllegalArgumentException("Image specified is invalid."); }// System.out.println(" here in splash ");// MediaTracker tracker = new MediaTracker(this);// tra...
dialog.validate();
protected void initialize(ImageIcon iimage) { image = iimage.getImage(); // if no image, return if (image == null) { throw new IllegalArgumentException("Image specified is invalid."); }// System.out.println(" here in splash ");// MediaTracker tracker = new MediaTracker(this);// tra...
Dimension size = getSize();
int inset = 5; int height = 14; Dimension size = getSize();
public synchronized void paint(Graphics g) { Dimension size = getSize();// System.out.println(" here in paint "); if(offScreenBuffer == null) { offScreenBuffer = createImage(size.width,size.height); offScreenBufferGraphics = offScreenBuffer.getGraphics(); } offScreenBufferGraphics.setColor(Color.black); ...
offScreenBufferGraphics.setColor(Color.black); offScreenBufferGraphics.drawRect(0,0,size.width - 1,size.height - 1);
offScreenBufferGraphics.drawImage(image,1,1,this);
public synchronized void paint(Graphics g) { Dimension size = getSize();// System.out.println(" here in paint "); if(offScreenBuffer == null) { offScreenBuffer = createImage(size.width,size.height); offScreenBufferGraphics = offScreenBuffer.getGraphics(); } offScreenBufferGraphics.setColor(Color.black); ...
offScreenBufferGraphics.drawImage(image,1,1,this);
offScreenBufferGraphics.setColor(new Color(204,204,255)); offScreenBufferGraphics.draw3DRect(0,0,size.width - 1,size.height - 1,true);
public synchronized void paint(Graphics g) { Dimension size = getSize();// System.out.println(" here in paint "); if(offScreenBuffer == null) { offScreenBuffer = createImage(size.width,size.height); offScreenBufferGraphics = offScreenBuffer.getGraphics(); } offScreenBufferGraphics.setColor(Color.black); ...
offScreenBufferGraphics.draw3DRect(4,image.getHeight(this) - 16, image.getWidth(this) - 8,15,true);
offScreenBufferGraphics.setColor(new Color(204,204,255).darker()); offScreenBufferGraphics.fill3DRect(inset - 1, image.getHeight(this) - (height +2), image.getWidth(this) - (inset *2), height + 1, false);
public synchronized void paint(Graphics g) { Dimension size = getSize();// System.out.println(" here in paint "); if(offScreenBuffer == null) { offScreenBuffer = createImage(size.width,size.height); offScreenBufferGraphics = offScreenBuffer.getGraphics(); } offScreenBufferGraphics.setColor(Color.black); ...
offScreenBufferGraphics.setColor(new Color(206,206,229)); offScreenBufferGraphics.fillRect(5,image.getHeight(this) - 15, ((image.getWidth(this) - 10) / steps) * progress,14); g.drawImage(offScreenBuffer,0,0,this);
offScreenBufferGraphics.setColor(new Color(204,204,255)); offScreenBufferGraphics.fillRect(inset, image.getHeight(this) - (height +1), ((image.getWidth(this) - (inset * 2)) / steps) * progress, height);
public synchronized void paint(Graphics g) { Dimension size = getSize();// System.out.println(" here in paint "); if(offScreenBuffer == null) { offScreenBuffer = createImage(size.width,size.height); offScreenBufferGraphics = offScreenBuffer.getGraphics(); } offScreenBufferGraphics.setColor(Color.black); ...
SwingToolkit.add(textField, this); SwingToolkit.copyAwtProperties(textField, this);
this.textField = textField; SwingToolkit.add(textField, this); SwingToolkit.copyAwtProperties(textField, this);
public SwingTextFieldPeer(TextField textField) { SwingToolkit.add(textField, this); SwingToolkit.copyAwtProperties(textField, this); setText(textField.getText()); setColumns(textField.getColumns()); setEditable(textField.isEditable()); }
"CheckBox.background", new ColorUIResource(light),
"CheckBox.background", new ColorUIResource(new Color(204, 204, 204)),
protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractUndoa...
return BasicIconFactory.getCheckBoxIcon();
return BasicIconFactory.getMenuItemCheckIcon();
protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractUndoa...
new ColorUIResource(darkShadow),
new ColorUIResource(new Color(16, 16, 16)),
protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractUndoa...
"CheckBoxMenuItem.checkIcon", BasicIconFactory.getCheckBoxMenuItemIcon(),
"CheckBoxMenuItem.checkIcon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return BasicIconFactory.getMenuItemCheckIcon(); } },
protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractUndoa...
return BasicIconFactory.getCheckBoxIcon();
return BasicIconFactory.getMenuItemCheckIcon();
public Object createValue(UIDefaults def) { return BasicIconFactory.getCheckBoxIcon(); }
public Object createValue(UIDefaults table) { Color lineColor = new Color(238, 238, 238); Border inner = BorderFactory.createLineBorder(lineColor, 1); Color shadowInner = new Color(184, 207, 229); Color shadowOuter = new Color(122, 138, 153); Border outer = BorderFactory.createBevelBorder(BevelBorder.RAISED, Color.WHIT...
public Object createValue(UIDefaults def) { return BasicIconFactory.getCheckBoxIcon(); }
public Object createValue(UIDefaults table) { Color lineColor = new Color(238, 238, 238); Border inner = BorderFactory.createLineBorder(lineColor, 1); Color shadowInner = new Color(184, 207, 229); Color shadowOuter = new Color(122, 138, 153); Border outer = BorderFactory.createBevelBorder(BevelBorder.RAISED,...
return new IconUIResource(BasicIconFactory.createEmptyFrameIcon());
return BasicIconFactory.getMenuItemCheckIcon();
public Object createValue(UIDefaults def) { return new IconUIResource(BasicIconFactory.createEmptyFrameIcon()); }
public Object createValue(UIDefaults def) { return BasicIconFactory.getRadioButtonIcon(); }
public Object createValue(UIDefaults table) { Color lineColor = new Color(238, 238, 238); Border inner = BorderFactory.createLineBorder(lineColor, 1); Color shadowInner = new Color(184, 207, 229); Color shadowOuter = new Color(122, 138, 153); Border outer = BorderFactory.createBevelBorder(BevelBorder.RAISED, Color.WHIT...
public Object createValue(UIDefaults def) { return BasicIconFactory.getRadioButtonIcon(); }
public FSEntry addDirectory(String name) throws IOException {
public synchronized FSEntry addDirectory(String name) throws IOException {
public FSEntry addDirectory(String name) throws IOException { if(isReadOnly()) throw new IOException("Filesystem or directory is mounted read-only!"); //create a new iNode for the file //TODO: access rights, file type, UID and GID should be passed through the FSDirectory interface INode newINode; Ext2Direct...
synchronized(parentINode) { parentINode.setLinksCount( parentINode.getLinksCount()+1 ); }
parentINode.setLinksCount( parentINode.getLinksCount()+1 );
public FSEntry addDirectory(String name) throws IOException { if(isReadOnly()) throw new IOException("Filesystem or directory is mounted read-only!"); //create a new iNode for the file //TODO: access rights, file type, UID and GID should be passed through the FSDirectory interface INode newINode; Ext2Direct...
private void addDirectoryRecord(Ext2DirectoryRecord dr) throws IOException, FileSystemException{
private synchronized void addDirectoryRecord(Ext2DirectoryRecord dr) throws IOException, FileSystemException{
private void addDirectoryRecord(Ext2DirectoryRecord dr) throws IOException, FileSystemException{ Ext2File dir = new Ext2File(iNode); //read itself as a file //find the last directory record (if any) Ext2FSEntryIterator iterator = (Ext2FSEntryIterator)iterator(); Ext2DirectoryRecord rec=null; while(iterator.hasNe...