Python java.awt.event.ActionListener() Examples

The following are 4 code examples of java.awt.event.ActionListener(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module java.awt.event , or try the search function .
Example #1
Source File: setcustomheader.py    From inql with Apache License 2.0 6 votes vote down vote up
def actionPerformed(self, e):
        """
        Overrides ActionListener behaviour, when clicked it opens the headers property editor for the given host.

        :param e: unused
        :return:
        """
        if self._host:
            try:
                self._overrideheaders[self._host]
            except KeyError:
                print("No custom header for %s, generating an empty set" % self._host)
                self._overrideheaders[self._host] = []
            PropertyEditor.get_instance("Set Custom Header for %s" % self._host,
                           columns=["Header", "Value"],
                           data=self._overrideheaders[self._host],
                           empty=["X-New-Header", "X-New-Header-Value"]) 
Example #2
Source File: browser.py    From inql with Apache License 2.0 5 votes vote down vote up
def actionPerformed(self, e):
        """
        Override the ActionListener method. Usually setup in combination with a menuitem click.
        :param e: unused
        :return:
        """
        URLOpener().open("file://%s" % self.target) 
Example #3
Source File: sendto.py    From inql with Apache License 2.0 5 votes vote down vote up
def actionPerformed(self, e):
        """
        Overrides ActionListener behaviour. Send current query to repeater.

        :param e: unused
        :return: None
        """
        self._http_mutator.send_to_repeater(self._host, self._payload) 
Example #4
Source File: sendto.py    From inql with Apache License 2.0 5 votes vote down vote up
def actionPerformed(self, e):
        """
        Override the ActionListener method. Usually setup in combination with a menuitem click.
        :param e: unused
        :return:
        """
        content = json.loads(self._payload)
        if isinstance(content, list):
            content = content[0]

        URLOpener().open(self._http_mutator.get_graphiql_target(
            self._server.server_port, self._host,
            content['query'] if 'query' in content else None,
            content['variables'] if 'variables' in content else None))