Home | History | Annotate | Download | only in swing
      1  239  stephen /*
      2  239  stephen  * CDDL HEADER START
      3  239  stephen  *
      4  239  stephen  * The contents of this file are subject to the terms of the
      5  239  stephen  * Common Development and Distribution License (the "License").
      6  239  stephen  * You may not use this file except in compliance with the License.
      7  239  stephen  *
      8  239  stephen  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      9  239  stephen  * or http://www.opensolaris.org/os/licensing.
     10  239  stephen  * See the License for the specific language governing permissions
     11  239  stephen  * and limitations under the License.
     12  239  stephen  *
     13  239  stephen  * When distributing Covered Code, include this CDDL HEADER in each
     14  239  stephen  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     15  239  stephen  * If applicable, add the following below this CDDL HEADER, with the
     16  239  stephen  * fields enclosed by brackets "[]" replaced with your own identifying
     17  239  stephen  * information: Portions Copyright [yyyy] [name of copyright owner]
     18  239  stephen  *
     19  239  stephen  * CDDL HEADER END
     20  239  stephen  */
     21  239  stephen 
     22  239  stephen /*
     23  239  stephen  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
     24  239  stephen  * Use is subject to license terms.
     25  239  stephen  */
     26  239  stephen 
     27  239  stephen package org.opensolaris.os.vp.panels.example.time1.client.swing;
     28  239  stephen 
     29  239  stephen import org.opensolaris.os.vp.panel.common.ClientContext;
     30  239  stephen import org.opensolaris.os.vp.panel.common.control.Control;
     31  250  stephen import org.opensolaris.os.vp.panel.common.model.ManagedObject;
     32  239  stephen import org.opensolaris.os.vp.panel.swing.model.AbstractSwingPanelDescriptor;
     33  239  stephen import org.opensolaris.os.vp.util.misc.Finder;
     34  239  stephen 
     35  250  stephen public class TimePanelDescriptor
     36  250  stephen     extends AbstractSwingPanelDescriptor<ManagedObject> {
     37  250  stephen 
     38  239  stephen     //
     39  239  stephen     // Instance data
     40  239  stephen     //
     41  239  stephen 
     42  239  stephen     private Control control;
     43  239  stephen 
     44  239  stephen     //
     45  239  stephen     // Constructors
     46  239  stephen     //
     47  239  stephen 
     48  239  stephen     /**
     49  239  stephen      * Constructs a {@code TimePanelDescriptor}.
     50  239  stephen      *
     51  239  stephen      * @param	    id
     52  239  stephen      *		    a unique identifier for this Panel, taken from the panel
     53  239  stephen      *		    registration
     54  239  stephen      *
     55  239  stephen      * @param	    context
     56  239  stephen      *		    a handle to interact with the Visual Panels client
     57  239  stephen      */
     58  245    David     public TimePanelDescriptor(String id, ClientContext context) {
     59  245    David 	super(id, context);
     60  239  stephen 	control = new TimeControl(this);
     61  239  stephen     }
     62  239  stephen 
     63  239  stephen     //
     64  239  stephen     // ManagedObject methods
     65  239  stephen     //
     66  239  stephen 
     67  239  stephen     @Override
     68  239  stephen     public String getName() {
     69  239  stephen 	return Finder.getString("panel.time.name");
     70  239  stephen     }
     71  239  stephen 
     72  239  stephen     //
     73  239  stephen     // PanelDescriptor methods
     74  239  stephen     //
     75  239  stephen 
     76  239  stephen     @Override
     77  239  stephen     public Control getControl() {
     78  239  stephen 	return control;
     79  239  stephen     }
     80  239  stephen }
     81