Examples of MTextPanel


Examples of com.ibm.richtext.textpanel.MTextPanel

        AttributeSet keySet = new AttributeSet(keys);
        final StyleModifier modifier = StyleModifier.createRemoveModifier(keySet);
       
        fItem.addListener(new EventListener() {
            public void eventOccurred(EventObject event) {
                MTextPanel panel = getTextPanel();
                if (panel == null) {
                    throw new Error("Menu item is enabled when panel is null!");
                }

                if (fCharacter == CHARACTER) {
                    panel.modifyCharacterStyleOnSelection(modifier);
                }
                else {
                    panel.modifyParagraphStyleOnSelection(modifier);
                }
            }
        });
    }
View Full Code Here

Examples of com.ibm.richtext.textpanel.MTextPanel

        }
    }

    protected void setChecked() {

        MTextPanel panel = getTextPanel();
        AttributeMap defaults = panel.getDefaultValues();
       
        for (int i=0; i < fKeys.length; i++) {
            Object defaultV = defaults.get(fKeys[i]);
           
            Object value = (fCharacter == CHARACTER)?
                    panel.getCharacterStyleOverSelection(fKeys[i]) :
                    panel.getParagraphStyleOverSelection(fKeys[i]);
                   
            if (!objectsAreEqual(defaultV, value)) {
                fItem.setState(false);
                return;
            }
View Full Code Here

Examples of com.ibm.richtext.textpanel.MTextPanel

        Date startDate = new Date();

        try {
            Clipboard clipboard = new Clipboard("ITextTestPanel");
            TextFrame frame = new TextFrame(null, "Interactive Test", clipboard);
            MTextPanel panel = frame.getTextPanel();

            new ITestTextPanel(panel, frame, clipboard).show();
        }
        finally {
            DateFormat df = DateFormat.getDateTimeInstance();
View Full Code Here

Examples of com.ibm.richtext.textpanel.MTextPanel

       
        fOnValue = onValue;
        fItem.addListener(new EventListener() {
            public void eventOccurred(EventObject event) {
                StyleModifier modifier;
                MTextPanel panel = getTextPanel();
                if (panel == null) {
                    throw new Error("Menu item is enabled when panel is null!");
                }
                if (continuousAndCommand()) {
                    AttributeSet set = new AttributeSet(fKey);
                    modifier = StyleModifier.createRemoveModifier(set);
                }
                else {
                    modifier = StyleModifier.createAddModifier(fKey, fOnValue);
                }
               
                if (fCharacter == CHARACTER) {
                    panel.modifyCharacterStyleOnSelection(modifier);
                }
                else {
                    panel.modifyParagraphStyleOnSelection(modifier);
                }
            }
        });
    }
View Full Code Here

Examples of com.ibm.richtext.textpanel.MTextPanel

        });
    }
   
    private boolean continuousAndCommand() {
       
        MTextPanel panel = getTextPanel();

        Object value = (fCharacter == CHARACTER)?
                            panel.getCharacterStyleOverSelection(fKey) :
                            panel.getParagraphStyleOverSelection(fKey);
        return fOnValue.equals(value);
    }
View Full Code Here

Examples of com.ibm.richtext.textpanel.MTextPanel

        super(values, menuData);
    }
   
    protected void handleValueSelected(Object value) {
       
        MTextPanel textPanel = getTextPanel();
        if (textPanel == null) {
            throw new Error("Menu item is enabled when panel is null!");
        }

        textPanel.setKeyRemap((KeyRemap) value);
    }
View Full Code Here

Examples of com.ibm.richtext.textpanel.MTextPanel

        textPanel.setKeyRemap((KeyRemap) value);
    }
   
    protected Object getCurrentValue() {
       
        MTextPanel textPanel = getTextPanel();
        if (textPanel == null) {
            throw new Error("Shouldn't call this without a text panel!");
        }
        return textPanel.getKeyRemap();
    }
View Full Code Here

Examples of com.ibm.richtext.textpanel.MTextPanel

        fCharacter = character;
    }
   
    protected void handleValueSelected(Object value) {
       
        MTextPanel textPanel = getTextPanel();
        if (textPanel == null) {
            throw new Error("Menu item is enabled when panel is null!");
        }
       
        StyleModifier modifier;
        if (value == null) {
            AttributeSet set = new AttributeSet(fKey);
            modifier = StyleModifier.createRemoveModifier(set);
        }
        else {
            modifier = StyleModifier.createAddModifier(fKey, value);
        }
                   
        if (fCharacter == CHARACTER) {
            textPanel.modifyCharacterStyleOnSelection(modifier);
        }
        else {
            textPanel.modifyParagraphStyleOnSelection(modifier);
        }
    }
View Full Code Here

Examples of com.ibm.richtext.textpanel.MTextPanel

        }
    }
   
    protected Object getCurrentValue() {
       
        MTextPanel textPanel = getTextPanel();
        if (textPanel == null) {
            throw new Error("Shouldn't call this without a text panel!");
        }
       
        if (fCharacter == CHARACTER) {
            return textPanel.getCharacterStyleOverSelection(fKey);
        }
        else {
            return textPanel.getParagraphStyleOverSelection(fKey);
        }
    }
View Full Code Here

Examples of com.ibm.richtext.textpanel.MTextPanel

        fItem.setEnabled(enableByDefault);
    }
   
    protected void textPanelChanged() {
       
        MTextPanel textPanel = getTextPanel();
        if (textPanel == null) {
            fItem.setEnabled(false);
        }
        else {
            fItem.setEnabled(isEnabled());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.