@Test public void testActionPerformedThrowsNoSuchElementException() throws Throwable { try { new Redirect().actionPerformed(new ActionEvent("", 100, "", 100L, 1000)); fail("Expected NoSuchElementException to be thrown"); } catch (NoSuchElementException ex) { assertNull(ex.getMessage(), "ex.getMessage()"); } }
public void actionPerformed (ActionEvent ev) { StringTokenizer st = new StringTokenizer (ev.getActionCommand ()); ui.reconfigure ( st.nextToken(), st.hasMoreTokens () ? st.nextToken () : null ); }
Redirect implements ActionListener, UIAware { public void actionPerformed (ActionEvent ev) { StringTokenizer st = new StringTokenizer (ev.getActionCommand ()); ui.reconfigure ( st.nextToken(), st.hasMoreTokens () ? st.nextToken () : null ); } }
Redirect implements ActionListener, UIAware { public void actionPerformed (ActionEvent ev) { StringTokenizer st = new StringTokenizer (ev.getActionCommand ()); ui.reconfigure ( st.nextToken(), st.hasMoreTokens () ? st.nextToken () : null ); } Redirect(); }
Redirect implements ActionListener, UIAware { public void actionPerformed (ActionEvent ev) { StringTokenizer st = new StringTokenizer (ev.getActionCommand ()); ui.reconfigure ( st.nextToken(), st.hasMoreTokens () ? st.nextToken () : null ); } Redirect(); void setUI(UI ui, Element e); void actionPerformed(ActionEvent ev); }
Redirect implements ActionListener, UIAware { public void actionPerformed (ActionEvent ev) { StringTokenizer st = new StringTokenizer (ev.getActionCommand ()); ui.reconfigure ( st.nextToken(), st.hasMoreTokens () ? st.nextToken () : null ); } Redirect(); void setUI(UI ui, Element e); void actionPerformed(ActionEvent ev); public UI ui; }