alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

/*
 *                 Sun Public License Notice
 *
 * The contents of this file are subject to the Sun Public License
 * Version 1.0 (the "License"). You may not use this file except in
 * compliance with the License. A copy of the License is available at
 * http://www.sun.com/
 *
 * The Original Code is NetBeans. The Initial Developer of the Original
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun
 * Microsystems, Inc. All Rights Reserved.
 */

package org.netbeans.modules.tasklist.schedule;

import java.io.*;
import java.net.*;
import javax.swing.text.html.*;
import javax.swing.event.*;
import java.util.*;
import java.awt.*;
import javax.swing.*;
import org.openide.util.HelpCtx;
import org.openide.windows.Workspace;
import org.openide.util.NbBundle;
import org.openide.util.actions.CallableSystemAction;
import org.openide.windows.Mode;
import org.openide.windows.WindowManager;
import org.openide.windows.TopComponent;
import org.openide.util.Utilities;

/** View which shows the schedule
 *
 * @author Tor Norbye */
public class ScheduleView extends TopComponent {

    private static final long serialVersionUID = 1;

    public ScheduleView() {
    /*
        this(new Schedule());
    }

    private Schedule schedule;
    
    public ScheduleView(Schedule schedule) {
        this.schedule = schedule;
    */
    }

    protected void componentOpened() {
        setLayout(new BorderLayout());
        add(new JLabel("This is where the Schedule should appear"),
            BorderLayout.CENTER);
        setIcon(Utilities.loadImage(
                           "org/netbeans/modules/tasklist/schedule/schedule.gif"));
    }

    /** Open this top component in the editor window */
    public void showInMode() { // TODO Pick a better name!
        Workspace workspace = WindowManager.getDefault().
           getCurrentWorkspace();
        if (!isOpened(workspace)) {
            Mode mode  = workspace.findMode("editor"); // NOI18N
            if (mode != null) {
                mode.dockInto(this);
            }
        }
        open(workspace);
        requestVisible();
    }
    
    public String getName() {
        return NbBundle.getMessage(ScheduleView.class,
                                   "ScheduleView"); // NOI18N
    }
    
    public HelpCtx getHelpCtx() {
        return HelpCtx.DEFAULT_HELP;
    }
}
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.