|
What this is
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.debugger.ui.views; import java.awt.BorderLayout; import java.util.ArrayList; import javax.swing.JComponent; import org.netbeans.spi.viewmodel.Models; import org.netbeans.modules.debugger.ui.Utils; import org.openide.util.NbBundle; import org.openide.windows.TopComponent; public class WatchesView extends TopComponent { private transient JComponent tree; private transient ViewModelListener viewModelListener; public WatchesView () { setIcon (Utils.getIcon ( "org/netbeans/modules/debugger/resources/watchesView/Watch" ).getImage ()); } protected String preferredID() { return this.getClass().getName(); } protected void componentShowing () { super.componentShowing (); if (viewModelListener != null) return; if (tree == null) { setLayout (new BorderLayout ()); tree = Models.createView (null, null, null, null, new ArrayList ()); tree.setName ("WatchesView"); add (tree, "Center"); //NOI18N } if (viewModelListener != null) throw new InternalError (); viewModelListener = new ViewModelListener ( "WatchesView", tree ); } protected void componentHidden () { super.componentHidden (); viewModelListener.destroy (); viewModelListener = null; } public int getPersistenceType () { return PERSISTENCE_ALWAYS; } public boolean requestFocusInWindow () { super.requestFocusInWindow (); if (tree == null) return false; return tree.requestFocusInWindow (); } public String getName () { return NbBundle.getMessage (WatchesView.class, "CTL_Watches_view"); // NOI18N } public String getToolTipText () { return NbBundle.getMessage (WatchesView.class, "CTL_Watches_view_tooltip");// NOI18N } } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
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.