rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
if (log.isTraceEnabled()) { log.trace("getting message references for channel " + channelID + " and store " + storeID); } | if (trace) { log.trace("getting message references for channel " + channelID + " and store " + storeID); } | public List messageRefs(Serializable storeID, Serializable channelID) throws Exception { if (log.isTraceEnabled()) { log.trace("getting message references for channel " + channelID + " and store " + storeID); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; Trans... |
if (log.isTraceEnabled()) { log.trace(JDBCUtil.statementToString(selectChannelMessageRefs, channelID) + " selected " + result.size() + " row(s)"); } | if (trace) { log.trace(JDBCUtil.statementToString(selectChannelMessageRefs, channelID) + " selected " + result.size() + " row(s)"); } | public List messageRefs(Serializable storeID, Serializable channelID) throws Exception { if (log.isTraceEnabled()) { log.trace("getting message references for channel " + channelID + " and store " + storeID); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; Trans... |
if (log.isTraceEnabled()) { log.trace("writing prepared flag for " + tx); } | if (trace) { log.trace("writing prepared flag for " + tx); } | public void prepareTx(Transaction tx) throws Exception { if (!storeXid || tx.getXid() == null) { return; } if (log.isTraceEnabled()) { log.trace("writing prepared flag for " + tx); } Connection conn = null; PreparedStatement ps = null; TransactionWrapper wrap ... |
if (log.isTraceEnabled()) { log.trace(JDBCUtil.statementToString(prepareTransaction, getTxId(tx)) + " updated " + rows + " row(s)"); } | if (trace) { log.trace(JDBCUtil.statementToString(prepareTransaction, getTxId(tx)) + " updated " + rows + " row(s)"); } | public void prepareTx(Transaction tx) throws Exception { if (!storeXid || tx.getXid() == null) { return; } if (log.isTraceEnabled()) { log.trace("writing prepared flag for " + tx); } Connection conn = null; PreparedStatement ps = null; TransactionWrapper wrap ... |
if (log.isTraceEnabled()) { log.trace("removing all message data for channel " + channelID); } | if (trace) { log.trace("removing all message data for channel " + channelID); } | public void removeAllMessageData(Serializable channelID) throws Exception { if (log.isTraceEnabled()) { log.trace("removing all message data for channel " + channelID); } Connection conn = null; PreparedStatement ps = null; TransactionWrapper wrap = new TransactionWrapper(); boolean succes... |
if (log.isTraceEnabled()) | if (trace) | protected void removeTXRecord(Connection conn, Transaction tx) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement(deleteTransaction); if (tx.getGuidTxId() != null) { ps.setString(1, tx.getGuidTxId()); } else ... |
if (log.isTraceEnabled()) { log.trace("rolling back " + tx); } | if (trace) { log.trace("rolling back " + tx); } | public void rollbackTx(Transaction tx) throws Exception { if (log.isTraceEnabled()) { log.trace("rolling back " + tx); } Connection conn = null; PreparedStatement ps = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.getConnection(); ps =... |
if (log.isTraceEnabled()) { log.trace(JDBCUtil.statementToString(rollbackMessageRef1, getTxId(tx)) + " removed " + rows + " row(s)"); } | if (trace) { log.trace(JDBCUtil.statementToString(rollbackMessageRef1, getTxId(tx)) + " removed " + rows + " row(s)"); } | public void rollbackTx(Transaction tx) throws Exception { if (log.isTraceEnabled()) { log.trace("rolling back " + tx); } Connection conn = null; PreparedStatement ps = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.getConnection(); ps =... |
if (log.isTraceEnabled()) { log.trace(JDBCUtil.statementToString(rollbackMessageRef2, null, getTxId(tx)) + " updated " + rows + " row(s)"); } | if (trace) { log.trace(JDBCUtil.statementToString(rollbackMessageRef2, null, getTxId(tx)) + " updated " + rows + " row(s)"); } | public void rollbackTx(Transaction tx) throws Exception { if (log.isTraceEnabled()) { log.trace("rolling back " + tx); } Connection conn = null; PreparedStatement ps = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.getConnection(); ps =... |
public BoxView(Element element) | public BoxView(Element element, int axis) | public BoxView(Element element) { super(element); } |
myAxis = axis; xLayoutValid = false; yLayoutValid = false; spansX = new int[0]; spansY = new int[0]; offsetsX = new int[0]; offsetsY = new int[0]; width = 0; height = 0; | public BoxView(Element element) { super(element); } | |
if (! isAllocationValid()) layout(a.width, a.height); a.x += offsetsX[index]; a.y += offsetsY[index]; a.width = spansX[index]; a.height = spansY[index]; | protected void childAllocation(int index, Rectangle a) { // TODO: Implement this properly. } | |
return 0F; | SizeRequirements sr = new SizeRequirements(); int pref = baselineRequirements(axis, sr).preferred; return (float) pref; | public float getPreferredSpan(int axis) { // TODO: Implement me. return 0F; } |
return null; | View result = null; int count = getViewCount(); Rectangle copy = new Rectangle(r); for (int i = 0; i < count; ++i) { copy.setBounds(r); childAllocation(i, r); if (copy.contains(x, y)) { result = getView(i); break; } } return result; | protected View getViewAtPoint(int x, int y, Rectangle r) { // TODO: Implement this properly. return null; } |
return false; | boolean result = false; if (myAxis == X_AXIS) result = x > r.x; else result = y > r.y; return result; | protected boolean isAfter(int x, int y, Rectangle r) { // TODO: Implement this properly. return false; } |
return false; | boolean result = false; if (myAxis == X_AXIS) result = x < r.x; else result = y < r.y; return result; | protected boolean isBefore(int x, int y, Rectangle r) { // TODO: Implement this properly. return false; } |
Rectangle bounds = a.getBounds(); if (bounds.width != getWidth() || bounds.height != getHeight()) setSize(bounds.width, bounds.height); Rectangle inside = getInsideAllocation(a); Rectangle copy = new Rectangle(inside); int count = getViewCount(); for (int i = 0; i < count; ++i) { copy.setBounds(inside); paintCh... | public void paint(Graphics g, Shape a) { // TODO: Implement me. } | |
Rectangle new_clip = new Rectangle(left_insets, top_insets, back_width, back_height); | Rectangle new_clip = new Rectangle(left_insets, top_insets, back_width - 1, back_height - 1); | public static void paint(Context c, Box block) { // don't draw if the backgrounds are turned off if (!Configuration.isTrue("xr.renderer.draw.backgrounds", true)) { return; } int width = block.getWidth(); int height = block.getHeight(); Border border = c.getCurren... |
stopService(DEFAULTDS_WRAPPER_DATA_SOURCE_SERVICE_OBJECT_NAME); stopService(DEFAULTDS_CONNECTION_MANAGER_OBJECT_NAME); stopService(DEFAULTDS_MANAGED_CONNECTION_POOL_OBJECT_NAME); stopService(CACHED_CONNECTION_MANAGER_OBJECT_NAME); | if (jca) { stopWrapperDataSourceService(); stopConnectionManager(DEFAULTDS_CONNECTION_MANAGER_OBJECT_NAME); stopManagedConnectionPool(DEFAULTDS_MANAGED_CONNECTION_POOL_OBJECT_NAME); stopManagedConnectionFactory(DEFAULTDS_MANAGED_CONNECTION_FACTORY_OBJECT_NAME); stopService(CACHED_CONNECTION_MANAGER_OBJECT_NAME); } | public void stop() throws Exception { unloadJNDIContexts(); stopService(REMOTING_OBJECT_NAME); stopService(DEFAULTDS_WRAPPER_DATA_SOURCE_SERVICE_OBJECT_NAME); stopService(DEFAULTDS_CONNECTION_MANAGER_OBJECT_NAME); stopService(DEFAULTDS_MANAGED_CONNECTION_POOL_OBJECT_NAME); stopService... |
stopService(DEFAULTDS_MANAGED_CONNECTION_FACTORY_OBJECT_NAME); | public void stop() throws Exception { unloadJNDIContexts(); stopService(REMOTING_OBJECT_NAME); stopService(DEFAULTDS_WRAPPER_DATA_SOURCE_SERVICE_OBJECT_NAME); stopService(DEFAULTDS_CONNECTION_MANAGER_OBJECT_NAME); stopService(DEFAULTDS_MANAGED_CONNECTION_POOL_OBJECT_NAME); stopService... | |
log.debug("stopping " + hsqldbServer); | private void stopInVMDatabase() throws Exception { Class.forName("org.hsqldb.jdbcDriver" ); Connection conn = DriverManager.getConnection("jdbc:hsqldb:mem:test", "sa", ""); Statement stat = conn.createStatement(); stat.executeUpdate("SHUTDOWN"); conn.close(); // faster stop// hsq... | |
throw new Exception("NOT IMPLEMENTED YET!"); | initialContext.unbind("java:/DefaultJMSProvider"); | public void unbindDefaultJMSProvider() throws Exception { //initialContext.unbind("java:/DefaultJMSProvider"); throw new Exception("NOT IMPLEMENTED YET!"); } |
throw new Exception("NOT IMPLEMENTED YET!"); | ObjectName on = JMS_CONNECTION_FACTORY_BINDING_SERVICE_OBJECT_NAME; if (mbeanServer.isRegistered(on)) { mbeanServer.invoke(on, "stop", new Object[0], new String[0]); mbeanServer.invoke(on, "destroy", new Object[0], new String[0]); mbeanServer.unregisterMBean(on); } stopConnectionManager(JMS_CONNECTION_MANAGER_OBJECT_... | public void unbindJCAJMSConnectionFactory() throws Exception { throw new Exception("NOT IMPLEMENTED YET!"); } |
unregisterService(managedConnFactoryObjectName); | stopService(managedConnFactoryObjectName); | private void undeployJBossJMSRA(ObjectName managedConnFactoryObjectName) throws Exception { unregisterService(managedConnFactoryObjectName); } |
public Object clone() throws CloneNotSupportedException, NotImplementedException | public Object clone() throws CloneNotSupportedException | public Object clone() throws CloneNotSupportedException, NotImplementedException { return null; // TODO } |
return null; | DefaultTreeSelectionModel cloned = (DefaultTreeSelectionModel) super.clone(); cloned.selection = (TreePath[]) selection.clone(); cloned.listSelectionModel = (DefaultListSelectionModel) listSelectionModel.clone(); return cloned; | public Object clone() throws CloneNotSupportedException, NotImplementedException { return null; // TODO } |
throws NotImplementedException | protected void insureUniqueness() throws NotImplementedException { // TODO } | |
public void setRowMapper(RowMapper rowMapper) throws NotImplementedException | public void setRowMapper(RowMapper mapper) | public void setRowMapper(RowMapper rowMapper) throws NotImplementedException { // TODO } |
rowMapper = mapper; | public void setRowMapper(RowMapper rowMapper) throws NotImplementedException { // TODO } | |
{ sel.removeAllElements(); } | { int sz = sel.size(); sel.clear(); fireSelectionValueChanged(0, sz, valueIsAdjusting); } | public void clearSelection() { sel.removeAllElements(); } |
boolean isSelectionEmpty() { return sel.size() == 0; } | public boolean isSelectionEmpty() { return sel.isEmpty(); } | boolean isSelectionEmpty() { return sel.size() == 0; } |
{ mode = a; } | { selectionMode = a; } | public void setSelectionMode(int a) { mode = a; } |
if (log.isTraceEnabled()) | if (trace) | public Object invoke(Invocation invocation) throws Throwable { Method method = null; String methodName = null; Object target = null; if (log.isTraceEnabled()) { target = invocation.getTargetObject(); if (!(invocation instanceof MethodInvocation)) { log.tr... |
return sharedContext.getFixedRectangle(); | if (! isPrint()) { return sharedContext.getFixedRectangle(); } else { return new Rectangle(0, -this.page.getTop(), this.page.getContentWidth(this), this.page.getContentHeight(this)-1); } | public Rectangle getFixedRectangle() { return sharedContext.getFixedRectangle(); } |
dialog.pack(); dialog.setLocationRelativeTo(parentComponent); | public JDialog createDialog(Component parentComponent, String title) { Frame toUse = getFrameForComponent(parentComponent); if (toUse == null) toUse = getRootFrame(); JDialog dialog = new JDialog(toUse, title); inputValue = UNINITIALIZED_VALUE; value = UNINITIALIZED_VALUE; // FIXME: This dialo... | |
dialog.pack(); dialog.setLocationRelativeTo(parentComponent); | public static int showConfirmDialog(Component parentComponent, Object message) { JOptionPane pane = new JOptionPane(message, QUESTION_MESSAGE); JDialog dialog = pane.createDialog(parentComponent, "Select an Option"); dialog.pack(); dialog.setLocationRelativeTo(parentComponent); dialog.show(); i... | |
dialog.pack(); dialog.setLocationRelativeTo(parentComponent); | public static String showInputDialog(Component parentComponent, Object message) { JOptionPane pane = new JOptionPane(message, QUESTION_MESSAGE); pane.setWantsInput(true); JDialog dialog = pane.createDialog(parentComponent, null); dialog.pack(); dialog.setLocationR... | |
dialog.pack(); dialog.setLocationRelativeTo(parentComponent); | public static void showMessageDialog(Component parentComponent, Object message) { JOptionPane pane = new JOptionPane(message, INFORMATION_MESSAGE); JDialog dialog = pane.createDialog(parentComponent, null); dialog.pack(); dialog.setLocationRelativeTo(parentComponent)... | |
dialog.pack(); dialog.setLocationRelativeTo(parentComponent); | public static int showOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue)... | |
this(title, false, false, false, false); | this("", false, false, false, false); | public JInternalFrame(String title) { this(title, false, false, false, false); } |
public static void paint(Context c, Box box) { | public static void paint(Context c, Box box, boolean stylePushed) { | public static void paint(Context c, Box box) { // Uu.p("BoxRenderer.paint " + box); Box block = (Box) box; //set the current style //CascadedStyle hoverStyle = null; CascadedStyle style = null; if (block.element != null) style = c.getCss().getCascadedStyle(block.element); ... |
if (block.element != null) style = c.getCss().getCascadedStyle(block.element); | if (!stylePushed && block.element != null) style = c.getCss().getCascadedStyle(block.element); | public static void paint(Context c, Box box) { // Uu.p("BoxRenderer.paint " + box); Box block = (Box) box; //set the current style //CascadedStyle hoverStyle = null; CascadedStyle style = null; if (block.element != null) style = c.getCss().getCascadedStyle(block.element); ... |
if (model == null) throw new IllegalArgumentException("Null 'model' argument."); | public void setModel(ListModel model) { if (this.model == model) return; if (this.model != null) this.model.removeListDataListener(listListener); ListModel old = this.model; this.model = model; if (this.model != null) this.model.addListDataListener(listListener); fire... | |
if (log.isTraceEnabled()) { log.trace("close"); } | if (log.isTraceEnabled()) { log.trace("close (noop)"); } | public void close() throws JMSException { //Currently this does nothing if (log.isTraceEnabled()) { log.trace("close"); } } |
if (log.isTraceEnabled()) { log.trace("closing"); } | if (log.isTraceEnabled()) { log.trace("closing (noop)"); } | public void closing() throws JMSException { //Currently this does nothing if (log.isTraceEnabled()) { log.trace("closing"); } } |
return getLookAndFeelDefaults().get(key); | Object val = null; if (userUIDefaults != null) val = userUIDefaults.get(key); if (val == null) val = getLookAndFeelDefaults().get(key); return val; | public static Object get(Object key) { return getLookAndFeelDefaults().get(key); } |
Boolean value = (Boolean) getLookAndFeelDefaults().get(key); | Boolean value = (Boolean) get(key); | public static boolean getBoolean(Object key) { Boolean value = (Boolean) getLookAndFeelDefaults().get(key); return value != null ? value.booleanValue() : false; } |
return (Border) getLookAndFeelDefaults().get(key); | return (Border) get(key); | public static Border getBorder(Object key) { return (Border) getLookAndFeelDefaults().get(key); } |
return (Color) getLookAndFeelDefaults().get(key); | return (Color) get(key); | public static Color getColor(Object key) { return (Color) getLookAndFeelDefaults().get(key); } |
return (Dimension) getLookAndFeelDefaults().get(key); | return (Dimension) get(key); | public static Dimension getDimension(Object key) { return (Dimension) getLookAndFeelDefaults().get(key); } |
return (Font) getLookAndFeelDefaults().get(key); | return (Font) get(key); | public static Font getFont(Object key) { return (Font) getLookAndFeelDefaults().get(key); } |
return (Icon) getLookAndFeelDefaults().get(key); | return (Icon) get(key); | public static Icon getIcon(Object key) { return (Icon) getLookAndFeelDefaults().get(key); } |
return getLookAndFeelDefaults().getInsets(key); | Object o = get(key); if (o instanceof Insets) return (Insets) o; else return null; | public static Insets getInsets(Object key) { return getLookAndFeelDefaults().getInsets(key); } |
Integer x = (Integer) getLookAndFeelDefaults().get(key); | Integer x = (Integer) get(key); | public static int getInt(Object key) { Integer x = (Integer) getLookAndFeelDefaults().get(key); if (x == null) return 0; return x.intValue(); } |
return (String) getLookAndFeelDefaults().get(key); | return (String) get(key); | public static String getString(Object key) { return (String) getLookAndFeelDefaults().get(key); } |
return getLookAndFeelDefaults().getUI(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; | public static ComponentUI getUI(JComponent target) { return getLookAndFeelDefaults().getUI(target); } |
return getLookAndFeelDefaults().put(key,value); | Object old = get(key); if (userUIDefaults == null) userUIDefaults = new UIDefaults(); userUIDefaults.put(key, value); return old; | public static Object put(Object key, Object value) { return getLookAndFeelDefaults().put(key,value); } |
void addReferences(long channelID, List references) throws Exception; | void addReferences(long channelID, List references, boolean loaded) throws Exception; | void addReferences(long channelID, List references) throws Exception; |
UIDefaults def = UIManager.getLookAndFeelDefaults(); focusColor = def.getColor(getPropertyPrefix() + "focus"); selectColor = def.getColor(getPropertyPrefix() + "select"); disabledTextColor = def.getColor(getPropertyPrefix() + "disabledText"); | focusColor = UIManager.getColor(getPropertyPrefix() + "focus"); selectColor = UIManager.getColor(getPropertyPrefix() + "select"); disabledTextColor = UIManager.getColor(getPropertyPrefix() + "disabledText"); | public MetalButtonUI() { super(); UIDefaults def = UIManager.getLookAndFeelDefaults(); focusColor = def.getColor(getPropertyPrefix() + "focus"); selectColor = def.getColor(getPropertyPrefix() + "select"); disabledTextColor = def.getColor(getPropertyPrefix() + "disabledText"); } |
if (button.isRolloverEnabled()) { if (button.getBorder() instanceof UIResource) button.setBorder(MetalBorders.getRolloverBorder()); } | button.setRolloverEnabled(UIManager.getBoolean( getPropertyPrefix() + "rollover")); | public void installDefaults(AbstractButton button) { super.installDefaults(button); if (button.isRolloverEnabled()) { if (button.getBorder() instanceof UIResource) button.setBorder(MetalBorders.getRolloverBorder()); } } |
if (button.getBorder() instanceof UIResource) button.setBorder(null); | button.setRolloverEnabled(false); | public void uninstallDefaults(AbstractButton button) { super.uninstallDefaults(button); if (button.getBorder() instanceof UIResource) button.setBorder(null); } |
Node addFirst(Object obj); | boolean addFirst(Object obj); | Node addFirst(Object obj); |
Node addLast(Object obj); | boolean addLast(Object obj); | Node addLast(Object obj); |
Queue queue1 = new Queue(1, ms, pm, true, true, 100, 20, 10, new QueuedExecutor(), null); Queue queue2 = new Queue(2, ms, pm, true, true, 50, 10, 5, new QueuedExecutor(), null); | Queue queue1 = new Queue(1, ms, pm, true, true, 100, 20, 10, new QueuedExecutor()); Queue queue2 = new Queue(2, ms, pm, true, true, 50, 10, 5, new QueuedExecutor()); | public void test1() throws Throwable { Queue queue1 = new Queue(1, ms, pm, true, true, 100, 20, 10, new QueuedExecutor(), null); Queue queue2 = new Queue(2, ms, pm, true, true, 50, 10, 5, new QueuedExecutor(), null); Message[] msgs = new Message[150]; Mes... |
restyleChildren(ctx,box); | public void restyle(Context ctx, Box box) { box.color = ctx.css.getStyle(box.getRealElement()).getColor(); box.setBorderColor(ctx.css.getStyle(box.getRealElement()).getBorderColor()); box.border_style = ctx.css.getStyle(box.getRealElement()).getStringProperty("border-top-style"); box.bac... | |
if (file.exists() && (file.lastModified() > c.lastModified)) { | if (file.exists() && file.lastModified() > c.lastModified) { | public WorkflowDescriptor getWorkflow(String name) throws FactoryException { WorkflowConfig c = (WorkflowConfig) workflows.get(name); if (c == null) { throw new FactoryException("Unknown workflow name \"" + name + "\""); } if (c.descriptor != null) { if (reload) { ... |
if ((name != null) && (name.indexOf(":/") > -1)) { | if (name != null && name.indexOf(":/") > -1) { | public void initDone() throws FactoryException { reload = getProperties().getProperty("reload", "false").equals("true"); ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); InputStream is = null; String name = getProperties().getProperty("resource", "workflows.xml")... |
DocumentBuilder db = null; | DocumentBuilder db; | public void initDone() throws FactoryException { reload = getProperties().getProperty("reload", "false").equals("true"); ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); InputStream is = null; String name = getProperties().getProperty("resource", "workflows.xml")... |
if ((c != null) && !replace) { | if (c != null && !replace) { | public boolean saveWorkflow(String name, WorkflowDescriptor descriptor, boolean replace) throws FactoryException { WorkflowConfig c = (WorkflowConfig) workflows.get(name); if ((c != null) && !replace) { return false; } if (c == null) { throw new UnsupportedOperation... |
int value = layoutManager.getInitialLocation(jc.getInsets()) - layoutManager.getAvailableSize(jc.getSize(), jc.getInsets()) + splitPane.getDividerSize(); if (layoutManager.components[1] != null) value += layoutManager.minimumSizeOfComponent(1); | int value = layoutManager.getInitialLocation(jc.getInsets()); if (layoutManager.components[0] != null) value -= layoutManager.minimumSizeOfComponent(0); | public int getMinimumDividerLocation(JSplitPane jc) { int value = layoutManager.getInitialLocation(jc.getInsets()) - layoutManager.getAvailableSize(jc.getSize(), jc.getInsets()) + splitPane.getDividerSize(); if (layoutManager.components[1] != null) value += layoutManager.mini... |
Dimension rightPrefSize = jc.getRightComponent().getPreferredSize(); | Component right = jc.getRightComponent(); Dimension rightPrefSize = right == null ? new Dimension(0, 0) : right.getPreferredSize(); | public void setDividerLocation(JSplitPane jc, int location) { location = validLocation(location); Container p = jc.getParent(); Dimension rightPrefSize = jc.getRightComponent().getPreferredSize(); Dimension size = jc.getSize(); // check if the size has been set for the splitpane if (size.width == 0... |
if (! splitPane.getLeftComponent().isLightweight() || ! splitPane.getRightComponent().isLightweight()) | if ((left != null && !left.isLightweight()) || (right != null && !right.isLightweight())) | protected void startDragging() { dividerSize = divider.getDividerSize(); setLastDragLocation(-1); if (! splitPane.getLeftComponent().isLightweight() || ! splitPane.getRightComponent().isLightweight()) draggingHW = true; if (splitPane.isContinuousLayout()) nonContinuousLayoutDivider.setVi... |
String file = fd.getDirectory() + fd.getFile(); root.panel.loadPage(file); | if(fd.getFile() != null) { String url = new File(fd.getDirectory(),fd.getFile()).toURI().toURL().toString(); root.panel.loadPage(url); } | public void init() { URL url = null; url = this.getClass().getClassLoader().getResource("images/Stop24.gif"); stop = new AbstractAction("", new ImageIcon(url)) { public void actionPerformed(ActionEvent evt) { // TODO: stop not coded System.out.println("stop called")... |
String file = fd.getDirectory() + fd.getFile(); root.panel.loadPage(file); | if(fd.getFile() != null) { String url = new File(fd.getDirectory(),fd.getFile()).toURI().toURL().toString(); root.panel.loadPage(url); } | public void actionPerformed(ActionEvent evt) { try { FileDialog fd = new FileDialog(root.frame, "Open a local file", FileDialog.LOAD); fd.show(); String file = fd.getDirectory() + fd.getFile(); ... |
registry.unbind(RMI_SERVER_PREFIX + server.getServerIndex()); | public void run() { log.info("shutting down the VM"); try { // unregister myself from the RMI registry Registry registry = LocateRegistry.getRegistry(DEFAULT_REGISTRY_PORT); registry.unbind(RMI_SERVER_PREFIX + server.getServerIndex()); log.i... | |
log.info("unregistred from " + registry); | String name = RMI_SERVER_PREFIX + server.getServerID(); registry.unbind(name); log.info("unregistred " + name + " from registry"); | public void run() { log.info("shutting down the VM"); try { // unregister myself from the RMI registry Registry registry = LocateRegistry.getRegistry(DEFAULT_REGISTRY_PORT); registry.unbind(RMI_SERVER_PREFIX + server.getServerIndex()); log.i... |
name = NAMING_SERVER_PREFIX + server.getServerID(); registry.unbind(name); log.info("unregistred " + name + " from registry"); | public void run() { log.info("shutting down the VM"); try { // unregister myself from the RMI registry Registry registry = LocateRegistry.getRegistry(DEFAULT_REGISTRY_PORT); registry.unbind(RMI_SERVER_PREFIX + server.getServerIndex()); log.i... | |
if (c.isInteractive()) { | if (c.isInteractive() && !c.isPrint()) { | public static void layoutContent(Context c, Box box, List contentList, Box block) { // prepare for the list items int old_counter = c.getListCounter(); c.setListCounter(0); Iterator contentIterator = contentList.iterator(); while (contentIterator.hasNext()) { Object o =... |
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); scrollBarWidth = defaults.getInt("ScrollBar.width"); | scrollBarWidth = UIManager.getInt("ScrollBar.width"); | protected JButton createDecreaseButton(int orientation) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); scrollBarWidth = defaults.getInt("ScrollBar.width"); decreaseButton = new MetalScrollButton(orientation, scrollBarWidth, isFreeStanding); return decreaseButton; } |
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); scrollBarWidth = defaults.getInt("ScrollBar.width"); | scrollBarWidth = UIManager.getInt("ScrollBar.width"); | protected JButton createIncreaseButton(int orientation) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); scrollBarWidth = defaults.getInt("ScrollBar.width"); increaseButton = new MetalScrollButton(orientation, scrollBarWidth, isFreeStanding); return increaseButton; } |
UIDefaults def = UIManager.getLookAndFeelDefaults(); g.setColor(def.getColor("ScrollBar.shadow")); | g.setColor(UIManager.getColor("ScrollBar.shadow")); | private void paintThumbHorizontal(Graphics g, JComponent c, Rectangle thumbBounds) { int x = thumbBounds.x; int y = thumbBounds.y; int w = thumbBounds.width; int h = thumbBounds.height; // first we fill the background g.setColor(thumbColor); if (isFreeStanding) g.fillRect(x, ... |
UIDefaults def = UIManager.getLookAndFeelDefaults(); g.setColor(def.getColor("ScrollBar.shadow")); | g.setColor(UIManager.getColor("ScrollBar.shadow")); | private void paintThumbVertical(Graphics g, JComponent c, Rectangle thumbBounds) { int x = thumbBounds.x; int y = thumbBounds.y; int w = thumbBounds.width; int h = thumbBounds.height; // first we fill the background g.setColor(thumbColor); if (isFreeStanding) g.fillRect(x, y, ... |
try | if (handler == null) handler = defaultFactory.createContentHandler(contentType); if (handler == null) | private ContentHandler getContentHandler(String contentType) { // No content type so just handle it as the default. if (contentType == null || contentType.equals("")) return null; ContentHandler handler = null; // If a non-default factory has been set, use it. if (factory != null) handler = ... |
String typeClass = contentType.replace('/', '.'); | String propVal = SystemProperties.getProperty("java.content.handler.pkgs"); propVal = (((propVal == null) ? "" : (propVal + "|")) + "gnu.java.net.content|sun.net.www.content"); | private ContentHandler getContentHandler(String contentType) { // No content type so just handle it as the default. if (contentType == null || contentType.equals("")) return null; ContentHandler handler = null; // If a non-default factory has been set, use it. if (factory != null) handler = ... |
int parameterBegin = typeClass.indexOf(';'); | int parameterBegin = contentType.indexOf(';'); | private ContentHandler getContentHandler(String contentType) { // No content type so just handle it as the default. if (contentType == null || contentType.equals("")) return null; ContentHandler handler = null; // If a non-default factory has been set, use it. if (factory != null) handler = ... |
typeClass = typeClass.substring(0, parameterBegin); | contentType = contentType.substring(0, parameterBegin); contentType = contentType.trim(); | private ContentHandler getContentHandler(String contentType) { // No content type so just handle it as the default. if (contentType == null || contentType.equals("")) return null; ContentHandler handler = null; // If a non-default factory has been set, use it. if (factory != null) handler = ... |
Class cls = Class.forName("gnu.java.net.content." + typeClass); Object obj = cls.newInstance(); | char[] cArray = contentType.toCharArray(); for (int i = 0; i < cArray.length; i++) { if (cArray[i] == '/') cArray[i] = '.'; else if (! ((cArray[i] >= 'A' && cArray[i] <= 'Z') || (cArray[i] >= 'a' && cArray[i] <= 'z') || (cArray[i] >= '0' && cArray[i] <= '9'))) cArray[i] = '_'; } String contentClass = new String(cArray)... | private ContentHandler getContentHandler(String contentType) { // No content type so just handle it as the default. if (contentType == null || contentType.equals("")) return null; ContentHandler handler = null; // If a non-default factory has been set, use it. if (factory != null) handler = ... |
if (obj instanceof ContentHandler) | StringTokenizer pkgPrefix = new StringTokenizer(propVal, "|"); do | private ContentHandler getContentHandler(String contentType) { // No content type so just handle it as the default. if (contentType == null || contentType.equals("")) return null; ContentHandler handler = null; // If a non-default factory has been set, use it. if (factory != null) handler = ... |
handler = (ContentHandler) obj; return handler; } | String facName = pkgPrefix.nextToken() + "." + contentClass; try { handler = (ContentHandler) Class.forName(facName).newInstance(); | private ContentHandler getContentHandler(String contentType) { // No content type so just handle it as the default. if (contentType == null || contentType.equals("")) return null; ContentHandler handler = null; // If a non-default factory has been set, use it. if (factory != null) handler = ... |
catch (ClassNotFoundException e) | catch (Exception e) | private ContentHandler getContentHandler(String contentType) { // No content type so just handle it as the default. if (contentType == null || contentType.equals("")) return null; ContentHandler handler = null; // If a non-default factory has been set, use it. if (factory != null) handler = ... |
catch (InstantiationException e) { } catch (IllegalAccessException e) { | } while (handler == null && pkgPrefix.hasMoreTokens()); | private ContentHandler getContentHandler(String contentType) { // No content type so just handle it as the default. if (contentType == null || contentType.equals("")) return null; ContentHandler handler = null; // If a non-default factory has been set, use it. if (factory != null) handler = ... |
throws IOException | throws IOException, NotImplementedException | public static String guessContentTypeFromStream(InputStream is) throws IOException { return "application/octet-stream"; } |
drainDestination(cf, queue); | public void setUp() throws Exception { super.setUp(); ServerManagement.start("all"); initialContext = new InitialContext(ServerManagement.getJNDIEnvironment()); cf = (JBossConnectionFactory)initialContext.lookup("/ConnectionFactory"); ServerManagement.und... | |
newsess.commit(); | public void testRollbackRecover() throws Exception { TopicConnection conn = null; try { conn = cf.createTopicConnection(); TopicSession sess = conn.createTopicSession(true, 0); TopicPublisher pub = sess.createPublisher(topic); TopicSubscriber cons = sess.createS... | |
lx + inline.x + xoff, ly + inline.y - inline.height, dw - xoff, inline.height); | lx + inline.x + xoff, top, dw - xoff, height); | public static void paintSelection(Context c, InlineBox inline, int lx, int ly) { if (c.inSelection(inline)) { int dw = inline.width - 2; int xoff = 0; if (c.getSelectionEnd() == inline) { dw = c.getSelectionEndX(); } if (c.getSelectionStar... |
historySteps.add(simpleStep); | historySteps.add(0, simpleStep); | public void moveToHistory(Step step) { List currentSteps = (List) currentStepsCache.get(new Long(step.getEntryId())); List historySteps = (List) historyStepsCache.get(new Long(step.getEntryId())); if (historySteps == null) { historySteps = new ArrayList(); historyStepsCach... |
if (!(content instanceof ReplacedContent)) { | if (!(content instanceof InlineBlockContent)) { | public static void setupVerticalAlign(Context c, CalculatedStyle style, InlineBox box) { Content content = box.getContent(); //not used: CalculatedStyle parent_style = c.css.getStyle(LineBreaker.getElement(parent)); Font parent_font = FontUtil.getFont(c, style); LineMetrics parent_metric... |
return echoChar == 0; | return echoChar != 0; | public boolean echoCharIsSet() { return echoChar == 0; } |
return null; | try { return getDocument().getText(0, getDocument().getLength()); } catch (BadLocationException ble) { throw new AssertionError("This should not happen"); } | public String getText() { return null; // TODO } |
return null; | try { return getText(); } catch (NullPointerException npe) { return ""; } | protected String paramString() { return null; // TODO } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.