< prev index next >

src/share/classes/sun/tools/jconsole/inspector/XObject.java

Print this page
rev 1501 : 7017818: NLS: JConsoleResources.java cannot be handled by translation team
Reviewed-by: mchung, mfang


  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package sun.tools.jconsole.inspector;
  26 
  27 // java import
  28 import javax.swing.*;
  29 
  30 //
  31 
  32 // java import
  33 import java.io.*;
  34 import java.awt.*;
  35 import java.awt.dnd.*;
  36 import java.awt.datatransfer.*;
  37 import java.net.*;
  38 //
  39 
  40 
  41 /**
  42  * This provides a wrapper to the Object class to allow it to be
  43  displayed/manipulated as a GUI object.
  44 */
  45 @SuppressWarnings("serial")
  46 public class XObject extends JLabel {
  47     private Object object;
  48     private static boolean useHashCodeRepresentation = true;
  49     public final static XObject NULL_OBJECT = new XObject("null");
  50     public XObject (Object object, Icon icon) {
  51         this(object);
  52         setIcon(icon);
  53     }
  54 
  55     public XObject (Object object) {
  56         setObject(object);
  57         setHorizontalAlignment(SwingConstants.LEFT);
  58     }
  59 
  60     public boolean equals(Object o) {




  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package sun.tools.jconsole.inspector;
  26 
  27 // java import
  28 import javax.swing.*;
  29 











  30 /**
  31  * This provides a wrapper to the Object class to allow it to be
  32  displayed/manipulated as a GUI object.
  33 */
  34 @SuppressWarnings("serial")
  35 public class XObject extends JLabel {
  36     private Object object;
  37     private static boolean useHashCodeRepresentation = true;
  38     public final static XObject NULL_OBJECT = new XObject("null");
  39     public XObject (Object object, Icon icon) {
  40         this(object);
  41         setIcon(icon);
  42     }
  43 
  44     public XObject (Object object) {
  45         setObject(object);
  46         setHorizontalAlignment(SwingConstants.LEFT);
  47     }
  48 
  49     public boolean equals(Object o) {


< prev index next >