rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
int end = getEndOffset();
int end = getEndOffset() - 1;
public int viewToModel(float x, float y, Shape a, Bias[] b) { Segment s = getLineBuffer(); Rectangle rect = a.getBounds(); int currLineStart = getStartOffset(); int end = getEndOffset(); int lineHeight = metrics.getHeight(); if (y < rect.y) return currLineStart; if (y > ...
return end - 1;
return end;
public int viewToModel(float x, float y, Shape a, Bias[] b) { Segment s = getLineBuffer(); Rectangle rect = a.getBounds(); int currLineStart = getStartOffset(); int end = getEndOffset(); int lineHeight = metrics.getHeight(); if (y < rect.y) return currLineStart; if (y > ...
if (x < rect.x) return currLineStart; if (x > rect.x + rect.width) return currLineEnd - 1;
public int viewToModel(float x, float y, Shape a, Bias[] b) { Segment s = getLineBuffer(); Rectangle rect = a.getBounds(); int currLineStart = getStartOffset(); int end = getEndOffset(); int lineHeight = metrics.getHeight(); if (y < rect.y) return currLineStart; if (y > ...
getDocument().getText(currLineStart, end - currLineStart, s);
getDocument().getText(currLineStart, currLineEnd - currLineStart, s);
public int viewToModel(float x, float y, Shape a, Bias[] b) { Segment s = getLineBuffer(); Rectangle rect = a.getBounds(); int currLineStart = getStartOffset(); int end = getEndOffset(); int lineHeight = metrics.getHeight(); if (y < rect.y) return currLineStart; if (y > ...
int mark = Utilities.getTabbedTextOffset(s, metrics, rect.x,
return Utilities.getTabbedTextOffset(s, metrics, rect.x,
public int viewToModel(float x, float y, Shape a, Bias[] b) { Segment s = getLineBuffer(); Rectangle rect = a.getBounds(); int currLineStart = getStartOffset(); int end = getEndOffset(); int lineHeight = metrics.getHeight(); if (y < rect.y) return currLineStart; if (y > ...
return currLineStart + mark;
public int viewToModel(float x, float y, Shape a, Bias[] b) { Segment s = getLineBuffer(); Rectangle rect = a.getBounds(); int currLineStart = getStartOffset(); int end = getEndOffset(); int lineHeight = metrics.getHeight(); if (y < rect.y) return currLineStart; if (y > ...
if (currLineEnd == currLineStart) currLineStart = end; else
public int viewToModel(float x, float y, Shape a, Bias[] b) { Segment s = getLineBuffer(); Rectangle rect = a.getBounds(); int currLineStart = getStartOffset(); int end = getEndOffset(); int lineHeight = metrics.getHeight(); if (y < rect.y) return currLineStart; if (y > ...
{ return p0 + Utilities.getTabbedTextOffset(lineBuffer, metrics, alloc.x, alloc.x + alloc.width, this, 0); }
return p0 + Utilities.getTabbedTextOffset(lineBuffer, metrics, alloc.x, alloc.x + alloc.width, this, 0, true);
protected int calculateBreakPosition(int p0, int p1) { Container c = getContainer(); Rectangle alloc = new Rectangle(0, 0, getWidth(), getHeight()); updateMetrics(); try { getDocument().getText(p0, p1 - p0, getLineBuffer()); } catch (BadLocationException ble) { // this sho...
getContainer().repaint();
public void changedUpdate (DocumentEvent e, Shape a, ViewFactory f) { super.changedUpdate(e, a, viewFactory); // FIXME: could improve performance by repainting only the necessary area getContainer().repaint(); }
getContainer().repaint();
public void insertUpdate (DocumentEvent e, Shape a, ViewFactory f) { super.insertUpdate(e, a, viewFactory); // FIXME: could improve performance by repainting only the necessary area getContainer().repaint(); }
updateMetrics();
selectedColor = comp.getSelectedTextColor(); unselectedColor = comp.getForeground(); disabledColor = comp.getDisabledTextColor(); selectedColor = comp.getSelectedTextColor(); lineHeight = metrics.getHeight(); g.setFont(comp.getFont());
public void paint(Graphics g, Shape a) { JTextComponent comp = (JTextComponent)getContainer(); selectionStart = comp.getSelectionStart(); selectionEnd = comp.getSelectionEnd(); updateMetrics(); super.paint(g, a); }
getContainer().repaint();
public void removeUpdate (DocumentEvent e, Shape a, ViewFactory f) { super.removeUpdate(e, a, viewFactory); // FIXME: could improve performance by repainting only the necessary area getContainer().repaint(); }
box.border = c.css.getStyle(box.getRealElement()).getBorderWidth();
box.border = box.getContent().getStyle().getBorderWidth();
public static Border getBorder(Context c, Box box) { if (isBlockOrInlineElementBox(c, box)) { // u.p("setting border for: " + box); if (box.border == null) { box.border = c.css.getStyle(box.getRealElement()).getBorderWidth(); } } else { // u.p...
public static String getPosition(Context c, Box box) { String position = c.css.getStyle(box.getRealElement()).getStringProperty("position");
public static String getPosition(CalculatedStyle style) { String position = style.getStringProperty("position");
public static String getPosition(Context c, Box box) { String position = c.css.getStyle(box.getRealElement()).getStringProperty("position"); if (position == null) { position = "static"; } return position; }
if(box.isElement()) { return true; } if ( box.getNode().getNodeType() == Node.TEXT_NODE && !LayoutUtil.isBlockNode(box.getRealElement(), c) ) { return true; } return false;
return !(box.getContent() instanceof TextContent);
public static boolean isBlockOrInlineElementBox(Context c, Box box) { if(box.isElement()) { return true; } if ( box.getNode().getNodeType() == Node.TEXT_NODE && !LayoutUtil.isBlockNode(box.getRealElement(), c) ) { // u.p("box = " + box); ...
public static boolean isFixed(Context c, Box box) { if (getPosition(c, box).equals("fixed")) {
public static boolean isFixed(CalculatedStyle style) { if (getPosition(style).equals("fixed")) {
public static boolean isFixed(Context c, Box box) { if (getPosition(c, box).equals("fixed")) { return true; } return false; }
CalculatedStyle style = c.css.getStyle(inline.getNode());
CalculatedStyle style = inline.getContent().getStyle();
public static boolean isFloated(Box inline, Context c) { CalculatedStyle style = c.css.getStyle(inline.getNode()); return isFloated(style); }
public static boolean isListItem(Context c, Box box) { CalculatedStyle style = c.css.getStyle(box.getNode());
public static boolean isListItem(Box box) { CalculatedStyle style = box.getContent().getStyle();
public static boolean isListItem(Context c, Box box) { CalculatedStyle style = c.css.getStyle(box.getNode()); String display = getDisplay(style); if (display.equals("list-item")) { return true; } return false; }
if (log.isTraceEnabled()) { log.trace(this + " invokes " + methodName + " on " + category + "." + id); }
if (log.isTraceEnabled()) { log.trace(this + " invokes " + methodName + " on " + category + "." + Util.guidToString((String)id)); }
public Collection invoke(Serializable category, String methodName, Object[] args, String[] signature) throws Exception { if (log.isTraceEnabled()) { log.trace(this + ": method " + methodName + " invoked on category " + category); } Class[] parameterTypes = new Class[sig...
messageHandler.setMessageListener(l, mi, this);
messageHandler.setMessageListener(l);
public Object invoke(Invocation invocation) throws Throwable { if (invocation instanceof JMSMethodInvocation) { JMSMethodInvocation mi = (JMSMethodInvocation)invocation; Method m = mi.getMethod(); String name = m.getName(); if (log.isTraceEnabled()) { log.trace("handling "...
log.trace("Got message: " + tm.getText());
public void onMessage(Message m) { try { count++; TextMessage tm = (TextMessage)m; // Receive first three messages then recover() session // Only last message should be redelivered if (count == 1) ...
if (restriction.getConditions().size() == 0) {
if (restriction.getConditionsDescriptor() == null) {
protected void init(Element action) { try { setId(Integer.parseInt(action.getAttribute("id"))); } catch (Exception ex) { throw new IllegalArgumentException("Invalid action id value " + action.getAttribute("id")); } this.name = action.getAttribute("name"); thi...
return new Dimension (getPreferredSize().width, getVisibleRowCount()*getRowHeight());
return getPreferredSize();
public Dimension getPreferredScrollableViewportSize() { return new Dimension (getPreferredSize().width, getVisibleRowCount()*getRowHeight()); }
if (oldTx != null)
if (oldTx != null && tm != null)
private void end() throws Exception { try { if (Status.STATUS_MARKED_ROLLBACK == tm.getStatus()) { tm.rollback(); } else { tm.commit(); } } finally { if (oldTx != n...
if (tm == null) { throw new IllegalStateException("No TransactionManager found. This service dependencies must " + "have not been enforced correctly!"); }
protected void startService() throws Exception { if (ds == null) { InitialContext ic = new InitialContext(); ds = (DataSource)ic.lookup(dataSourceJNDIName); ic.close(); } if (ds == null) { throw new IllegalStateException("No DataSource found. This serv...
configuration.put(MetaDataConstants.CLIENT_CONNECTION_ID, id);
configuration.put(Client.ENABLE_LEASE, "true");
protected Map getConfig() { Map configuration = new HashMap(); configuration.put(MetaDataConstants.CLIENT_CONNECTION_ID, id); if (isMultiplex) { configuration.put(MultiplexServerInvoker.CLIENT_MULTIPLEX_ID_KEY, id); configuration.put(MultiplexServerInvoker.MULTI...
prepBox( c, inline, prev, font );
prepBox( c, inline, prev_align, font );
public InlineBox createInline(Context c, Node node, String text, InlineBox prev, InlineBox prev_align, int avail, int max, Font font) { // u.p("text = " + text); InlineBox inline = new InlineBox(); inline.node = node; inline.whitespace = getWhitespace(c,node); // prepare ...
_ivy.setDefaultConflictManager(_ivy.getConflictManager(_ivy.substitute(_defaultCM)));
ConflictManager conflictManager = _ivy.getConflictManager(_ivy.substitute(_defaultCM)); if (conflictManager == null) { throw new IllegalArgumentException("unknown conflict manager "+_ivy.substitute(_defaultCM)); } _ivy.setDefaultConflictManager(conflictManager);
public void endDocument() throws SAXException { if (_defaultResolver != null) { _ivy.setDefaultResolver(_ivy.substitute(_defaultResolver)); } if (_defaultCM != null) { _ivy.setDefaultConflictManager(_ivy.getConflictManager(_ivy.substitute(_defaultCM))); } if ...
_ivy.setDefaultLatestStrategy(_ivy.getLatestStrategy(_ivy.substitute(_defaultLatest)));
LatestStrategy latestStrategy = _ivy.getLatestStrategy(_ivy.substitute(_defaultLatest)); if (latestStrategy == null) { throw new IllegalArgumentException("unknown latest strategy " + _ivy.substitute(_defaultLatest)); } _ivy.setDefaultLatestStrategy(latestStrategy);
public void endDocument() throws SAXException { if (_defaultResolver != null) { _ivy.setDefaultResolver(_ivy.substitute(_defaultResolver)); } if (_defaultCM != null) { _ivy.setDefaultConflictManager(_ivy.getConflictManager(_ivy.substitute(_defaultCM))); } if ...
throw new SAXException("problem in config file", ex);
throw new SAXException("problem in config file: "+ex.getMessage(), ex);
public void startElement(String uri, String localName, String qName, Attributes att) throws SAXException { // we first copy attributes in a Map to be able to modify them Map attributes = new HashMap(); for (int i=0; i<att.getLength(); i++) { attributes.put(att.getQName(i), att.getVal...
ic.rebind("java:/" + CONNECTION_FACTORY_JNDI_NAME, cf); ic.rebind("java:/" + XACONNECTION_FACTORY_JNDI_NAME, cf);
private void setupConnectionFactories() throws Exception { ConnectionFactory cf = setupConnectionFactory(null); InitialContext ic = new InitialContext(); //Bind in global JNDI namespace ic.rebind(CONNECTION_FACTORY_JNDI_NAME, cf); ic.rebind(XACONNECTION_FACTORY_JNDI_NAME, cf); ...
ic.unbind("java:/" + CONNECTION_FACTORY_JNDI_NAME); ic.unbind("java:/" + XACONNECTION_FACTORY_JNDI_NAME);
private void tearDownConnectionFactories() throws Exception { InitialContext ic = new InitialContext(); //TODO //FIXME - this is a hack. It should be removed once a better way to manage //connection factories is implemented ic.unbind("jms/DURABLE_SUB_CONNECTION_FACTORY"); ic.unbi...
channel.deliver(null);
public void afterRollback(boolean onePhase) throws TransactionException { Iterator iter = refsToAdd.iterator(); while (iter.hasNext()) { MessageReference ref = (MessageReference)iter.next(); ref.releaseMemoryReference(); } } ...
Thread.sleep(2000);
public void testRemoveAllMessages() throws Exception { InitialContext ic = new InitialContext(ServerManagement.getJNDIEnvironment()); TopicConnectionFactory cf = (JBossConnectionFactory)ic.lookup("/ConnectionFactory"); ServerManagement.deployTopic("TopicRemoveAllMessages"); try { ...
return Provider.provider();
return (CharsetProvider)AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return Provider.provider(); }});
private static final CharsetProvider provider() { return Provider.provider(); }
super.drainDestination(cf, queue);
public void setUp() throws Exception { super.setUp(); ServerManagement.init("all"); ServerManagement.undeployQueue("Queue"); ServerManagement.deployQueue("Queue"); InitialContext ic = new InitialContext(ServerManagement.getJNDIEnvironment()); cf = (ConnectionFactory)ic.lookup("/Connec...
int halign = textField.getHorizontalAlignment(); int width = (int) getPreferredSpan(X_AXIS);
int width = (int) ((cachedSpan != -1f) ? cachedSpan : calculateHorizontalSpan());
protected Shape adjustAllocation(Shape shape) { Rectangle rectIn = shape.getBounds(); // vertical adjustment int height = (int) getPreferredSpan(Y_AXIS); int y = rectIn.y + (rectIn.height - height) / 2; // horizontal adjustment JTextField textField = (JTextField) getContainer(); int halign = tex...
ComponentOrientation orientation = textField.getComponentOrientation(); switch (halign)
if (horizontalVisibility != null && horizontalVisibility.getExtent() < width) x = rectIn.x - horizontalVisibility.getValue(); else switch (textField.getHorizontalAlignment())
protected Shape adjustAllocation(Shape shape) { Rectangle rectIn = shape.getBounds(); // vertical adjustment int height = (int) getPreferredSpan(Y_AXIS); int y = rectIn.y + (rectIn.height - height) / 2; // horizontal adjustment JTextField textField = (JTextField) getContainer(); int halign = tex...
x = rectIn.x + (rectIn.width - width);
x = rectIn.x + (rectIn.width - width - 1);
protected Shape adjustAllocation(Shape shape) { Rectangle rectIn = shape.getBounds(); // vertical adjustment int height = (int) getPreferredSpan(Y_AXIS); int y = rectIn.y + (rectIn.height - height) / 2; // horizontal adjustment JTextField textField = (JTextField) getContainer(); int halign = tex...
if (orientation.isLeftToRight()) x = rectIn.x + (rectIn.width - width);
if (textField.getComponentOrientation().isLeftToRight()) x = rectIn.x + (rectIn.width - width - 1);
protected Shape adjustAllocation(Shape shape) { Rectangle rectIn = shape.getBounds(); // vertical adjustment int height = (int) getPreferredSpan(Y_AXIS); int y = rectIn.y + (rectIn.height - height) / 2; // horizontal adjustment JTextField textField = (JTextField) getContainer(); int halign = tex...
if (orientation.isLeftToRight())
if (textField.getComponentOrientation().isLeftToRight())
protected Shape adjustAllocation(Shape shape) { Rectangle rectIn = shape.getBounds(); // vertical adjustment int height = (int) getPreferredSpan(Y_AXIS); int y = rectIn.y + (rectIn.height - height) / 2; // horizontal adjustment JTextField textField = (JTextField) getContainer(); int halign = tex...
super.removeUpdate(ev, newAlloc, vf);
super.changedUpdate(ev, newAlloc, vf);
public void changedUpdate(DocumentEvent ev, Shape shape, ViewFactory vf) { Shape newAlloc = adjustAllocation(shape); super.removeUpdate(ev, newAlloc, vf); getContainer().repaint(); }
FontMetrics fm = getFontMetrics();
public float getPreferredSpan(int axis) { if (axis != X_AXIS && axis != Y_AXIS) throw new IllegalArgumentException(); FontMetrics fm = getFontMetrics(); if (axis == Y_AXIS) return super.getPreferredSpan(axis); String text; Element elem = getElement(); try { text = elem.getDocument()....
String text; Element elem = getElement(); try { text = elem.getDocument().getText(elem.getStartOffset(), elem.getEndOffset()); } catch (BadLocationException e) { AssertionError ae = new AssertionError(); ae.initCause(e); throw ae; }
if (cachedSpan != -1f) return cachedSpan;
public float getPreferredSpan(int axis) { if (axis != X_AXIS && axis != Y_AXIS) throw new IllegalArgumentException(); FontMetrics fm = getFontMetrics(); if (axis == Y_AXIS) return super.getPreferredSpan(axis); String text; Element elem = getElement(); try { text = elem.getDocument()....
return fm.stringWidth(text);
return calculateHorizontalSpan();
public float getPreferredSpan(int axis) { if (axis != X_AXIS && axis != Y_AXIS) throw new IllegalArgumentException(); FontMetrics fm = getFontMetrics(); if (axis == Y_AXIS) return super.getPreferredSpan(axis); String text; Element elem = getElement(); try { text = elem.getDocument()....
g.setClip(clip);
public void paint(Graphics g, Shape s) { Shape newAlloc = adjustAllocation(s); super.paint(g, newAlloc); }
cachedSpan = -1f; if (horizontalVisibility != null) updateVisibility();
public void removeUpdate(DocumentEvent ev, Shape shape, ViewFactory vf) { Shape newAlloc = adjustAllocation(shape); super.removeUpdate(ev, newAlloc, vf); getContainer().repaint(); }
public ClientConnectionFactoryDelegate(String objectID, InvokerLocator locator)
public ClientConnectionFactoryDelegate(String objectID, String serverLocatorURI)
public ClientConnectionFactoryDelegate(String objectID, InvokerLocator locator) { super(objectID, locator); }
super(objectID, locator);
super(objectID); this.serverLocatorURI = serverLocatorURI;
public ClientConnectionFactoryDelegate(String objectID, InvokerLocator locator) { super(objectID, locator); }
if (box.content instanceof FloatedBlockContent) { return true; }
public static boolean isBlockOrInlineElementBox(Box box) { //Uu.p("box = " + box); if (box.content instanceof BlockContent) { //Uu.p("box is a block or element"); return true; } if (box.content instanceof DomToplevelNode) { //Uu.p("box is a block or eleme...
super();
ResultEdgeColorHandler(WorkflowGraph graph, Point location, Color color) { super(); this.graph = graph; this.location = location; this.cColor = color; }
CellView view = (graph.getGraphLayoutCache().getMapping(cell, false));
CellView view = graph.getGraphLayoutCache().getMapping(cell, false);
public void actionPerformed(ActionEvent e) { Object cell = graph.getFirstCellForLocation(location.x, location.y); if(cell == null) { return; } else { CellView view = (graph.getGraphLayoutCache().getMapping(cell, false)); if(view instanceof CustomEdgeView) ...
((CustomEdgeView)view).update();
view.update();
public void actionPerformed(ActionEvent e) { Object cell = graph.getFirstCellForLocation(location.x, location.y); if(cell == null) { return; } else { CellView view = (graph.getGraphLayoutCache().getMapping(cell, false)); if(view instanceof CustomEdgeView) ...
Component c = event.getChild(); if (c != null && c instanceof Accessible) { AccessibleContext childCtx = c.getAccessibleContext(); AccessibleJComponent.this.firePropertyChange (AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, null, childCtx);
public void componentAdded(ContainerEvent event) { // TODO: Implement this properly. }
}
public void componentAdded(ContainerEvent event) { // TODO: Implement this properly. }
public void componentRemoved(ContainerEvent valevent)
public void componentRemoved(ContainerEvent event)
public void componentRemoved(ContainerEvent valevent) { // TODO: Implement this properly. }
Component c = event.getChild(); if (c != null && c instanceof Accessible) { AccessibleContext childCtx = c.getAccessibleContext(); AccessibleJComponent.this.firePropertyChange (AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, childCtx, null); }
public void componentRemoved(ContainerEvent valevent) { // TODO: Implement this properly. }
AccessibleJComponent.this.firePropertyChange (AccessibleContext.ACCESSIBLE_STATE_PROPERTY, null, AccessibleState.FOCUSED);
public void focusGained(FocusEvent event) { // TODO: Implement this properly. }
AccessibleJComponent.this.firePropertyChange (AccessibleContext.ACCESSIBLE_STATE_PROPERTY, AccessibleState.FOCUSED, null);
public void focusLost(FocusEvent valevent) { // TODO: Implement this properly. }
changeSupport = new PropertyChangeSupport(this);
protected AccessibleJComponent() { changeSupport = new PropertyChangeSupport(this); }
changeSupport.addPropertyChangeListener(listener);
if (accessibleContainerHandler == null) { accessibleContainerHandler = new AccessibleContainerHandler(); addContainerListener(accessibleContainerHandler); } if (accessibleFocusHandler == null) { accessibleFocusHandler = new AccessibleFocusHandler(); addFocusListener(accessibleFocusHandler); } super.addPropertyChangeLis...
public void addPropertyChangeListener(PropertyChangeListener listener) { changeSupport.addPropertyChangeListener(listener); }
int index = 0; Component[] children = getComponents(); Accessible found = null; for (int j = 0; index != i; j++) { if (children[j] instanceof Accessible) index++; if (index == i) found = (Accessible) children[index]; } return found;
return super.getAccessibleChild(i);
public Accessible getAccessibleChild(int i) { int index = 0; Component[] children = getComponents(); Accessible found = null; for (int j = 0; index != i; j++) { if (children[j] instanceof Accessible) index++; if (index == i) found = (Accessible) ...
int count = 0; Component[] children = getComponents(); for (int i = 0; i < children.length; ++i) { if (children[i] instanceof Accessible) count++; } return count;
return super.getAccessibleChildrenCount();
public int getAccessibleChildrenCount() { int count = 0; Component[] children = getComponents(); for (int i = 0; i < children.length; ++i) { if (children[i] instanceof Accessible) count++; } return count; }
return null;
String descr = super.getAccessibleDescription(); if (descr == null) { descr = getToolTipText(); } if (descr == null) { Object l = getClientProperty(JLabel.LABEL_PROPERTY); if (l instanceof Accessible) { AccessibleContext labelCtx = ((Accessible) l).getAccessibleContext(); descr = labelCtx.getAccessibleName(); } } re...
public String getAccessibleDescription() { // TODO: Figure out what exactly to return here. It's possible that this // method simply should return null. return null; }
return null;
String name = super.getAccessibleName(); if (name == null) { name = getTitledBorderText(); } if (name == null) { Object l = getClientProperty(JLabel.LABEL_PROPERTY); if (l instanceof Accessible) { AccessibleContext labelCtx = ((Accessible) l).getAccessibleContext(); name = labelCtx.getAccessibleName(); } } r...
public String getAccessibleName() { // TODO: Figure out what exactly to return here. It's possible that this // method simply should return null. return null; }
return super.getAccessibleStateSet();
AccessibleStateSet state = super.getAccessibleStateSet(); if (isOpaque()) state.add(AccessibleState.OPAQUE); return state;
public AccessibleStateSet getAccessibleStateSet() { // FIXME: Figure out which states should be set here, and which are // inherited from the super class. return super.getAccessibleStateSet(); }
changeSupport.removePropertyChangeListener(listener);
if (accessibleContainerHandler != null) { removeContainerListener(accessibleContainerHandler); accessibleContainerHandler = null; } if (accessibleFocusHandler != null) { removeFocusListener(accessibleFocusHandler); accessibleFocusHandler = null; } super.removePropertyChangeListener(listener);
public void removePropertyChangeListener(PropertyChangeListener listener) { changeSupport.removePropertyChangeListener(listener); }
Rectangle2D.intersect(rect, new Rectangle(0, 0, getWidth(), getHeight()), rect);
rect = SwingUtilities.computeIntersection(0, 0, getWidth(), getHeight(), rect);
public void computeVisibleRect(Rectangle rect) { Component c = getParent(); if (c != null && c instanceof JComponent) { ((JComponent) c).computeVisibleRect(rect); rect.translate(-getX(), -getY()); Rectangle2D.intersect(rect, new Rectangle(0, 0, getWidth(),...
if (listenerType == PropertyChangeListener.class) return getPropertyChangeListeners(); else
public EventListener[] getListeners(Class listenerType) { return listenerList.getListeners(listenerType); }
return null;
Container focusRoot = this; if (! this.isFocusCycleRoot()) focusRoot = getFocusCycleRootAncestor(); FocusTraversalPolicy policy = focusRoot.getFocusTraversalPolicy(); return policy.getComponentAfter(focusRoot, this);
public Component getNextFocusableComponent() { return null; }
requestFocus();
public void grabFocus() { // TODO: Implement this properly. }
paintDoubleBuffered(g);
{ Rectangle clip = g.getClipBounds(); paintDoubleBuffered(clip); }
public void paint(Graphics g) { RepaintManager rm = RepaintManager.currentManager(this); // We do a little stunt act here to switch on double buffering if it's // not already on. If we are not already doublebuffered, then we jump // into the method paintDoubleBuffered, which turns on the double buffer ...
}
public void paint(Graphics g) { RepaintManager rm = RepaintManager.currentManager(this); // We do a little stunt act here to switch on double buffering if it's // not already on. If we are not already doublebuffered, then we jump // into the method paintDoubleBuffered, which turns on the double buffer ...
Shape originalClip = g.getClip(); Rectangle inner = SwingUtilities.calculateInnerArea(this, rectCache); g.clipRect(inner.x, inner.y, inner.width, inner.height); Component[] children = getComponents(); int startIndex = children.length - 1; if (! isOptimizedDrawingEnabled())
if (getComponentCount() > 0)
protected void paintChildren(Graphics g) { Shape originalClip = g.getClip(); Rectangle inner = SwingUtilities.calculateInnerArea(this, rectCache); g.clipRect(inner.x, inner.y, inner.width, inner.height); Component[] children = getComponents(); // Find the bottommost component that needs to be painted....
Rectangle clip = g.getClipBounds(); for (int i = 0; i < children.length; i++) { Rectangle childBounds = children[i].getBounds(); if (children[i].isOpaque() && SwingUtilities.isRectangleContainingRectangle(childBounds, g.getClipBounds())) { startIndex = i; break; } }
if (isOptimizedDrawingEnabled()) paintChildrenOptimized(g); else paintChildrenWithOverlap(g);
protected void paintChildren(Graphics g) { Shape originalClip = g.getClip(); Rectangle inner = SwingUtilities.calculateInnerArea(this, rectCache); g.clipRect(inner.x, inner.y, inner.width, inner.height); Component[] children = getComponents(); // Find the bottommost component that needs to be painted....
paintingTile = true; for (int i = startIndex; i >= 0; --i) { if (i == 0) paintingTile = false; if (!children[i].isVisible()) continue; Rectangle bounds = children[i].getBounds(rectCache); Rectangle oldClip = g.getClipBounds(); if (oldClip == null) oldClip = bounds; if (!g.hitClip(bounds.x, bounds.y, bounds.width, ...
protected void paintChildren(Graphics g) { Shape originalClip = g.getClip(); Rectangle inner = SwingUtilities.calculateInnerArea(this, rectCache); g.clipRect(inner.x, inner.y, inner.width, inner.height); Component[] children = getComponents(); // Find the bottommost component that needs to be painted....
void paintDoubleBuffered(Graphics g)
private void paintDoubleBuffered(Rectangle r)
void paintDoubleBuffered(Graphics g) { Rectangle r = g.getClipBounds(); if (r == null) r = new Rectangle(0, 0, getWidth(), getHeight()); RepaintManager rm = RepaintManager.currentManager(this); // Paint on the offscreen buffer. Image buffer = rm.getOffscreenBuffer(this, getWidth(), getHei...
Rectangle r = g.getClipBounds(); if (r == null) r = new Rectangle(0, 0, getWidth(), getHeight());
void paintDoubleBuffered(Graphics g) { Rectangle r = g.getClipBounds(); if (r == null) r = new Rectangle(0, 0, getWidth(), getHeight()); RepaintManager rm = RepaintManager.currentManager(this); // Paint on the offscreen buffer. Image buffer = rm.getOffscreenBuffer(this, getWidth(), getHei...
Image buffer = rm.getOffscreenBuffer(this, getWidth(), getHeight());
Component root = SwingUtilities.getRoot(this); Image buffer = rm.getOffscreenBuffer(this, root.getWidth(), root.getHeight()); Point translation = SwingUtilities.convertPoint(this, 0, 0, root);
void paintDoubleBuffered(Graphics g) { Rectangle r = g.getClipBounds(); if (r == null) r = new Rectangle(0, 0, getWidth(), getHeight()); RepaintManager rm = RepaintManager.currentManager(this); // Paint on the offscreen buffer. Image buffer = rm.getOffscreenBuffer(this, getWidth(), getHei...
g2 = getComponentGraphics(g2);
g2.translate(translation.x, translation.y);
void paintDoubleBuffered(Graphics g) { Rectangle r = g.getClipBounds(); if (r == null) r = new Rectangle(0, 0, getWidth(), getHeight()); RepaintManager rm = RepaintManager.currentManager(this); // Paint on the offscreen buffer. Image buffer = rm.getOffscreenBuffer(this, getWidth(), getHei...
g.drawImage(buffer, 0, 0, this);
rm.commitBuffer(root, new Rectangle(translation.x + r.x, translation.y + r.y, r.width, r.height));
void paintDoubleBuffered(Graphics g) { Rectangle r = g.getClipBounds(); if (r == null) r = new Rectangle(0, 0, getWidth(), getHeight()); RepaintManager rm = RepaintManager.currentManager(this); // Paint on the offscreen buffer. Image buffer = rm.getOffscreenBuffer(this, getWidth(), getHei...
Graphics g = getGraphics(); g.setClip(r.x, r.y, r.width, r.height);
void paintImmediately2(Rectangle r) { RepaintManager rm = RepaintManager.currentManager(this); Graphics g = getGraphics(); g.setClip(r.x, r.y, r.width, r.height); if (rm.isDoubleBufferingEnabled() && isDoubleBuffered()) paintDoubleBuffered(g); else paintSimple(g); g.dispose(); }
paintDoubleBuffered(g);
paintDoubleBuffered(r);
void paintImmediately2(Rectangle r) { RepaintManager rm = RepaintManager.currentManager(this); Graphics g = getGraphics(); g.setClip(r.x, r.y, r.width, r.height); if (rm.isDoubleBufferingEnabled() && isDoubleBuffered()) paintDoubleBuffered(g); else paintSimple(g); g.dispose(); }
paintSimple(g); g.dispose();
paintSimple(r);
void paintImmediately2(Rectangle r) { RepaintManager rm = RepaintManager.currentManager(this); Graphics g = getGraphics(); g.setClip(r.x, r.y, r.width, r.height); if (rm.isDoubleBufferingEnabled() && isDoubleBuffered()) paintDoubleBuffered(g); else paintSimple(g); g.dispose(); }
void paintSimple(Graphics g)
void paintSimple(Rectangle r)
void paintSimple(Graphics g) { Graphics g2 = getComponentGraphics(g); paint(g2); }
g2.dispose(); if (g != g2) g.dispose();
void paintSimple(Graphics g) { Graphics g2 = getComponentGraphics(g); paint(g2); }
Rectangle dirty = new Rectangle(x, y, width, height); Rectangle vis = getVisibleRect(); dirty = dirty.intersection(vis); RepaintManager.currentManager(this).addDirtyRegion(this, dirty.x, dirty.y, dirty.width, dirty.height);
RepaintManager.currentManager(this).addDirtyRegion(this, x, y, width, height);
public void repaint(long tm, int x, int y, int width, int height) { Rectangle dirty = new Rectangle(x, y, width, height); Rectangle vis = getVisibleRect(); dirty = dirty.intersection(vis); RepaintManager.currentManager(this).addDirtyRegion(this, dirty.x, dirty.y, ...
clientAutoscrollsSet = true;
public void setAutoscrolls(boolean a) { autoscrolls = a; }
Container focusRoot = this; if (! this.isFocusCycleRoot()) focusRoot = getFocusCycleRootAncestor(); FocusTraversalPolicy policy = focusRoot.getFocusTraversalPolicy(); if (policy instanceof CompatibilityFocusTraversalPolicy) { policy = new CompatibilityFocusTraversalPolicy(policy); focusRoot.setFocusTraversalPolicy(po...
public void setNextFocusableComponent(Component aComponent) { // TODO: Implement this properly. }
clientOpaqueSet = true;
public void setOpaque(boolean isOpaque) { boolean oldOpaque = opaque; opaque = isOpaque; firePropertyChange("opaque", oldOpaque, opaque); }
ActionMap am = getActionMap(); for (int cond = 0; cond < 3; cond++) { InputMap im = getInputMap(cond); if (im != null) { Object action = im.get(aKeyStroke); if (action != null && am != null) am.remove(action); im.remove(aKeyStroke); } }
public void unregisterKeyboardAction(KeyStroke aKeyStroke) { // FIXME: Must be implemented. }
CoreSubscription subscription = null;
Subscription subscription = null;
public ConsumerDelegate createConsumerDelegate(JBossDestination jmsDestination, String selector, boolean noLocal, String subscriptionName, ...
subscription.unsubscribe();
try { ((DurableSubscription)subscription).unsubscribe(); } catch (Exception e) { throw new MessagingJMSException("Failed to unsubscribe", e); }
public ConsumerDelegate createConsumerDelegate(JBossDestination jmsDestination, String selector, boolean noLocal, String subscriptionName, ...
subscription.subscribe();
subscription.connect();
public ConsumerDelegate createConsumerDelegate(JBossDestination jmsDestination, String selector, boolean noLocal, String subscriptionName, ...
CoreDurableSubscription subscription =
DurableSubscription subscription =
public void unsubscribe(String subscriptionName) throws JMSException { if (closed) { throw new IllegalStateException("Session is closed"); } if (subscriptionName == null) { throw new InvalidDestinationException("Destination is null"); } String clientID = connectio...
subscription.unsubscribe();
public void unsubscribe(String subscriptionName) throws JMSException { if (closed) { throw new IllegalStateException("Session is closed"); } if (subscriptionName == null) { throw new InvalidDestinationException("Destination is null"); } String clientID = connectio...
pm.removeAllChannelData(subscription.getChannelID());
subscription.unsubscribe();
public void unsubscribe(String subscriptionName) throws JMSException { if (closed) { throw new IllegalStateException("Session is closed"); } if (subscriptionName == null) { throw new InvalidDestinationException("Destination is null"); } String clientID = connectio...
log.error("Failed to remove message data", e); throw new IllegalStateException("Failed to remove message data");
throw new MessagingJMSException("Failed to unsubscribe", e);
public void unsubscribe(String subscriptionName) throws JMSException { if (closed) { throw new IllegalStateException("Session is closed"); } if (subscriptionName == null) { throw new InvalidDestinationException("Destination is null"); } String clientID = connectio...
int leading = height - ascent - descent;
int leading = height - inlineTop - inlineBottom;
public int getBaseline() { int leading = height - ascent - descent; if (leading < 0) { XRLog.layout(Level.SEVERE, "negative leading in line box"); } return ascent + leading / 2; }
return ascent + leading / 2;
return inlineTop + leading / 2;
public int getBaseline() { int leading = height - ascent - descent; if (leading < 0) { XRLog.layout(Level.SEVERE, "negative leading in line box"); } return ascent + leading / 2; }