コード例 #1
0
    def helpMenu(self,event):
        self._helpPopup = JFrame('JWT Fuzzer', size=(550, 450) );
        self._helpPopup.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE)
        helpPanel = JPanel()
        helpPanel.setPreferredSize(Dimension(550, 450))
        helpPanel.setBorder(EmptyBorder(10, 10, 10, 10))
        helpPanel.setLayout(BoxLayout(helpPanel, BoxLayout.Y_AXIS))
        self._helpPopup.setContentPane(helpPanel)
        helpHeadingText = JLabel("<html><h2>JWT Fuzzer</h2></html>")
        authorText = JLabel("<html><p>@author: &lt;pinnace&gt;</p></html>")
        aboutText = JLabel("<html><br /> <p>This extension adds an Intruder payload processor for JWTs.</p><br /></html>")
        repositoryText = JLabel("<html>Documentation and source code:</html>")
        repositoryLink = JLabel("<html>- <a href=\"https://github.com/pinnace/burp-jwt-fuzzhelper-extension\">https://github.com/pinnace/burp-jwt-fuzzhelper-extension</a></html>")
        licenseText = JLabel("<html><br/><p>JWT Fuzzer uses a GPL 3 license. This license does not apply to the dependency below:<p></html>") 
        dependencyLink = JLabel("<html>- <a href=\"https://github.com/jpadilla/pyjwt/blob/master/LICENSE\">pyjwt</a></html>")
        dependencyLink.addMouseListener(ClickListener())
        dependencyLink.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR))
        repositoryLink.addMouseListener(ClickListener())
        repositoryLink.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR))
        
        helpPanel.add(helpHeadingText)
        helpPanel.add(authorText)
        helpPanel.add(aboutText)
        helpPanel.add(repositoryText)
        helpPanel.add(repositoryLink)
        helpPanel.add(licenseText)
        helpPanel.add(dependencyLink)

        self._helpPopup.setSize(Dimension(550, 450))
        self._helpPopup.pack()
        self._helpPopup.setLocationRelativeTo(None)
        self._helpPopup.setVisible(True)
        return
コード例 #2
0
 def wait( self, event ) :
     source = event.getSource()
     prev   = source.getCursor()
     source.setCursor(
         Cursor.getPredefinedCursor( Cursor.WAIT_CURSOR )
     )
     sleep( 5 )
     source.setCursor( prev )
コード例 #3
0
ファイル: mouse.py プロジェクト: jggatc/pyj2d
 def get_cursor(self):
     """
     Return cursor object.
     Cursor type and name accessed with object getType and getName methods.
     """
     if not self._cursor:
         self._cursor = Cursor(Cursor.DEFAULT_CURSOR)
     return self._cursor
コード例 #4
0
ファイル: error.py プロジェクト: neopsis/jython-interpreter
 def __init__(self, view, handler):
     JButton.__init__(self)
     self.view = view
     self.icon = GUIUtilities.loadIcon("Find.png")
     self.margin = Insets(0, 0, 0, 0)
     self.handler = handler
     self.alignY = 1
     self.actionPerformed = self.action
     self.cursor = Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)
     self.toolTipText = u"Jump to error file %s:%s" % (unicode(
         handler[0]), unicode(handler[1]))
コード例 #5
0
ファイル: mouse.py プロジェクト: jggatc/pyj2d
 def set_cursor(self, *cursor):
     """
     Set mouse cursor.
     Alternative arguments:
     * JVM system cursor or cursor object
     * image or surface, hotspot (x,y), and optional name
     * size, hotspot, data, mask, and optional name
     Refer to pyj2d.cursors for details.
     """
     args = len(cursor)
     if len(cursor) == 1:
         if isinstance(cursor[0], int):
             self._cursor = Cursor(cursor[0])
         else:
             self._cursor = cursor[0]
     elif args in (2,3):
         image = cursor[0]
         hotspot = Point(*cursor[1])
         if args == 2:
             name = 'Custom Cursor'
         else:
             name = cursor[2]
         tk = Toolkit.getDefaultToolkit()
         self._cursor = tk.createCustomCursor(image, hotspot, name)
     elif args in (4,5):
         size = cursor[0]
         hotspot = Point(*cursor[1])
         data = cursor[2]
         mask = cursor[3]
         if args == 4:
             name = 'Custom Cursor'
         else:
             name = cursor[4]
         surface = cursors.create_cursor(size, data, mask)
         tk = Toolkit.getDefaultToolkit()
         self._cursor = tk.createCustomCursor(surface, hotspot, name)
     else:
         self._cursor = Cursor(Cursor.DEFAULT_CURSOR)
     if self._cursorVisible:
         env.jframe.getContentPane().setCursor(self._cursor)
