Package SimpleOutline

Examples of SimpleOutline.DataEntryDialog


                    // ---------------------
                    else if (qq_currentEvent.isEvent(OutlineField_DoubleClick_getqq_Browser)) {
                        try {
                            CursorMgr.startEvent();
                            // ================ Begin Forte Event Handler Translation ================
                            DataEntryDialog dialog = new DataEntryDialog();
                            // The DataEntryDialog is a simple dialog
                            // that allows the user to enter a single line
                            // of text, then click OK or Cancel.
   
                            node = (BrowserDisplayNode)TreeFieldCurrentNode.get(this.getqq_Browser());
                            // The attribute CurrentNode is of type DisplayNode.
                            // We need to cast it to BrowserDisplayNode in order
                            // to access the Text attribute.
   
                            if (node != null) {
                                dialog.setText(node.getText());
                                // Load the node's text into the dialog.
                            }
                            else {
                                dialog.setText(new TextData());
                            }
   
                            if (dialog.displayDialog() == true) {
                                // TRUE means OK.

   
                                node.setText(dialog.getText());
                                // Dialog.Text is the
                                // text the user typed.
   
                                // The user may select an image from the PaletteList
                                // on the dialog. Dialog.Image will be an integer
                                // corresponding to the image the user selected.
                                // Then we grap the ImageData from the PaletteList
                                // by 'looking inside' the Widget with
                                // 'GetElementList.'
   
                                Array_Of_ListElement<ListElement> imageList = dialog.getqq_Image().getElementList();
                                node.setImage(imageList.get(dialog.getImage()-1).getImageValue());
   
                                // This method on DisplayNode must be invoked to
                                // update the OutlineField on the screen.
                                node.updateFieldFromData();
                            }
View Full Code Here

TOP

Related Classes of SimpleOutline.DataEntryDialog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.