rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
if (log.isTraceEnabled()) { log.trace(this + " added transactionally " + ref + " in memory"); } | if (trace) { log.trace(this + " added transactionally " + ref + " in memory"); } | public void addReference(MessageReference ref, Transaction tx) throws Throwable { if (log.isTraceEnabled()) { log.trace(this + " adding " + ref + "transactionally in transaction: " + tx); } if (ref.isReliable() && !acceptReliableMessages) { // this transaction has no chance to succeed, since... |
if (log.isTraceEnabled()) { log.trace(this + " cancelling " + del + " in memory"); } | if (trace) { log.trace(this + " cancelling " + del + " in memory"); } | public void cancelDelivery(Delivery del) throws Throwable { if (log.isTraceEnabled()) { log.trace(this + " cancelling " + del + " in memory"); } boolean removed = deliveries.remove(del); if (!removed) { //This is ok //This can happen if the message is cancelled befor... |
if (log.isTraceEnabled()) { log.trace(this + " can't find delivery " + del + " in state so not replacing messsage ref"); } | if (trace) { log.trace(this + " can't find delivery " + del + " in state so not replacing messsage ref"); } | public void cancelDelivery(Delivery del) throws Throwable { if (log.isTraceEnabled()) { log.trace(this + " cancelling " + del + " in memory"); } boolean removed = deliveries.remove(del); if (!removed) { //This is ok //This can happen if the message is cancelled befor... |
if (log.isTraceEnabled()) { log.trace(this + " added " + del.getReference() + " back into state"); } | if (trace) { log.trace(this + " added " + del.getReference() + " back into state"); } | public void cancelDelivery(Delivery del) throws Throwable { if (log.isTraceEnabled()) { log.trace(this + " cancelling " + del + " in memory"); } boolean removed = deliveries.remove(del); if (!removed) { //This is ok //This can happen if the message is cancelled befor... |
if (log.isTraceEnabled()) { log.trace(this + ": the non-recoverable state has " + delivering.size() + " messages being delivered"); } | if (trace) { log.trace(this + ": the non-recoverable state has " + delivering.size() + " messages being delivered"); } | public List delivering(Filter filter) { List delivering = new ArrayList(); synchronized (deliveries) { for(Iterator i = deliveries.iterator(); i.hasNext(); ) { Delivery d = (Delivery)i.next(); MessageReference r = d.getReference(); // TODO: I need to ... |
if (log.isTraceEnabled()) { log.trace(this + " peeking the oldest message in memory returns " + result); } | if (trace) { log.trace(this + " peeking the oldest message in memory returns " + result); } | public MessageReference peekFirst() { MessageReference result = (MessageReference)messageRefs.peekFirst(); if (log.isTraceEnabled()) { log.trace(this + " peeking the oldest message in memory returns " + result); } return result; } |
if (log.isTraceEnabled()) { log.trace(this + " removing the oldest message in memory returns " + result); } | if (trace) { log.trace(this + " removing the oldest message in memory returns " + result); } | public MessageReference removeFirst() { MessageReference result = (MessageReference)messageRefs.removeFirst(); if (log.isTraceEnabled()) { log.trace(this + " removing the oldest message in memory returns " + result); } return result; } |
if (log.isTraceEnabled()) { log.trace(this + ": " + r + " NOT accepted by filter so won't add to list"); } | if (trace) { log.trace(this + ": " + r + " NOT accepted by filter so won't add to list"); } | public List undelivered(Filter filter) { List undelivered = new ArrayList(); synchronized(messageRefs) { Iterator iter = messageRefs.getAll().iterator(); while (iter.hasNext()) { MessageReference r = (MessageReference)iter.next(); // TODO: I need to dere... |
if (log.isTraceEnabled()) { log.trace(this + ": undelivered() returns a list of " + undelivered.size() + " undelivered memory messages"); } | if (trace) { log.trace(this + ": undelivered() returns a list of " + undelivered.size() + " undelivered memory messages"); } | public List undelivered(Filter filter) { List undelivered = new ArrayList(); synchronized(messageRefs) { Iterator iter = messageRefs.getAll().iterator(); while (iter.hasNext()) { MessageReference r = (MessageReference)iter.next(); // TODO: I need to dere... |
public void paintImmediately(Rectangle r) { paintImmediately((int)r.getX(), (int)r.getY(), (int)r.getWidth(), (int)r.getHeight()); | public void paintImmediately(int x, int y, int w, int h) { | public void paintImmediately(Rectangle r) { /// Paint the specified region now. paintImmediately((int)r.getX(), (int)r.getY(), (int)r.getWidth(), (int)r.getHeight()); } |
return new PlainDocument(); | return new PlainDocument() { public void insertString(int offset, String str, AttributeSet a) throws BadLocationException { if (str.indexOf('\n') == -1) super.insertString(offset, str, a); } }; | protected Document createDefaultModel() { return new PlainDocument(); } |
if (text == null || text.length() == 0) return; DefaultDocumentEvent event = new DefaultDocumentEvent(offset, text.length(), DocumentEvent.EventType.INSERT); try { writeLock(); UndoableEdit undo = content.insertString(offset, text); if (undo != null) event.addEdit(undo); insertUpdate(event, attributes); fireInsertUp... | if (documentFilter != null) documentFilter.insertString(getBypass(), offset, text, attributes); else insertStringImpl(offset, text, attributes); | public void insertString(int offset, String text, AttributeSet attributes) throws BadLocationException { // Just return when no text to insert was given. if (text == null || text.length() == 0) return; DefaultDocumentEvent event = new DefaultDocumentEvent(offset, text.length(), Documen... |
finally { writeUnlock(); } } | public void insertString(int offset, String text, AttributeSet attributes) throws BadLocationException { // Just return when no text to insert was given. if (text == null || text.length() == 0) return; DefaultDocumentEvent event = new DefaultDocumentEvent(offset, text.length(), Documen... | |
throws NotImplementedException | public int[] getRowsForPaths(TreePath[] paths) throws NotImplementedException { return null; // TODO } | |
return null; | int[] rows = new int[paths.length]; for (int i = 0; i < rows.length; i++) rows[i] = getRowForPath(paths[i]); return rows; | public int[] getRowsForPaths(TreePath[] paths) throws NotImplementedException { return null; // TODO } |
if ("createSessionDelegate".equals(methodName)) | if ("createConnectionDelegate".equals(methodName)) { if (log.isTraceEnabled()) log.trace("creating resource manager"); ConnectionDelegate connectionDelegate = (ConnectionDelegate)invocation.invokeNext(); ResourceManager rm = new ResourceManager(connectionDelegate); JMSInvocationHandler handler = (JMSInvocationHandler... | public Object invoke(Invocation invocation) throws Throwable { if (invocation instanceof MethodInvocation) { MethodInvocation mi = (MethodInvocation)invocation; String methodName = mi.getMethod().getName(); if ("createSessionDelegate".equals(methodName)) { ... |
log.debug("createSessionDelegate"); | if (log.isTraceEnabled()) log.trace("createSessionDelegate"); | public Object invoke(Invocation invocation) throws Throwable { if (invocation instanceof MethodInvocation) { MethodInvocation mi = (MethodInvocation)invocation; String methodName = mi.getMethod().getName(); if ("createSessionDelegate".equals(methodName)) { ... |
log.debug("Transacted: " + transacted); | if (log.isTraceEnabled()) log.trace("Transacted: " + transacted); | public Object invoke(Invocation invocation) throws Throwable { if (invocation instanceof MethodInvocation) { MethodInvocation mi = (MethodInvocation)invocation; String methodName = mi.getMethod().getName(); if ("createSessionDelegate".equals(methodName)) { ... |
log.debug("Session is transacted"); | if (log.isTraceEnabled()) log.trace("Session is transacted"); | public Object invoke(Invocation invocation) throws Throwable { if (invocation instanceof MethodInvocation) { MethodInvocation mi = (MethodInvocation)invocation; String methodName = mi.getMethod().getName(); if ("createSessionDelegate".equals(methodName)) { ... |
Object Xid = ResourceManager.instance().createLocalTx(); | JMSInvocationHandler handler = ((JMSMethodInvocation)invocation).getHandler(); ResourceManager rm = (ResourceManager)handler.getMetaData().getMetaData(JMSAdvisor.JMS, JMSAdvisor.RESOURCE_MANAGER); Object Xid = rm.createLocalTx(); | public Object invoke(Invocation invocation) throws Throwable { if (invocation instanceof MethodInvocation) { MethodInvocation mi = (MethodInvocation)invocation; String methodName = mi.getMethod().getName(); if ("createSessionDelegate".equals(methodName)) { ... |
log.debug("Created tx"); | if (log.isTraceEnabled()) log.trace("Created tx"); | public Object invoke(Invocation invocation) throws Throwable { if (invocation instanceof MethodInvocation) { MethodInvocation mi = (MethodInvocation)invocation; String methodName = mi.getMethod().getName(); if ("createSessionDelegate".equals(methodName)) { ... |
log.debug("Added Xid to meta-data"); | if (log.isTraceEnabled()) log.trace("Added Xid to meta-data"); | public Object invoke(Invocation invocation) throws Throwable { if (invocation instanceof MethodInvocation) { MethodInvocation mi = (MethodInvocation)invocation; String methodName = mi.getMethod().getName(); if ("createSessionDelegate".equals(methodName)) { ... |
} else if ("close".equals(methodName)) { } | } | public Object invoke(Invocation invocation) throws Throwable { if (invocation instanceof MethodInvocation) { MethodInvocation mi = (MethodInvocation)invocation; String methodName = mi.getMethod().getName(); if ("createSessionDelegate".equals(methodName)) { ... |
log.debug("commit"); | if (log.isTraceEnabled()) log.trace("commit"); | public Object invoke(Invocation invocation) throws Throwable { if (invocation instanceof MethodInvocation) { MethodInvocation mi = (MethodInvocation)invocation; String methodName = mi.getMethod().getName(); if ("createSessionDelegate".equals(methodName)) { ... |
SessionDelegate sd = (SessionDelegate)getDelegate(mi); Object newXid = ResourceManager.instance().commit(Xid, sd); setMetaData(mi, JMSAdvisor.XID, newXid); | ResourceManager rm = (ResourceManager)getHandler(invocation).getParent().getMetaData().getMetaData(JMSAdvisor.JMS, JMSAdvisor.RESOURCE_MANAGER); Object newXid = rm.commit(Xid); setMetaData(mi, JMSAdvisor.XID, newXid); return null; | public Object invoke(Invocation invocation) throws Throwable { if (invocation instanceof MethodInvocation) { MethodInvocation mi = (MethodInvocation)invocation; String methodName = mi.getMethod().getName(); if ("createSessionDelegate".equals(methodName)) { ... |
log.debug("rollback"); Object Xid = mi.getMetaData().getMetaData(JMSAdvisor.JMS, JMSAdvisor.XID); Object newXid = ResourceManager.instance().rollback(Xid); | if (log.isTraceEnabled()) log.trace("rollback"); Object Xid = mi.getMetaData().getMetaData(JMSAdvisor.JMS, JMSAdvisor.XID); ResourceManager rm = (ResourceManager)getHandler(invocation).getParent().getMetaData().getMetaData(JMSAdvisor.JMS, JMSAdvisor.RESOURCE_MANAGER); Object newXid = rm.rollback(Xid); | public Object invoke(Invocation invocation) throws Throwable { if (invocation instanceof MethodInvocation) { MethodInvocation mi = (MethodInvocation)invocation; String methodName = mi.getMethod().getName(); if ("createSessionDelegate".equals(methodName)) { ... |
if (log.isTraceEnabled()) { log.trace("send"); } | if (log.isTraceEnabled()) log.trace("send"); | public Object invoke(Invocation invocation) throws Throwable { if (invocation instanceof MethodInvocation) { MethodInvocation mi = (MethodInvocation)invocation; String methodName = mi.getMethod().getName(); if ("createSessionDelegate".equals(methodName)) { ... |
if (log.isTraceEnabled()) { log.trace("Session is transacted, storing mesage until commit"); } | if (log.isTraceEnabled()) log.trace("Session is transacted, storing mesage until commit"); | public Object invoke(Invocation invocation) throws Throwable { if (invocation instanceof MethodInvocation) { MethodInvocation mi = (MethodInvocation)invocation; String methodName = mi.getMethod().getName(); if ("createSessionDelegate".equals(methodName)) { ... |
ResourceManager.instance().addMessage(Xid, m); | ResourceManager rm = (ResourceManager)getHandler(invocation).getParent().getParent().getMetaData().getMetaData(JMSAdvisor.JMS, JMSAdvisor.RESOURCE_MANAGER); rm.addMessage(Xid, m); | public Object invoke(Invocation invocation) throws Throwable { if (invocation instanceof MethodInvocation) { MethodInvocation mi = (MethodInvocation)invocation; String methodName = mi.getMethod().getName(); if ("createSessionDelegate".equals(methodName)) { ... |
else if ("recover".equals(methodName)) { } | else if ("acknowledge".equals(methodName)) { if (log.isTraceEnabled()) log.trace("acknowledge"); Object Xid = mi.getMetaData(JMSAdvisor.JMS, JMSAdvisor.XID); if (Xid == null) { if (log.isTraceEnabled()) { log.trace("Session is not transacted, acking message now"); } } else { String messageID = (String)mi.getArgument... | public Object invoke(Invocation invocation) throws Throwable { if (invocation instanceof MethodInvocation) { MethodInvocation mi = (MethodInvocation)invocation; String methodName = mi.getMethod().getName(); if ("createSessionDelegate".equals(methodName)) { ... |
public Class getCategory() | public final Class getCategory() | public Class getCategory() { return MultipleDocumentHandling.class; } |
public String getName() | public final String getName() | public String getName() { return "multiple-document-handling"; } |
int stepId = TextUtils.parseInt((String) args.get("stepId")); WorkflowContext context = (WorkflowContext) transientVars.get("context"); WorkflowEntry entry = (WorkflowEntry) transientVars.get("entry"); WorkflowStore store = (WorkflowStore) transientVars.get("store"); List currentSteps = store.findCurrentSteps(entry.get... | IsUserOwnerCondition isOwnerCondition = new IsUserOwnerCondition(); | public boolean passesCondition(Map transientVars, Map args, PropertySet ps) throws StoreException { int stepId = TextUtils.parseInt((String) args.get("stepId")); WorkflowContext context = (WorkflowContext) transientVars.get("context"); WorkflowEntry entry = (WorkflowEntry) transientVars.get("en... |
if (stepId == 0) { for (Iterator iterator = currentSteps.iterator(); iterator.hasNext();) { Step step = (Step) iterator.next(); if (context.getCaller().equals(step.getOwner())) { return false; } } } else { for (Iterator iterator = currentSteps.iterator(); iterator.hasNext();) { Step step = (Step) iterator.next(); if ... | return !(isOwnerCondition.passesCondition(transientVars, args, ps)); | public boolean passesCondition(Map transientVars, Map args, PropertySet ps) throws StoreException { int stepId = TextUtils.parseInt((String) args.get("stepId")); WorkflowContext context = (WorkflowContext) transientVars.get("context"); WorkflowEntry entry = (WorkflowEntry) transientVars.get("en... |
boolean allWhitespace = true; | public static List stripInlineContent(Context c, List inlineContent) { LinkedList stripped = new LinkedList(); LinkedList pendingStylePushes = new LinkedList(); boolean collapse = false; //boolean allWhitespace = true; for (Iterator i = inlineContent.iterator(); i.hasNext();) { ... | |
stripped.addAll(pendingStylePushes); pendingStylePushes.clear(); stripped.add(tc); collapse = collapseNext; | allWhitespace = false; | public static List stripInlineContent(Context c, List inlineContent) { LinkedList stripped = new LinkedList(); LinkedList pendingStylePushes = new LinkedList(); boolean collapse = false; //boolean allWhitespace = true; for (Iterator i = inlineContent.iterator(); i.hasNext();) { ... |
allWhitespace = false; | public static List stripInlineContent(Context c, List inlineContent) { LinkedList stripped = new LinkedList(); LinkedList pendingStylePushes = new LinkedList(); boolean collapse = false; //boolean allWhitespace = true; for (Iterator i = inlineContent.iterator(); i.hasNext();) { ... | |
if (allWhitespace) { stripTextContent(stripped); } | public static List stripInlineContent(Context c, List inlineContent) { LinkedList stripped = new LinkedList(); LinkedList pendingStylePushes = new LinkedList(); boolean collapse = false; //boolean allWhitespace = true; for (Iterator i = inlineContent.iterator(); i.hasNext();) { ... | |
dbf.setValidating(false); | XMLResource createXMLResource(XMLResource target) { Source input = null; DOMResult output = null; TransformerFactory xformFactory = null; Transformer idTransform = null; XMLReader xmlReader = null; long st = 0L; xmlReader = XMLResource... | |
JTree.this.repaint(); | TreePath[] changed = ev.getPaths(); for (int i = 0; i < changed.length; i++) { repaint(getPathBounds(changed[i])); } | public void valueChanged(TreeSelectionEvent ev) { TreeSelectionEvent rewritten = (TreeSelectionEvent) ev.cloneWithSource(JTree.this); fireValueChanged(rewritten); JTree.this.repaint(); } |
if (path == null) | if (path == null || isExpanded(path)) | public void expandPath(TreePath path) { // Don't expand if path is null if (path == null) return; try { fireTreeWillExpand(path); } catch (ExpandVetoException ev) { // We do nothing if attempt has been vetoed. } setExpandedState(path, true); fireTreeExpanded(p... |
return leadSelectionPath; | if (selectionModel == null) return null; else return selectionModel.getLeadSelectionPath(); | public TreePath getLeadSelectionPath() { return leadSelectionPath; } |
Object[] oPath = path.getPath(); TreePath temp = new TreePath(oPath[0]); boolean stop = false; int i = 1; while (!stop) { while (isVisible(temp)) if (i < oPath.length) temp = temp.pathByAddingChild(oPath[i++]); else { stop = true; break; } makeVisible(temp); } | public void scrollPathToVisible(TreePath path) { if (path == null) return; Object[] oPath = path.getPath(); TreePath temp = new TreePath(oPath[0]); boolean stop = false; int i = 1; while (!stop) { while (isVisible(temp)) if (i < oPath.length) temp = temp.pathByA... | |
revalidate(); repaint(); | public void scrollPathToVisible(TreePath path) { if (path == null) return; Object[] oPath = path.getPath(); TreePath temp = new TreePath(oPath[0]); boolean stop = false; int i = 1; while (!stop) { while (isVisible(temp)) if (i < oPath.length) temp = temp.pathByA... | |
if (leadSelectionPath == path) | if (selectionModel != null) { TreePath oldValue = selectionModel.getLeadSelectionPath(); if (path.equals(oldValue)) | public void setLeadSelectionPath(TreePath path) { if (leadSelectionPath == path) return; TreePath oldValue = leadSelectionPath; leadSelectionPath = path; firePropertyChange(LEAD_SELECTION_PATH_PROPERTY, oldValue, path); } |
TreePath oldValue = leadSelectionPath; leadSelectionPath = path; | if (path != null) { repaint(getPathBounds(path)); selectionModel.addSelectionPath(path); } if (oldValue!=null) repaint(getPathBounds(oldValue)); | public void setLeadSelectionPath(TreePath path) { if (leadSelectionPath == path) return; TreePath oldValue = leadSelectionPath; leadSelectionPath = path; firePropertyChange(LEAD_SELECTION_PATH_PROPERTY, oldValue, path); } |
} | public void setLeadSelectionPath(TreePath path) { if (leadSelectionPath == path) return; TreePath oldValue = leadSelectionPath; leadSelectionPath = path; firePropertyChange(LEAD_SELECTION_PATH_PROPERTY, oldValue, path); } | |
public void valueChanged(TreeSelectionEvent event); | void valueChanged(TreeSelectionEvent event); | public void valueChanged(TreeSelectionEvent event); |
insureUniqueness(); | public void setSelectionPaths(TreePath[] paths) throws NotImplementedException { // TODO } | |
public void treeCollapsed(TreeExpansionEvent event); | void treeCollapsed(TreeExpansionEvent event); | public void treeCollapsed(TreeExpansionEvent event); |
public void treeExpanded(TreeExpansionEvent event); | void treeExpanded(TreeExpansionEvent event); | public void treeExpanded(TreeExpansionEvent event); |
public TreePath(Object element) | public TreePath(Object[] path) | public TreePath(Object element) { path = new Object[1]; path[0] = element; } |
path = new Object[1]; path[0] = element; | if (path == null) throw new IllegalArgumentException("Null 'path' not permitted."); this.path = new Object[path.length]; System.arraycopy(path, 0, this.path, 0, path.length); | public TreePath(Object element) { path = new Object[1]; path[0] = element; } |
BasicTreeUI.this.editingPath = null; BasicTreeUI.this.editingRow = -1; BasicTreeUI.this.editingComponent = null; BasicTreeUI.this.cellEditor = null; BasicTreeUI.this.tree.repaint(); | public void editingCanceled(ChangeEvent e) { } | |
BasicTreeUI.this.editingPath = null; BasicTreeUI.this.editingRow = -1; BasicTreeUI.this.editingComponent = null; BasicTreeUI.this.cellEditor = null; BasicTreeUI.this.tree.repaint(); | public void editingStopped(ChangeEvent e) { } | |
{ | public void keyPressed(KeyEvent e) { TreeModel mod = BasicTreeUI.this.tree.getModel(); TreePath start = BasicTreeUI.this.tree.getLeadSelectionPath(); Object last = null; if (start != null) last = start.getLastPathComponent(); if (last != null) { // DOWN, KP... | |
try { BasicTreeUI.this.tree.fireTreeWillExpand(newPath); } catch (ExpandVetoException ev) { } BasicTreeUI.this.tree.fireTreeExpanded(newPath); } | public void keyPressed(KeyEvent e) { TreeModel mod = BasicTreeUI.this.tree.getModel(); TreePath start = BasicTreeUI.this.tree.getLeadSelectionPath(); Object last = null; if (start != null) last = start.getLastPathComponent(); if (last != null) { // DOWN, KP... | |
try { BasicTreeUI.this.tree.fireTreeWillCollapse(path); } catch (ExpandVetoException ev) { } BasicTreeUI.this.tree.fireTreeCollapsed(path); } | public void keyPressed(KeyEvent e) { TreeModel mod = BasicTreeUI.this.tree.getModel(); TreePath start = BasicTreeUI.this.tree.getLeadSelectionPath(); Object last = null; if (start != null) last = start.getLastPathComponent(); if (last != null) { // DOWN, KP... | |
try { BasicTreeUI.this.tree.fireTreeWillExpand(path); } catch (ExpandVetoException ev) { } BasicTreeUI.this.tree.fireTreeExpanded(path); } | public void keyPressed(KeyEvent e) { TreeModel mod = BasicTreeUI.this.tree.getModel(); TreePath start = BasicTreeUI.this.tree.getLeadSelectionPath(); Object last = null; if (start != null) last = start.getLastPathComponent(); if (last != null) { // DOWN, KP... | |
Point click = e.getPoint(); int row = Math.round(click.y / BasicTreeUI.this.getRowHeight()); TreePath path = BasicTreeUI.this.getClosestPathForLocation(tree, click.x, click.y); if (path != null) { boolean inBounds = false; boolean cntlClick = false; Rectangle bounds = BasicTreeUI.this.getPathBounds( BasicTreeUI.this.t... | } | public void mouseClicked(MouseEvent e) { Point click = e.getPoint(); int row = Math.round(click.y / BasicTreeUI.this.getRowHeight()); TreePath path = BasicTreeUI.this.getClosestPathForLocation(tree, click.x, click.y); if (path != ... |
{ | { Point click = e.getPoint(); int row = Math.round(click.y / BasicTreeUI.this.getRowHeight()); TreePath path = BasicTreeUI.this.getClosestPathForLocation(tree, click.x, click.y); if (path != null) { boolean inBounds = false; boolean cntlClick = false; Rectangle bounds = BasicTreeUI.this.getPathBounds( BasicTreeUI.this... | public void mousePressed(MouseEvent e) { } |
} } | public void mousePressed(MouseEvent e) { } | |
cellEditor = createDefaultCellEditor(); currentCellRenderer = createDefaultCellRenderer(); | public BasicTreeUI() { drawingCache = new Hashtable(); cellEditor = createDefaultCellEditor(); currentCellRenderer = createDefaultCellRenderer(); nodeDimensions = createNodeDimensions(); rendererPane = createCellRendererPane(); configureLayoutCache(); propertyChangeListener = createPropertyChangeListener(); fo... | |
rendererPane = createCellRendererPane(); | public BasicTreeUI() { drawingCache = new Hashtable(); cellEditor = createDefaultCellEditor(); currentCellRenderer = createDefaultCellRenderer(); nodeDimensions = createNodeDimensions(); rendererPane = createCellRendererPane(); configureLayoutCache(); propertyChangeListener = createPropertyChangeListener(); fo... | |
createdRenderer = true; createdCellEditor = true; | public BasicTreeUI() { drawingCache = new Hashtable(); cellEditor = createDefaultCellEditor(); currentCellRenderer = createDefaultCellRenderer(); nodeDimensions = createNodeDimensions(); rendererPane = createCellRendererPane(); configureLayoutCache(); propertyChangeListener = createPropertyChangeListener(); fo... | |
if (isEditing(tree)) completeEditing(false, true, false); | public void cancelEditing(JTree tree) { // FIXME: not implemented } | |
completeEditing(false, true, false); | protected void completeEditing() { // FIXME: not implemented } | |
return new DefaultTreeCellEditor( tree, | if (currentCellRenderer != null) return new DefaultTreeCellEditor(tree, (DefaultTreeCellRenderer) currentCellRenderer, cellEditor); return new DefaultTreeCellEditor(tree, | protected TreeCellEditor createDefaultCellEditor() { return new DefaultTreeCellEditor( tree, (DefaultTreeCellRenderer) createDefaultCellRenderer(), cellEditor); } |
for (int i = 0; i < mod.getChildCount(root); i++) | int size = 0; if (!mod.isLeaf(root)) size = mod.getChildCount(root); for (int i = 0; i < size; i++) | private Object findNode(Object root, Object node) { TreeModel mod = tree.getModel(); for (int i = 0; i < mod.getChildCount(root); i++) { if (mod.getIndexOfChild(root, node) != -1) return root; Object n = findNode(mod.getChild(root, i), node); if (n != null) return n;... |
FontMetrics fm = tree.getToolkit().getFontMetrics(tree.getFont()); | FontMetrics fm = tree.getToolkit().getFontMetrics(f); | Rectangle getCellBounds(int x, int y, Object cell) { if (cell != null) { String s = cell.toString(); Font f = tree.getFont(); FontMetrics fm = tree.getToolkit().getFontMetrics(tree.getFont()); if (s != null) return new Rectangle(x, y, SwingUtilities.compute... |
&& mod.getChildCount(startNode) > 0) | && !mod.isLeaf(startNode) && mod.getChildCount(startNode) > 0) | Point getCellLocation(int x, int y, JTree tree, TreeModel mod, Object node, Object startNode) { int rowHeight = getRowHeight(); if (startNode == null || startNode.equals(node)) { if (!tree.isRootVisible() && tree.isExpanded(new TreePath(mod.getRoot()))) re... |
return null; | return editingPath; | public TreePath getEditingPath(JTree tree) { // FIXME: not implemented return null; } |
if (mod.getChildCount(curr) > 0) | if (!mod.isLeaf(curr) && mod.getChildCount(curr) > 0) | Object getNextNode(Object curr) { TreeModel mod = tree.getModel(); if (mod.getChildCount(curr) > 0) return mod.getChild(curr, 0); Object node = curr; Object sibling = null; do { sibling = getNextSibling(node); node = getParent(mod.getRoot(), node); } while (sibling ... |
if (index == 0 || index >= mod.getChildCount(parent)) | int size = 0; if (!mod.isLeaf(parent)) size = mod.getChildCount(parent); if (index == 0 || index >= size) | Object getNextSibling(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; int index = mod.getIndexOfChild(parent, node) + 1; if (index == 0 || index >= mod.getChildCount(parent)) return null; return mod.getCh... |
int size = mod.getChildCount(sibling); | int size = 0; if (!mod.isLeaf(sibling)) size = mod.getChildCount(sibling); | Object getPreviousNode(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; Object sibling = getPreviousSibling(node); if (sibling == null) return parent; int size = mod.getChildCount(sibling); while (size ... |
else size = 0; | Object getPreviousNode(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; Object sibling = getPreviousSibling(node); if (sibling == null) return parent; int size = mod.getChildCount(sibling); while (size ... | |
if (index < 0 || index >= mod.getChildCount(parent)) | int size = 0; if (!mod.isLeaf(parent)) size = mod.getChildCount(parent); if (index < 0 || index >= size) | Object getPreviousSibling(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; int index = mod.getIndexOfChild(parent, node) - 1; if (index < 0 || index >= mod.getChildCount(parent)) return null; return mod.getChi... |
return path.getPathCount() - 1; | int row = path.getPathCount(); if (tree.isVisible(path)) return row; path = path.getParentPath(); while (row > 0 && !tree.isVisible(path)) { path = path.getParentPath(); row--; } return row; | public int getRowForPath(JTree tree, TreePath path) { // FIXME: check visibility // right now, just returns last element because // expand/collapse is not implemented return path.getPathCount() - 1; } |
cellEditor = createDefaultCellEditor(); currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; createdCellEditor = true; | public void installUI(JComponent c) { super.installUI(c); installDefaults((JTree) c); tree = (JTree) c; TreeModel mod = tree.getModel(); setModel(mod); tree.setRootVisible(true); if (mod != null) tree.expandPath(new TreePath(mod.getRoot())); treeSelectionModel = tree.getSelectionModel(); instal... | |
return false; | return getCellEditor() != null; | public boolean isEditing(JTree tree) { // FIXME: not implemented return false; } |
int max = mod.getChildCount(node); | int max = 0; if (!mod.isLeaf(node)) max = mod.getChildCount(node); | int paintControlIcons(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object node) { int h = descent; int rowHeight = getRowHeight(); Icon ei = UIManager.getLookAndFeelDefaults().getIcon("Tree.expandedIcon")... |
int max = mod.getChildCount(curr); | int max = 0; if (!mod.isLeaf(curr)) max = mod.getChildCount(curr); | int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object curr) { Rectangle clip = g.getClipBounds(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + getRowHeight()) return de... |
if (y0 != heightOfLine && mod.getChildCount(curr) > 0) | if (y0 != heightOfLine && !mod.isLeaf(curr) && mod.getChildCount(curr) > 0) | int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object curr) { Rectangle clip = g.getClipBounds(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + getRowHeight()) return de... |
else if (tree.getSelectionModel().getSelectionMode() == TreeSelectionModel.SINGLE_TREE_SELECTION) | else if (tree.getSelectionModel().getSelectionMode() == TreeSelectionModel. DISCONTIGUOUS_TREE_SELECTION) | void selectPath(JTree tree, TreePath path) { if (path != null) { if (tree.isPathSelected(path)) tree.removeSelectionPath(path); else if (tree.getSelectionModel().getSelectionMode() == TreeSelectionModel.SINGLE_TREE_SELECTION) { tree.getSelectionModel().clearSe... |
tree.getSelectionModel().clearSelection(); | void selectPath(JTree tree, TreePath path) { if (path != null) { if (tree.isPathSelected(path)) tree.removeSelectionPath(path); else if (tree.getSelectionModel().getSelectionMode() == TreeSelectionModel.SINGLE_TREE_SELECTION) { tree.getSelectionModel().clearSe... | |
tree.getSelectionModel().setSelectionMode( TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION); | tree.getSelectionModel().setSelectionMode(TreeSelectionModel. SINGLE_TREE_SELECTION); tree.getSelectionModel().clearSelection(); | void selectPath(JTree tree, TreePath path) { if (path != null) { if (tree.isPathSelected(path)) tree.removeSelectionPath(path); else if (tree.getSelectionModel().getSelectionMode() == TreeSelectionModel.SINGLE_TREE_SELECTION) { tree.getSelectionModel().clearSe... |
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); defaults.put("Tree.hash", color); | protected void setHashColor(Color color) { // FIXME: not implemented } | |
int x; int y; if (event == null) { Rectangle bounds = getPathBounds(tree, path); x = bounds.x; y = bounds.y; } else { x = event.getX(); y = event.getY(); } TreeCellEditor ed = getCellEditor(); if (ed == null) updateCellEditor(); if(ed != null && ed.isCellEditable(event) && ed.shouldSelectCell(event)) { editingPath = p... | protected boolean startEditing(TreePath path, MouseEvent event) { // FIXME: not implemented return false; } | |
startEditing(path, null); | public void startEditingAtPath(JTree tree, TreePath path) { // FIXME: not implemented } | |
return false; | if (isEditing(tree)) { completeEditing(); return getCellEditor().stopCellEditing(); } return true; | public boolean stopEditing(JTree tree) { // FIXME: not implemented return false; } |
if (tree.isEditable() && cellEditor == null) cellEditor = createDefaultCellEditor(); | protected void updateCellEditor() { // FIXME: not implemented } | |
public void editingCanceled(ChangeEvent event); | void editingCanceled(ChangeEvent event); | public void editingCanceled(ChangeEvent event); |
public void editingStopped(ChangeEvent event); | void editingStopped(ChangeEvent event); | public void editingStopped(ChangeEvent event); |
public DefaultTreeCellEditor(JTree tree, DefaultTreeCellRenderer renderer, TreeCellEditor editor) | public DefaultTreeCellEditor(JTree tree, DefaultTreeCellRenderer renderer) | public DefaultTreeCellEditor(JTree tree, DefaultTreeCellRenderer renderer, TreeCellEditor editor) { setTree(tree); this.renderer = renderer; if (editor == null) editor = createTreeCellEditor(); else editor.addCellEditorListener(new RealEditorListener()); ... |
setTree(tree); this.renderer = renderer; if (editor == null) editor = createTreeCellEditor(); else editor.addCellEditorListener(new RealEditorListener()); realEditor = editor; lastPath = tree.getLeadSelectionPath(); tree.addTreeSelectionListener(this); editingContainer = createContainer(); setFont(UIManager.getFont(... | this(tree, renderer, null); | public DefaultTreeCellEditor(JTree tree, DefaultTreeCellRenderer renderer, TreeCellEditor editor) { setTree(tree); this.renderer = renderer; if (editor == null) editor = createTreeCellEditor(); else editor.addCellEditorListener(new RealEditorListener()); ... |
int getInt(Object key) | public int getInt(Object key) | int getInt(Object key) { Object o = get(key); return o instanceof Integer ? ((Integer) o).intValue() : 0; } |
clientShowsRootHandlesSet = true; | public void setShowsRootHandles(boolean flag) { if (showsRootHandles == flag) return; boolean oldValue = showsRootHandles; showsRootHandles = flag; firePropertyChange(SHOWS_ROOT_HANDLES_PROPERTY, oldValue, flag); } | |
drawArc(int x, int y, int width, int height, int startAngle, int arcAngle); | drawArc(int x, int y, int width, int height, int arcStart, int arcAngle); | drawArc(int x, int y, int width, int height, int startAngle, int arcAngle); |
fillArc(int x, int y, int width, int height, int startAngle, int arcAngle); | fillArc(int x, int y, int width, int height, int arcStart, int arcAngle); | fillArc(int x, int y, int width, int height, int startAngle, int arcAngle); |
this.defaultClientID = defaultClientID; | this.clientID = defaultClientID; | public ServerConnectionFactoryDelegate(ServerPeer serverPeer, String defaultClientID) { this.serverPeer = serverPeer; this.defaultClientID = defaultClientID; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.