001: /*
002: * CONFIDENTIAL AND PROPRIETARY SOURCE CODE OF
003: * NETSCAPE COMMUNICATIONS CORPORATION
004: *
005: * Copyright (c) 1996 Netscape Communications Corporation.
006: * All Rights Reserved.
007: * Use of this Source Code is subject to the terms of the applicable
008: * license agreement from Netscape Communications Corporation.
009: */
010:
011: package graphical;
012:
013: import com.indius.base.*;
014:
015: import netscape.application.Color;
016: import netscape.application.Font;
017: import netscape.application.Popup;
018: import netscape.application.Rect;
019: import netscape.application.View;
020:
021: import netscape.util.ClassInfo;
022:
023: /**
024: * popupCellEditor - A new cell editor for Indius edit views. Implements
025: * a popup. (MCW)
026: */
027:
028: public class PopupCellEditor extends Popup implements
029: com.indius.grid.IGridCellEditor {
030:
031: public PopupCellEditor() {
032: super ();
033: this .initPopupCellEditor();
034: }
035:
036: public PopupCellEditor(Rect r) {
037: super (r);
038: this .initPopupCellEditor();
039: }
040:
041: public PopupCellEditor(int x, int y, int w, int h) {
042: super (x, y, w, h);
043: this .initPopupCellEditor();
044: }
045:
046: private void initPopupCellEditor() {
047: }
048:
049: // IGridCellEditor implementation
050:
051: /**
052: * Get the cell editor view. (MCW)
053: */
054:
055: public View view() {
056: return this ;
057: }
058:
059: /**
060: * Get the contents of the Popup. (MCW)
061: */
062:
063: public Object getValue() {
064: return this .selectedItem().title();
065: }
066:
067: /**
068: * Set the contents of the Popup. (MCW)
069: */
070:
071: public void setValue(Object obj) {
072: }
073:
074: /**
075: * Set the text color of a popup. (Not implemented). (MCW)
076: */
077:
078: public void setTextColor(Color aColor) {
079: }
080:
081: /**
082: * Set the justification of a popup cell. (Not implemented). (MCW)
083: */
084:
085: public void setJustification(int aJustification) {
086: }
087:
088: /**
089: * Set the contents font of a popup cell. (Not implemented). (MCW)
090: */
091:
092: public void setFont(Font aFont) {
093: }
094:
095: // Codable overrides
096:
097: public void describeClassInfo(ClassInfo info) {
098: super .describeClassInfo(info);
099: info.addClass("PopupCellEditor", 1);
100: }
101:
102: }
|