コード例 #6
0
 def keyPressed(self, event):
   if KeyEvent.VK_ENTER == event.getKeyCode():
     regex_field = event.getSource()
     frame = regex_field.getTopLevelAncestor() # the JFrame window
     frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR))
     def repaint():
       self.table.updateUI()
       self.table.repaint()
       frame.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR))
     def filterRows():
       self.table.getModel().filter(regex_field.getText())
       SwingUtilities.invokeLater(repaint)
     exe.submit(filterRows)
コード例 #7
0
    def keyPressed(self, event):
        if KeyEvent.VK_ENTER == event.getKeyCode():
            self.frame.setCursor(Cursor.getPredefinedCursor(
                Cursor.WAIT_CURSOR))
            ins = self

            def repaint():
                ins.table.updateUI()
                ins.table.repaint()
                ins.frame.setCursor(
                    Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR))

            def filterRows():
                ins.table_model.filter(event.getSource().getText())
                SwingUtilities.invokeLater(repaint)

            exe.submit(filterRows)
コード例 #8
0
ファイル: core.py プロジェクト: Elhamahm/nengo_1.4
 def mouseMoved(self, event):
     size = self.resize_border
     if event.x < size:
         if event.y < size:
             self.cursor = Cursor.getPredefinedCursor(Cursor.NW_RESIZE_CURSOR)
         elif event.y >= self.size.height - size:
             self.cursor = Cursor.getPredefinedCursor(Cursor.SW_RESIZE_CURSOR)
         else:
             self.cursor = Cursor.getPredefinedCursor(Cursor.W_RESIZE_CURSOR)
     elif event.x >= self.size.width - size:
         if event.y < size:
             self.cursor = Cursor.getPredefinedCursor(Cursor.NE_RESIZE_CURSOR)
         elif event.y >= self.size.height - size:
             self.cursor = Cursor.getPredefinedCursor(Cursor.SE_RESIZE_CURSOR)
         else:
             self.cursor = Cursor.getPredefinedCursor(Cursor.E_RESIZE_CURSOR)
     else:
         if event.y < size:
             self.cursor = Cursor.getPredefinedCursor(Cursor.N_RESIZE_CURSOR)
         elif event.y >= self.size.height - size:
             self.cursor = Cursor.getPredefinedCursor(Cursor.S_RESIZE_CURSOR)
         else:
             self.cursor = Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)
コード例 #9
0
ファイル: mouse.py プロジェクト: jggatc/pyj2d
 def set_visible(self, visible):
     """
     Set mouse cursor visibility according to visible bool argument.
     Return previous cursor visibility state.
     """
     visible_pre = self._cursorVisible
     if visible:
         if not self._cursor:
             self._cursor = Cursor(Cursor.DEFAULT_CURSOR)
         env.jframe.getContentPane().setCursor(self._cursor)
         self._cursorVisible = True
     else:
         if not self._cursorBlank:
             image = BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB)
             hotspot = Point(0,0)
             name = 'Blank Cursor'
             try:
                 tk = Toolkit.getDefaultToolkit()
                 self._cursorBlank = tk.createCustomCursor(image, hotspot, name)
             except AWTError:
                 return visible_pre
         env.jframe.getContentPane().setCursor(self._cursorBlank)
         self._cursorVisible = False
     return visible_pre
コード例 #10
0
 def repaint():
     self.table.updateUI()
     self.table.repaint()
     frame.setCursor(
         Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR))
コード例 #11
0
 def repaint():
     ins.table.updateUI()
     ins.table.repaint()
     ins.frame.setCursor(
         Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR))
コード例 #12
0
from javax.swing.tree import TreePath
from org.gvsig.fmap.dal.feature.impl import DefaultFeatureStore
from org.gvsig.fmap.mapcontext.layers import LayerListener
from tocutils import createToCContextMenu
from tocutils import addUpdateToCListener
#from tocutils import expandAllNodes
from tocutils import getIconFromLayer
from tocutils import getIconByName
from org.gvsig.tools import ToolsLocator
from tocutils import getExpansionState
from tocutils import setExpansionState

from gvsig import logger
from gvsig import LOGGER_WARN, LOGGER_INFO, LOGGER_ERROR

waitCursor = Cursor(Cursor.WAIT_CURSOR)
defaultCursor = Cursor(Cursor.DEFAULT_CURSOR)


def setTreeAsSelectionOrder(tree, mapContext):
    updateAll(tree, mapContext)
    tree.setCellRenderer(SelectionCellRenderer(tree, mapContext))
    tree.addMouseListener(SelectionMouseAdapter(tree, mapContext))
    addUpdateToCListener("SelectionOrder", mapContext,
                         UpdateListener(tree, mapContext))
    tree.revalidate()
    tree.repaint()


def updateAll(tree, mapContext):
    exp = getExpansionState(tree)
コード例 #13
0
ファイル: JLabelHyperlink.py プロジェクト: hobson/ggpy
 def __init__(self, text, url):
     """ generated source for method __init__ """
     super(JLabelHyperlink, self).__init__(text)
     self.url = url
     addMouseListener(self)
     setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR))