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 26 package sun.tools.jconsole.inspector; 27 28 // java import 29 import javax.swing.*; 30 31 // 32 33 // java import 34 import java.io.*; 35 import java.awt.*; 36 import java.awt.dnd.*; 37 import java.awt.datatransfer.*; 38 import java.net.*; 39 // 40 41 42 /** 43 * This provides a wrapper to the Object class to allow it to be 44 displayed/manipulated as a GUI object. 45 */ 46 @SuppressWarnings("serial") 47 public class XObject extends JLabel { 48 private Object object; 49 private static boolean useHashCodeRepresentation = true; 50 public final static XObject NULL_OBJECT = new XObject("null"); 51 public XObject (Object object, Icon icon) { 52 this(object); 53 setIcon(icon); 54 } 55 56 public XObject (Object object) { 57 setObject(object); 58 setHorizontalAlignment(SwingConstants.LEFT); 59 } 60 61 public boolean equals(Object o) { | 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 26 package sun.tools.jconsole.inspector; 27 28 // java import 29 import javax.swing.*; 30 31 /** 32 * This provides a wrapper to the Object class to allow it to be 33 displayed/manipulated as a GUI object. 34 */ 35 @SuppressWarnings("serial") 36 public class XObject extends JLabel { 37 private Object object; 38 private static boolean useHashCodeRepresentation = true; 39 public final static XObject NULL_OBJECT = new XObject("null"); 40 public XObject (Object object, Icon icon) { 41 this(object); 42 setIcon(icon); 43 } 44 45 public XObject (Object object) { 46 setObject(object); 47 setHorizontalAlignment(SwingConstants.LEFT); 48 } 49 50 public boolean equals(Object o) { |