All Downloads are FREE. Search and download functionalities are using the official Maven repository.

studio.ui.rstextarea.EditorPaneAction Maven / Gradle / Ivy

Go to download

Studio for kdb+ is a rapid development environment for the ultra-fast database kdb+ from Kx Systems: http://www.kx.com.

There is a newer version: dz4.1
Show newest version
package studio.ui.rstextarea;

import studio.ui.EditorPane;

import javax.swing.text.TextAction;
import java.awt.*;
import java.awt.event.ActionEvent;

abstract public class EditorPaneAction extends TextAction {

    public EditorPaneAction(String name) {
        super(name);
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        Container container = getTextComponent(e);
        while (container != null && ! (container instanceof EditorPane)) {
            container = container.getParent();
        }
        if (container == null) return;

        actionPerformed(e, (EditorPane) container) ;
    }

    abstract protected void actionPerformed(ActionEvent e, EditorPane pane);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy