~ubuntu-branches/ubuntu/precise/classpath/precise

« back to all changes in this revision

Viewing changes to java/awt/CardLayout.java

  • Committer: Bazaar Package Importer
  • Author(s): Michael Koch
  • Date: 2006-05-27 16:11:15 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060527161115-h6e39eposdt5snb6
Tags: 2:0.91-3
* Install header files to /usr/include/classpath.
* debian/control: classpath: Conflict with jamvm < 1.4.3 and
  cacao < 0.96 (Closes: #368172).

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
  /**
118
118
   * Cause the first component in the container to be displayed.
119
119
   *
120
 
   * @param parent The parent container
 
120
   * @param parent The parent container, not <code>null</code>.
121
121
   */
122
122
  public void first (Container parent)
123
123
  {
181
181
  /**
182
182
   * Cause the last component in the container to be displayed.
183
183
   * 
184
 
   * @param parent The parent container
 
184
   * @param parent The parent container, not <code>null</code>.
185
185
   */
186
186
  public void last (Container parent)
187
187
  {
247
247
   * this current card is the  last one in the deck, the first
248
248
   * component is displayed.
249
249
   * 
250
 
   * @param parent The parent container
 
250
   * @param parent The parent container, not <code>null</code>.
251
251
   */
252
252
  public void next (Container parent)
253
253
  {
271
271
   * If this current card is the first one in the deck, the last
272
272
   * component is displayed.
273
273
   * 
274
 
   * @param parent The parent container
 
274
   * @param parent The parent container, not <code>null</code>.
275
275
   */
276
276
  public void previous (Container parent)
277
277
  {
321
321
 
322
322
  /**
323
323
   * Cause the named component to be shown.  If the component name is
324
 
   * unknown, this method does nothing.
 
324
   * unknown or <code>null</code>, this method does nothing.
325
325
   * 
326
 
   * @param parent The parent container
327
 
   * @param name The name of the component to show
 
326
   * @param parent The parent container, not <code>null</code>.
 
327
   * @param name The name of the component to show 
328
328
   */
329
329
  public void show (Container parent, String name)
330
330
  {
 
331
    if (name == null)
 
332
      return;
 
333
   
 
334
    if (parent.getLayout() != this)
 
335
      throw new IllegalArgumentException("parent's layout is not this CardLayout");
 
336
    
331
337
    Object target = tab.get (name);
332
338
    if (target != null)
333
339
      {
362
368
   * 
363
369
   * @param parent The parent container
364
370
   * @param what The type of goto: FIRST, LAST, NEXT or PREV
 
371
   * 
 
372
   * @throws IllegalArgumentException if parent has not this 
 
373
   * CardLayout set as its layout.
365
374
   */
366
375
  private void gotoComponent (Container parent, int what)
367
376
  {
 
377
    if (parent.getLayout() != this)
 
378
      throw new IllegalArgumentException("parent's layout is not this CardLayout");
 
379
    
368
380
    synchronized (parent.getTreeLock ())
369
381
      {
370
382
        int num = parent.ncomponents;