rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
return new CustomPortView(cell); | WorkflowPort port = (WorkflowPort)cell; if(port.getIndex() == 0) return new CustomPortView(cell); return new PortView(cell); | public CellView createView(GraphModel model, Object cell) { if(model.isPort(cell)) { return new CustomPortView(cell); } else if(model.isEdge(cell)) { CustomEdgeView view = (CustomEdgeView)edgeMap.get(cell); if(view == null) { view = new CustomEdgeView(cell); edgeMap.p... |
ServerManagement.setDefaultSecurityConfig(toElement(defaultSecurityConfig)); | ServerManagement.setDefaultSecurityConfig(defaultSecurityConfig); | protected void setUp() throws Exception { super.setUp(); ServerManagement.start("all"); setupDestinations(); final String defaultSecurityConfig = "<security><role name=\"def\" read=\"true\" write=\"true\" create=\"true\"/></security>"; oldDefaultConfig = ServerManageme... |
ServerManagement.setSecurityConfig("testQueue", toElement(testQueueConf)); | ServerManagement.setSecurityConfig("testQueue", testQueueConf); | private void setupDestinations() throws Exception { ServerManagement.undeployQueue("testQueue"); ServerManagement.deployQueue("testQueue"); final String testQueueConf = "<security>" + "<role name=\"guest\" read=\"true\" write=\"true\"/>" + "<role name=\"pub... |
ServerManagement.setSecurityConfig("testTopic", toElement(testTopicConf)); | ServerManagement.setSecurityConfig("testTopic", testTopicConf); | private void setupDestinations() throws Exception { ServerManagement.undeployQueue("testQueue"); ServerManagement.deployQueue("testQueue"); final String testQueueConf = "<security>" + "<role name=\"guest\" read=\"true\" write=\"true\"/>" + "<role name=\"pub... |
ServerManagement.setSecurityConfig("testSecuredTopic", toElement(testSecuredTopicConf)); | ServerManagement.setSecurityConfig("testSecuredTopic", testSecuredTopicConf); | private void setupDestinations() throws Exception { ServerManagement.undeployQueue("testQueue"); ServerManagement.deployQueue("testQueue"); final String testQueueConf = "<security>" + "<role name=\"guest\" read=\"true\" write=\"true\"/>" + "<role name=\"pub... |
c2.setMessageListener(new MessageListener() | class Listener implements MessageListener | public void testReceive2() throws Exception { Connection conn = null; try { conn = cf.createConnection(); Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); s.createConsumer(queue); conn.start(); MessageProducer p = s.createProducer(queue)... |
received.add(m); received.notify(); | received.add(m); latch.release(); | public void testReceive2() throws Exception { Connection conn = null; try { conn = cf.createConnection(); Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); s.createConsumer(queue); conn.start(); MessageProducer p = s.createProducer(queue)... |
}); | } Listener list = new Listener(); c2.setMessageListener(list); | public void testReceive2() throws Exception { Connection conn = null; try { conn = cf.createConnection(); Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); s.createConsumer(queue); conn.start(); MessageProducer p = s.createProducer(queue)... |
synchronized(received) { received.wait(3000); } | list.latch.acquire(); | public void testReceive2() throws Exception { Connection conn = null; try { conn = cf.createConnection(); Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); s.createConsumer(queue); conn.start(); MessageProducer p = s.createProducer(queue)... |
for (int i = 0; i < count; i++) { Message m = producerSession.createMessage(); topicProducer.send(m); } | topicConsumer.close(); | public void run() { try { // this is needed to make sure the main thread has enough time to block Thread.sleep(1000); for (int i = 0; i < count; i++) { Message m = producerSession.createMessage(); ... |
finally { latch.release(); } | public void run() { try { // this is needed to make sure the main thread has enough time to block Thread.sleep(1000); for (int i = 0; i < count; i++) { Message m = producerSession.createMessage(); ... | |
topicProducer.send(m); | topicProducer.send(m1); | public void run() { try { // this is needed to make sure the main thread has enough time to block Thread.sleep(1000); topicProducer.send(m); } catch(Exception e) { log.error(e); } ... |
TextMessage tm1 = sess.createTextMessage("hello1"); TextMessage tm2 = sess.createTextMessage("hello2"); TextMessage tm3 = sess.createTextMessage("hello3"); | TextMessage tm1 = sess.createTextMessage("a"); TextMessage tm2 = sess.createTextMessage("b"); TextMessage tm3 = sess.createTextMessage("c"); | public void testRedel0() throws Exception { Connection conn = null; try { conn = cf.createConnection(); conn.start(); Session sess = conn.createSession(true, Session.SESSION_TRANSACTED); MessageProducer prod = sess.createProducer(queue); ... |
TextMessage rm1 = (TextMessage)cons1.receive(1500); | TextMessage rm1 = (TextMessage)cons1.receive(); | public void testRedel0() throws Exception { Connection conn = null; try { conn = cf.createConnection(); conn.start(); Session sess = conn.createSession(true, Session.SESSION_TRANSACTED); MessageProducer prod = sess.createProducer(queue); ... |
assertEquals("hello1", rm1.getText()); | assertEquals("a", rm1.getText()); | public void testRedel0() throws Exception { Connection conn = null; try { conn = cf.createConnection(); conn.start(); Session sess = conn.createSession(true, Session.SESSION_TRANSACTED); MessageProducer prod = sess.createProducer(queue); ... |
assertEquals("hello2", rm2.getText()); | assertEquals("b", rm2.getText()); | public void testRedel0() throws Exception { Connection conn = null; try { conn = cf.createConnection(); conn.start(); Session sess = conn.createSession(true, Session.SESSION_TRANSACTED); MessageProducer prod = sess.createProducer(queue); ... |
assertEquals("hello3", rm3.getText()); | assertEquals("c", rm3.getText()); | public void testRedel0() throws Exception { Connection conn = null; try { conn = cf.createConnection(); conn.start(); Session sess = conn.createSession(true, Session.SESSION_TRANSACTED); MessageProducer prod = sess.createProducer(queue); ... |
assertEquals(m.getText(), "One"); | assertEquals("One", m.getText()); | public void testSendMessageAndCloseConsumer2() throws Exception { // create my consumer from scratch consumerConnection.close(); TextMessage tm = producerSession.createTextMessage(); tm.setText("One"); queueProducer.send(tm); tm.setText("Two"); queueProducer.send(tm);... |
Thread.sleep(timeToSleep); topicConsumer.close(); | topicConsumer.receive(3000); | public void run() { try { // this is needed to make sure the main thread has enough time to block Thread.sleep(timeToSleep); topicConsumer.close(); } catch(Exception e) { log.error(e); ... |
log.error(e); | e.printStackTrace(); | public void run() { try { // this is needed to make sure the main thread has enough time to block Thread.sleep(timeToSleep); topicConsumer.close(); } catch(Exception e) { log.error(e); ... |
finally { latch.release(); } } | }}, "Receiver"); | public void run() { try { // this is needed to make sure the main thread has enough time to block Thread.sleep(timeToSleep); topicConsumer.close(); } catch(Exception e) { log.error(e); ... |
topicProducer.send(m1); | for (int i = 0; i < count; i++) { Message m = producerSession.createMessage(); queueProducer.send(m); } | public void run() { try { // this is needed to make sure the main thread has enough time to block Thread.sleep(1000); topicProducer.send(m1); } catch(Exception e) { log.error(e); } ... |
queueProducer.send(m); | topicProducer.send(m); | public void run() { try { // this is needed to make sure the main thread has enough time to block Thread.sleep(1000); for (int i = 0; i < count; i++) { Message m = producerSession.createMessage(); ... |
Thread.sleep(1000); | Thread.sleep(timeToSleep); | public void run() { try { // this is needed to make sure the main thread has enough time to block Thread.sleep(1000); topicConsumer.close(); } catch(Exception e) { log.error(e); } ... |
mgr.unregisterConnection(connection.getJmsClientVMId(), connection.getRemotingClientSessionId()); | mgr.handleClientFailure(connection.getRemotingClientSessionId()); | public void run() { try { if (trace) { log.trace("handing " + this.msg + " over to the remoting layer"); } MessagingMarshallable mm = new MessagingMarshallable(connection.getUsingVersion(), this); connection.getCallbackClient().invoke(mm); } ca... |
height = Math.max(20, height); | void calculatePreferredSize() { // System.err.println(this + ".calculatePreferredSize()"); int height; int width; height = width = 0; if (scrollbar.getOrientation() == SwingConstants.HORIZONTAL) { width += incrButton.getPreferredSize().getWidth(); width += decrButton.getPreferredSize().getWidth()... | |
width = Math.max(20, width); | void calculatePreferredSize() { // System.err.println(this + ".calculatePreferredSize()"); int height; int width; height = width = 0; if (scrollbar.getOrientation() == SwingConstants.HORIZONTAL) { width += incrButton.getPreferredSize().getWidth(); width += decrButton.getPreferredSize().getWidth()... | |
stub = new ConnectionStub(scd.getConnectionID(), serverPeer.getLocator()); | stub = new ConnectionStub(scd.getConnectionID(), serverPeer.getLocator(), serverPeer.getServerPeerID()); | public ConnectionDelegate createConnectionDelegate(String username, String password) throws JMSException { log.debug("Creating a new connection with username=" + username); //authenticate the user serverPeer.getSecurityManager().authenticate(username, password); //See if there is... |
assertEquals(8, propNames.size()); | assertEquals(9, propNames.size()); | public void testProperties() throws Exception { Message m1 = queueProducerSession.createMessage(); //Some arbitrary values boolean myBool = true; byte myByte = 13; short myShort = 15321; int myInt = 0x71ab6c80; long myLong = 0x20bf1e3fb6fa31dfL; float myFloat = Float.MAX_VAL... |
assertFalse(m2.getPropertyNames().hasMoreElements()); | Enumeration en2 = m2.getPropertyNames(); assertTrue(en2.hasMoreElements()); en2.nextElement(); assertFalse(en2.hasMoreElements()); | public void testProperties() throws Exception { Message m1 = queueProducerSession.createMessage(); //Some arbitrary values boolean myBool = true; byte myByte = 13; short myShort = 15321; int myInt = 0x71ab6c80; long myLong = 0x20bf1e3fb6fa31dfL; float myFloat = Float.MAX_VAL... |
html = new XHTMLPanel(); frame.getContentPane().add(new FSScrollPane(html)); frame.pack(); frame.setSize(1024, 768); frame.setVisible(true); frame.addComponentListener(new ComponentAdapter() { public void componentResized(ComponentEvent e) { html.relayout(); } }); nextDemoAction = new NextDemoAction(); chooseDemoActi... | try { html.getRenderingContext().setFontMapping("Ahem", Font.createFont(Font.TRUETYPE_FONT, new URL("file: } catch (FontFormatException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); | public void run() { html = new XHTMLPanel(); frame.getContentPane().add(new FSScrollPane(html)); frame.pack(); frame.setSize(1024, 768); frame.setVisible(true); frame.addComponentListener(ne... |
} | public void run() { html = new XHTMLPanel(); frame.getContentPane().add(new FSScrollPane(html)); frame.pack(); frame.setSize(1024, 768); frame.setVisible(true); frame.addComponentListener(ne... | |
showHelpPage(); | SwingUtilities.invokeLater(new Runnable() { public void run() { showHelpPage(); } }); | private void run(String args[]) { buildFrame(); directory = args[0]; testFiles = buildFileList(); try { //switchPage( (File)testFiles.get( 0 ) ); showHelpPage(); } catch (Exception ex) { ex.printStackTrace(); } } |
ps = conn.prepareStatement(getSQLStatement("SELECT_COUNTER")); | String selectCounterSQL = getSQLStatement("SELECT_COUNTER"); ps = conn.prepareStatement(selectCounterSQL); | public long reserveIDBlock(String counterName, int size) throws Exception { //TODO This will need locking (e.g. SELECT ... FOR UPDATE...) in the clustered case if (trace) { log.trace("Getting id block for counter: " + counterName + " ,size: " + size); } if (size <= 0) { thr... |
ps = conn.prepareStatement(getSQLStatement("INSERT_COUNTER")); | String insertCounterSQL = getSQLStatement("INSERT_COUNTER"); ps = conn.prepareStatement(insertCounterSQL); | public long reserveIDBlock(String counterName, int size) throws Exception { //TODO This will need locking (e.g. SELECT ... FOR UPDATE...) in the clustered case if (trace) { log.trace("Getting id block for counter: " + counterName + " ,size: " + size); } if (size <= 0) { thr... |
int rows = ps.executeUpdate(); if (trace) { log.trace(JDBCUtil.statementToString(getSQLStatement("INSERT_COUNTER"), counterName) | if (trace) { log.trace("inserting counter: " + insertCounterSQL); } int rows = ps.executeUpdate(); if (trace) { log.trace(JDBCUtil.statementToString(insertCounterSQL, counterName) | public long reserveIDBlock(String counterName, int size) throws Exception { //TODO This will need locking (e.g. SELECT ... FOR UPDATE...) in the clustered case if (trace) { log.trace("Getting id block for counter: " + counterName + " ,size: " + size); } if (size <= 0) { thr... |
if (trace) { log.trace(JDBCUtil.statementToString(getSQLStatement("SELECT_COUNTER"), counterName)); } | public long reserveIDBlock(String counterName, int size) throws Exception { //TODO This will need locking (e.g. SELECT ... FOR UPDATE...) in the clustered case if (trace) { log.trace("Getting id block for counter: " + counterName + " ,size: " + size); } if (size <= 0) { thr... | |
ps = conn.prepareStatement(getSQLStatement("UPDATE_COUNTER")); | String updateCounterSQL = getSQLStatement("UPDATE_COUNTER"); ps = conn.prepareStatement(updateCounterSQL); | public long reserveIDBlock(String counterName, int size) throws Exception { //TODO This will need locking (e.g. SELECT ... FOR UPDATE...) in the clustered case if (trace) { log.trace("Getting id block for counter: " + counterName + " ,size: " + size); } if (size <= 0) { thr... |
int rows = ps.executeUpdate(); if (trace) { log.trace(JDBCUtil.statementToString(getSQLStatement("UPDATE_COUNTER"), new Long(nextId + size), | if (trace) { log.trace("updating counter: " + updateCounterSQL); } int rows = ps.executeUpdate(); if (trace) { log.trace(JDBCUtil.statementToString(updateCounterSQL, new Long(nextId + size), | public long reserveIDBlock(String counterName, int size) throws Exception { //TODO This will need locking (e.g. SELECT ... FOR UPDATE...) in the clustered case if (trace) { log.trace("Getting id block for counter: " + counterName + " ,size: " + size); } if (size <= 0) { thr... |
for (java.util.Iterator i = cs.getMatchedPropertyDeclarations(); i.hasNext();) { | for (java.util.Iterator i = cs.getCascadedPropertyDeclarations(); i.hasNext();) { | public java.util.Map getCascadedPropertiesMap(Element e) { CascadedStyle cs = _matcher.getCascadedStyle(e, false);//this is only for debug, I think java.util.LinkedHashMap props = new java.util.LinkedHashMap(); for (java.util.Iterator i = cs.getMatchedPropertyDeclarations(); i.hasNext();) { ... |
Provider[] provs = Security.getProviders(); String msg = algorithm; for (int i = 0; i < provs.length; i++) { | Provider[] p = Security.getProviders(); NoSuchAlgorithmException lastException = null; for (int i = 0; i < p.length; i++) | public static final KeyAgreement getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); String msg = algorithm; for (int i = 0; i < provs.length; i++) { try { return getInstance(algorithm, provs[i]); } ca... |
return getInstance(algorithm, provs[i]); | return getInstance(algorithm, p[i]); | public static final KeyAgreement getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); String msg = algorithm; for (int i = 0; i < provs.length; i++) { try { return getInstance(algorithm, provs[i]); } ca... |
catch (NoSuchAlgorithmException nsae) | catch (NoSuchAlgorithmException x) | public static final KeyAgreement getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); String msg = algorithm; for (int i = 0; i < provs.length; i++) { try { return getInstance(algorithm, provs[i]); } ca... |
msg = nsae.getMessage(); } | lastException = x; | public static final KeyAgreement getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); String msg = algorithm; for (int i = 0; i < provs.length; i++) { try { return getInstance(algorithm, provs[i]); } ca... |
throw new NoSuchAlgorithmException(msg); | if (lastException != null) throw lastException; throw new NoSuchAlgorithmException(algorithm); | public static final KeyAgreement getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); String msg = algorithm; for (int i = 0; i < provs.length; i++) { try { return getInstance(algorithm, provs[i]); } ca... |
public static Box layoutChildren(LayoutContext c, Box box, Content content) { | public static Box layoutChildren(LayoutContext c, BlockBox box, Content content) { | public static Box layoutChildren(LayoutContext c, Box box, Content content) { List contentList = content.getChildContent(c); box.setState(Box.CHILDREN_FLUX); if (contentList != null && contentList.size() > 0) { Content parent = c.getParentContent(); c.setParentContent(cont... |
Thread.sleep(20000); | Thread.sleep(30000); | public void testClientCrash() throws Exception { if (!ServerManagement.isRemote()) return; InitialContext ic = new InitialContext(InVMInitialContextFactory.getJNDIEnvironment()); ConnectionFactory cf = (ConnectionFactory)ic.lookup("/ConnectionFactory"); Queue queue = (Queue)i... |
private static boolean isAbsolute(Context c, Box box) { String position = LayoutUtil.getPosition(c, box); | private static boolean isAbsolute(Box box) { String position = LayoutUtil.getPosition(box.getContent().getStyle()); | private static boolean isAbsolute(Context c, Box box) { String position = LayoutUtil.getPosition(c, box); if (position.equals("absolute")) { return true; } return false; } |
if (isAbsolute(c, block)) { | if (isAbsolute(block)) { | public static void postChildrenLayout(Context c, Box block) { if (isAbsolute(c, block)) { c.getBlockFormattingContext().doFinalAdjustments(); c.popBFC(); } } |
if (isAbsolute(c, block)) { | if (isAbsolute(block)) { | public static void preChildrenLayout(Context c, Box block) { if (isAbsolute(c, block)) { BlockFormattingContext bfc = new BlockFormattingContext(block); bfc.setWidth(block.width); c.pushBFC(bfc); } } |
public static void setupAbsolute(Context c, Box box) { String position = LayoutUtil.getPosition(c, box); | public static void setupAbsolute(Box box) { CalculatedStyle style = box.getContent().getStyle(); String position = LayoutUtil.getPosition(style); | public static void setupAbsolute(Context c, Box box) { String position = LayoutUtil.getPosition(c, box); if (position.equals("absolute")) { if (c.css.getStyle(box.getNode()).hasProperty("right")) { //u.p("prop = " + c.css.getProperty(box.getRealElement(),"right",false)); ... |
if (c.css.getStyle(box.getNode()).hasProperty("right")) { | if (style.hasProperty("right")) { | public static void setupAbsolute(Context c, Box box) { String position = LayoutUtil.getPosition(c, box); if (position.equals("absolute")) { if (c.css.getStyle(box.getNode()).hasProperty("right")) { //u.p("prop = " + c.css.getProperty(box.getRealElement(),"right",false)); ... |
if (LayoutUtil.hasIdent(c, box.getRealElement(), "right", false)) { if (c.css.getStyle(box.getNode()).getStringProperty("right").equals("auto")) { | if (style.isIdentifier("right")) { if (style.getStringProperty("right").equals("auto")) { | public static void setupAbsolute(Context c, Box box) { String position = LayoutUtil.getPosition(c, box); if (position.equals("absolute")) { if (c.css.getStyle(box.getNode()).hasProperty("right")) { //u.p("prop = " + c.css.getProperty(box.getRealElement(),"right",false)); ... |
box.right = (int) c.css.getStyle(box.getNode()).getFloatPropertyRelative("right", 0); | box.right = (int) style.getFloatPropertyRelative("right", 0); | public static void setupAbsolute(Context c, Box box) { String position = LayoutUtil.getPosition(c, box); if (position.equals("absolute")) { if (c.css.getStyle(box.getNode()).hasProperty("right")) { //u.p("prop = " + c.css.getProperty(box.getRealElement(),"right",false)); ... |
if (c.css.getStyle(box.getNode()).hasProperty("left")) { | if (style.hasProperty("left")) { | public static void setupAbsolute(Context c, Box box) { String position = LayoutUtil.getPosition(c, box); if (position.equals("absolute")) { if (c.css.getStyle(box.getNode()).hasProperty("right")) { //u.p("prop = " + c.css.getProperty(box.getRealElement(),"right",false)); ... |
if (LayoutUtil.hasIdent(c, box.getRealElement(), "left", false)) { if (c.css.getStyle(box.getNode()).getStringProperty("left").equals("auto")) { | if (style.isIdentifier("left")) { if (style.getStringProperty("left").equals("auto")) { | public static void setupAbsolute(Context c, Box box) { String position = LayoutUtil.getPosition(c, box); if (position.equals("absolute")) { if (c.css.getStyle(box.getNode()).hasProperty("right")) { //u.p("prop = " + c.css.getProperty(box.getRealElement(),"right",false)); ... |
box.left = (int) c.css.getStyle(box.getNode()).getFloatPropertyRelative("left", 0); | box.left = (int) style.getFloatPropertyRelative("left", 0); | public static void setupAbsolute(Context c, Box box) { String position = LayoutUtil.getPosition(c, box); if (position.equals("absolute")) { if (c.css.getStyle(box.getNode()).hasProperty("right")) { //u.p("prop = " + c.css.getProperty(box.getRealElement(),"right",false)); ... |
if (c.css.getStyle(box.getNode()).hasProperty("bottom")) { box.top = (int) c.css.getStyle(box.getNode()).getFloatPropertyRelative("bottom", 0); | if (style.hasProperty("bottom")) { box.top = (int) style.getFloatPropertyRelative("bottom", 0); | public static void setupAbsolute(Context c, Box box) { String position = LayoutUtil.getPosition(c, box); if (position.equals("absolute")) { if (c.css.getStyle(box.getNode()).hasProperty("right")) { //u.p("prop = " + c.css.getProperty(box.getRealElement(),"right",false)); ... |
if (c.css.getStyle(box.getNode()).hasProperty("top")) { box.top = (int) c.css.getStyle(box.getNode()).getFloatPropertyRelative("top", 0); | if (style.hasProperty("top")) { box.top = (int) style.getFloatPropertyRelative("top", 0); | public static void setupAbsolute(Context c, Box box) { String position = LayoutUtil.getPosition(c, box); if (position.equals("absolute")) { if (c.css.getStyle(box.getNode()).hasProperty("right")) { //u.p("prop = " + c.css.getProperty(box.getRealElement(),"right",false)); ... |
sb.append(" " + this.hashCode()+" "); | public String getTestString() { StringBuffer sb = new StringBuffer(); // type if (this instanceof LineBox) { sb.append("line:"); } else if (this instanceof InlineBox) { sb.append("inline:"); } else { sb.append("box:"); } sb.append("el... | |
input = new SAXSource( xmlReader, target.getResourceInputSource()); output = new DOMResult(); | input = new SAXSource(xmlReader, target.getResourceInputSource()); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); output = new DOMResult(dbf.newDocumentBuilder().newDocument()); | XMLResource createXMLResource(XMLResource target) { Source input = null; DOMResult output = null; TransformerFactory xformFactory = null; Transformer idTransform = null; XMLReader xmlReader = null; long st = 0L; xmlReader =... |
public Control[] getControls() throws NamingException; | Control[] getControls() throws NamingException; | public Control[] getControls() throws NamingException; |
if (textContent != null) { inlineList.add(new TextContent(parentElement, textContent.toString())); textContent = null; } | textContent = saveTextContent(textContent, inlineList, parentElement); | static List getChildContentList(Context c, Content parent) { List inlineList = new LinkedList(); FirstLineStyle firstLineStyle = null; FirstLetterStyle firstLetterStyle = null; StringBuffer textContent = null; CascadedStyle parentStyle = parent.getStyle(); Element parentEle... |
super("approveSelection"); | protected ApproveSelectionAction() { // Nothing to do here. } | |
Object obj = new String(parentPath + entry.getText()); | Object obj = new String(parentPath + getFileName()); | public void actionPerformed(ActionEvent e) { Object obj = new String(parentPath + entry.getText()); if (obj != null) { File f = filechooser.getFileSystemView().createFileObject( obj.toString()); if (filechooser.... |
super(null); | protected CancelSelectionAction() { // Nothing to do here. } | |
super("Go Up"); | protected ChangeToParentDirectoryAction() { // Nothing to do here. } | |
timer = new Timer(1000, null); timer.setRepeats(false); | public DoubleClickListener(JList list) { this.list = list; timer = new Timer(1000, null); timer.setRepeats(false); lastSelected = list.getSelectedValue(); setDirectorySelected(false); } | |
if (timer.isRunning() && list.getSelectedValue().toString().equals(lastSelected.toString())) | if (e.getClickCount() >= 2 && list.getSelectedValue().toString().equals(lastSelected.toString())) | public void mouseClicked(MouseEvent e) { if (list.getSelectedValue() == null) return; FileSystemView fsv = filechooser.getFileSystemView(); if (timer.isRunning() && list.getSelectedValue().toString().equals(lastSelected.toString())) { File f = fsv.createFileObject(l... |
timer.stop(); | public void mouseClicked(MouseEvent e) { if (list.getSelectedValue() == null) return; FileSystemView fsv = filechooser.getFileSystemView(); if (timer.isRunning() && list.getSelectedValue().toString().equals(lastSelected.toString())) { File f = fsv.createFileObject(l... | |
entry.setText(path.substring(path.lastIndexOf("/") + 1)); timer.restart(); | setFileName(path.substring(path.lastIndexOf("/") + 1)); | public void mouseClicked(MouseEvent e) { if (list.getSelectedValue() == null) return; FileSystemView fsv = filechooser.getFileSystemView(); if (timer.isRunning() && list.getSelectedValue().toString().equals(lastSelected.toString())) { File f = fsv.createFileObject(l... |
super("Go Home"); | protected GoHomeAction() { // Nothing to do here. } | |
super("New Folder"); | protected NewFolderAction() { // Nothing to do here. } | |
Object f = filelist.getSelectedValue(); | JList list = (JList) e.getSource(); Object f = list.getSelectedValue(); | public void valueChanged(ListSelectionEvent e) { Object f = filelist.getSelectedValue(); if (f == null) return; File file = filechooser.getFileSystemView().createFileObject(f.toString()); if (! filechooser.isTraversable(file)) filechooser.setSelectedFile(file); else filechooser.setSelect... |
super(null); | protected UpdateAction() { // Nothing to do here. } | |
if (parents.getItemCount() > 0) parents.removeAllItems(); for (int i = parentFiles.size() - 1; i >= 0; i--) parents.addItem(parentFiles.get(i)); parents.setSelectedIndex(parentFiles.size() - 1); parents.revalidate(); parents.repaint(); | void boxEntries() { ArrayList parentFiles = new ArrayList(); File parent = filechooser.getCurrentDirectory(); if (parent == null) parent = filechooser.getFileSystemView().getDefaultDirectory(); while (parent != null) { String name = parent.getName(); if (name.equals("")) ... | |
if (e.getPropertyName().equals( JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) { if (filechooser.getSelectedFile() == null) setFileName(null); else setFileName(filechooser.getSelectedFile().toString()); int index = -1; File file = filechooser.getSelectedFile(); for (index = 0; index < model.getSize(); index++) if (((Fil... | public PropertyChangeListener createPropertyChangeListener(JFileChooser fc) { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { // FIXME: Multiple file selection waiting on JList multiple selection // bug. if (e.getPropertyName().equals( ... | |
public JButton getApproveButton(JFileChooser fc) | protected JButton getApproveButton(JFileChooser fc) | public JButton getApproveButton(JFileChooser fc) { accept = new JButton(getApproveButtonText(fc)); accept.setMnemonic(getApproveButtonMnemonic(fc)); accept.setToolTipText(getApproveButtonToolTipText(fc)); return accept; } |
accept = new JButton(getApproveButtonText(fc)); accept.setMnemonic(getApproveButtonMnemonic(fc)); accept.setToolTipText(getApproveButtonToolTipText(fc)); | public JButton getApproveButton(JFileChooser fc) { accept = new JButton(getApproveButtonText(fc)); accept.setMnemonic(getApproveButtonMnemonic(fc)); accept.setToolTipText(getApproveButtonToolTipText(fc)); return accept; } | |
if (fc.getApproveButtonText() != null) return fc.getApproveButtonText(); else if (fc.getDialogType() == JFileChooser.SAVE_DIALOG) return saveButtonText; | String result = fc.getApproveButtonText(); if (result == null) { if (fc.getDialogType() == JFileChooser.SAVE_DIALOG) result = saveButtonText; | public String getApproveButtonText(JFileChooser fc) { if (fc.getApproveButtonText() != null) return fc.getApproveButtonText(); else if (fc.getDialogType() == JFileChooser.SAVE_DIALOG) return saveButtonText; else return openButtonText; } |
return openButtonText; | result = openButtonText; } return result; | public String getApproveButtonText(JFileChooser fc) { if (fc.getApproveButtonText() != null) return fc.getApproveButtonText(); else if (fc.getDialogType() == JFileChooser.SAVE_DIALOG) return saveButtonText; else return openButtonText; } |
return new ApproveSelectionAction(); | if (approveSelectionAction == null) approveSelectionAction = new ApproveSelectionAction(); return approveSelectionAction; | public Action getApproveSelectionAction() { return new ApproveSelectionAction(); } |
return new CancelSelectionAction(); | if (cancelSelectionAction == null) cancelSelectionAction = new CancelSelectionAction(); return cancelSelectionAction; | public Action getCancelSelectionAction() { return new CancelSelectionAction(); } |
return new ChangeToParentDirectoryAction(); | if (changeToParentDirectoryAction == null) changeToParentDirectoryAction = new ChangeToParentDirectoryAction(); return changeToParentDirectoryAction; | public Action getChangeToParentDirectoryAction() { return new ChangeToParentDirectoryAction(); } |
String ret = fc.getDialogTitle(); if (ret != null) return ret; switch (fc.getDialogType()) { case JFileChooser.OPEN_DIALOG: ret = openButtonText; break; case JFileChooser.SAVE_DIALOG: ret = saveButtonText; break; default: ret = fc.getApproveButtonText(); break; } if (ret == null) ret = openButtonText; return ret; | String result = fc.getDialogTitle(); if (result == null) result = getApproveButtonText(fc); return result; | public String getDialogTitle(JFileChooser fc) { String ret = fc.getDialogTitle(); if (ret != null) return ret; switch (fc.getDialogType()) { case JFileChooser.OPEN_DIALOG: ret = openButtonText; break; case JFileChooser.SAVE_DIALOG: ret = saveButtonText; break; default: ret = fc.getA... |
return filename; | return null; | public String getFileName() { return filename; } |
return new GoHomeAction(); | if (goHomeAction == null) goHomeAction = new GoHomeAction(); return goHomeAction; | public Action getGoHomeAction() { return new GoHomeAction(); } |
return new NewFolderAction(); | if (newFolderAction == null) newFolderAction = new NewFolderAction(); return newFolderAction; | public Action getNewFolderAction() { return new NewFolderAction(); } |
return new UpdateAction(); | if (updateAction == null) updateAction = new UpdateAction(); return updateAction; | public Action getUpdateAction() { return new UpdateAction(); } |
JLabel look = new JLabel("Look In:"); parents = new JComboBox(); parents.setRenderer(new BasicComboBoxRenderer()); boxEntries(); look.setLabelFor(parents); JPanel parentsPanel = new JPanel(); parentsPanel.add(look); parentsPanel.add(parents); JPanel buttonPanel = new JPanel(); upFolderButton = new JButton(); upFolder... | public void installComponents(JFileChooser fc) { JLabel look = new JLabel("Look In:"); parents = new JComboBox(); parents.setRenderer(new BasicComboBoxRenderer()); boxEntries(); look.setLabelFor(parents); JPanel parentsPanel = new JPanel(); parentsPanel.add(look); parentsPanel.add(parents); ... | |
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); computerIcon = MetalIconFactory.getTreeComputerIcon(); detailsViewIcon = defaults.getIcon("FileChooser.detailsViewIcon"); directoryIcon = new MetalIconFactory.TreeFolderIcon(); fileIcon = new MetalIconFactory.TreeLeafIcon(); floppyDriveIcon = MetalIconFactory.ge... | protected void installIcons(JFileChooser fc) { // FIXME: Implement. } | |
accept.addActionListener(getApproveSelectionAction()); cancel.addActionListener(getCancelSelectionAction()); upFolderButton.addActionListener(getChangeToParentDirectoryAction()); homeFolderButton.addActionListener(getGoHomeAction()); newFolderButton.addActionListener(getNewFolderAction()); filters.addItemListener(creat... | protected void installListeners(JFileChooser fc) { propertyChangeListener = createPropertyChangeListener(filechooser); filechooser.addPropertyChangeListener(propertyChangeListener); //parents.addItemListener(createBoxListener()); accept.addActionListener(getApproveSelectionAction()); cancel.addActionL... | |
acceptAllFileFilterText = UIManager.getString("FileChooser.acceptAllFileFilterText"); cancelButtonMnemonic = UIManager.getInt("FileChooser.cancelButtonMnemonic"); cancelButtonText = UIManager.getString("FileChooser.cancelButtonText"); cancelButtonToolTipText = UIManager.getString("FileChooser.cancelButtonToolTipText"); | UIDefaults defaults = UIManager.getLookAndFeelDefaults(); | protected void installStrings(JFileChooser fc) { acceptAllFileFilterText = UIManager.getString("FileChooser.acceptAllFileFilterText"); cancelButtonMnemonic = UIManager.getInt("FileChooser.cancelButtonMnemonic"); cancelButtonText = UIManager.getString("FileChooser.cancelButtonText"); cancelButtonToolTipTe... |
dirDescText = UIManager.getString("FileChooser.directoryDescriptionText"); fileDescText = UIManager.getString("FileChooser.fileDescriptionText"); | dirDescText = defaults.getString("FileChooser.directoryDescriptionText"); fileDescText = defaults.getString("FileChooser.fileDescriptionText"); | protected void installStrings(JFileChooser fc) { acceptAllFileFilterText = UIManager.getString("FileChooser.acceptAllFileFilterText"); cancelButtonMnemonic = UIManager.getInt("FileChooser.cancelButtonMnemonic"); cancelButtonText = UIManager.getString("FileChooser.cancelButtonText"); cancelButtonToolTipTe... |
helpButtonMnemonic = UIManager.getInt("FileChooser.helpButtonMnemonic"); helpButtonText = UIManager.getString("FileChooser.helpButtonText"); helpButtonToolTipText = UIManager.getString("FileChooser.helpButtonToolTipText"); | acceptAllFileFilterText = defaults.getString("FileChooser.acceptAllFileFilterText"); cancelButtonText = "Cancel"; cancelButtonToolTipText = "Abort file chooser dialog"; cancelButtonMnemonic = defaults.getInt("FileChooser.cancelButtonMnemonic"); | protected void installStrings(JFileChooser fc) { acceptAllFileFilterText = UIManager.getString("FileChooser.acceptAllFileFilterText"); cancelButtonMnemonic = UIManager.getInt("FileChooser.cancelButtonMnemonic"); cancelButtonText = UIManager.getString("FileChooser.cancelButtonText"); cancelButtonToolTipTe... |
openButtonMnemonic = UIManager.getInt("FileChooser.openButtonMnemonic"); openButtonText = UIManager.getString("FileChooser.openButtonText"); openButtonToolTipText = UIManager.getString("FileChooser.openButtonToolTipText"); | directoryOpenButtonText = "Open"; directoryOpenButtonToolTipText = "Open selected directory"; directoryOpenButtonMnemonic = defaults.getInt("FileChooser.directoryOpenButtonMnemonic"); helpButtonText = "Help"; helpButtonToolTipText = "FileChooser help"; helpButtonMnemonic = defaults.getInt("FileChooser.helpButtonMnemon... | protected void installStrings(JFileChooser fc) { acceptAllFileFilterText = UIManager.getString("FileChooser.acceptAllFileFilterText"); cancelButtonMnemonic = UIManager.getInt("FileChooser.cancelButtonMnemonic"); cancelButtonText = UIManager.getString("FileChooser.cancelButtonText"); cancelButtonToolTipTe... |
saveButtonText = UIManager.getString("FileChooser.saveButtonText"); saveButtonToolTipText = UIManager.getString("FileChooser.saveButtonToolTipText"); | updateButtonText = "Update"; updateButtonToolTipText = "Update directory listing"; updateButtonMnemonic = defaults.getInt("FileChooser.updateButtonMnemonic"); | protected void installStrings(JFileChooser fc) { acceptAllFileFilterText = UIManager.getString("FileChooser.acceptAllFileFilterText"); cancelButtonMnemonic = UIManager.getInt("FileChooser.cancelButtonMnemonic"); cancelButtonText = UIManager.getString("FileChooser.cancelButtonText"); cancelButtonToolTipTe... |
this.filechooser = fc; | public void installUI(JComponent c) { if (c instanceof JFileChooser) { JFileChooser fc = (JFileChooser) c; fc.resetChoosableFileFilters(); createModel(); clearIconCache(); installDefaults(fc); installComponents(fc); installListeners(fc); Object ... | |
filelist.revalidate(); | public void rescanCurrentDirectory(JFileChooser fc) { getModel().validateFileCache(); filelist.revalidate(); } | |
this.filename = filename; | public void setFileName(String filename) { this.filename = filename; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.