Package frege.j.Swing

Compiled: Wed Dec 05 00:08:12 PST 2012 from source file: frege/j/Swing.fr

Package Documentation

Definitions for native components below javax.swing

Table of Content

Imports

Type Aliases

type AbstractButton = AbstractButton

a AbstractButtonT in the IO monad

type JButton = JButton

a JButtonT in the IO monad

type JComponent = JComponent

a JComponentT in the IO monad

type JFrame = JFrame

convenient name for type JFrameT

type JLabel = JLabel

convenient name for JLabelT

type JPanel = JPanel

a JPanelT in the IO monad

Classes

class IsAbstractButton (IsComponent p, IsContainer p, IsJComponent p) => p

operations of javax.swing.AbstractButton

Known Instances

JButtonT, AbstractButtonT

Member Functions

addActionListener :: (IsAbstractButton p, IsActionListener a) => p s -> a s -> ST s ()
asAbstractButton :: IsAbstractButton p => p s -> AbstractButtonT s
pure native (javax.swing.AbstractButton)

downcast to javax.swing.AbstractButton

nativeAddActionListener :: IsAbstractButton p => p s -> ActionListenerT s -> ST s ()
native addActionListener

Adds an ActionListener to the button.

setHorizontalTextPosition :: IsAbstractButton p => p s -> Int -> ST s ()
native setHorizontalTextPosition

Sets the horizontal position of the text relative to the icon.

setVerticalTextPosition :: IsAbstractButton p => p s -> Int -> ST s ()
native setVerticalTextPosition

Sets the vertical position of the text relative to the icon.

class IsJButton (IsComponent p, IsContainer p, IsJComponent p, IsAbstractButton p) => p

operations of javax.swing.JButton

Known Instances

JButtonT

Member Functions

asJButton :: IsJButton p => p s -> JButtonT s
pure native (javax.swing.JButton)

downcast to javax.swing.JButton

class IsJComponent (IsComponent c, IsContainer c) => c

operations of javax.swing.JComponent

Known Instances

JButtonT, JPanelT, AbstractButtonT, JComponentT

Member Functions

asJComponent :: IsJComponent c => c s -> JComponentT s
pure native (javax.swing.JComponent)

downcast to javax.swing.JComponent

setOpaque :: IsJComponent c => c s -> Bool -> ST s ()
native setOpaque
class IsJPanel (IsComponent p, IsContainer p, IsJComponent p) => p

operations of javax.swing.JPanel

Known Instances

JPanelT

Member Functions

asJPanel :: IsJPanel p => p s -> JPanelT s
pure native (javax.swing.JPanel)

downcast to javax.swing.JPanel

Instances

instance IsAbstractButton AbstractButtonT

Member Functions

add :: IsComponent α => AbstractButton -> α RealWorld -> Mutable ComponentT RealWorld

inherited from Awt.IsContainer.add

addActionListener :: IsActionListener β => AbstractButtonT α -> β α -> ST α ()

inherited from IsAbstractButton.addActionListener

addComponent :: AbstractButton -> Component -> Mutable ComponentT RealWorld
native add

inherited from Awt.IsContainer.addComponent

asAbstractButton :: AbstractButtonT α -> AbstractButtonT α
pure native (javax.swing.AbstractButton)

inherited from IsAbstractButton.asAbstractButton

asComponent :: AbstractButton -> Component
pure native (java.awt.Component)

inherited from Awt.IsComponent.asComponent

asContainer :: AbstractButton -> Container
pure native (java.awt.Container)

inherited from Awt.IsContainer.asContainer

asJComponent :: AbstractButtonT α -> JComponentT α
pure native (javax.swing.JComponent)

inherited from IsJComponent.asJComponent

nativeAddActionListener :: AbstractButtonT α -> ActionListenerT α -> ST α ()
native addActionListener

inherited from IsAbstractButton.nativeAddActionListener

setEnabled :: AbstractButtonT α -> Bool -> ST α ()
native setEnabled

inherited from Awt.IsComponent.setEnabled

setHorizontalTextPosition :: AbstractButtonT α -> Int -> ST α ()
native setHorizontalTextPosition

inherited from IsAbstractButton.setHorizontalTextPosition

setOpaque :: AbstractButtonT α -> Bool -> ST α ()
native setOpaque

inherited from IsJComponent.setOpaque

setVerticalTextPosition :: AbstractButtonT α -> Int -> ST α ()
native setVerticalTextPosition

inherited from IsAbstractButton.setVerticalTextPosition

setVisible :: AbstractButtonT α -> Bool -> ST α ()
native setVisible

inherited from Awt.IsComponent.setVisible

instance IsContainer JLabelT

Member Functions

add :: IsComponent α => JLabel -> α RealWorld -> Mutable ComponentT RealWorld

inherited from Awt.IsContainer.add

addComponent :: JLabel -> Component -> Mutable ComponentT RealWorld
native add

inherited from Awt.IsContainer.addComponent

asComponent :: JLabel -> Component
pure native (java.awt.Component)

inherited from Awt.IsComponent.asComponent

asContainer :: JLabel -> Container
pure native (java.awt.Container)

inherited from Awt.IsContainer.asContainer

setEnabled :: JLabelT α -> Bool -> ST α ()
native setEnabled

inherited from Awt.IsComponent.setEnabled

setVisible :: JLabelT α -> Bool -> ST α ()
native setVisible

inherited from Awt.IsComponent.setVisible

instance IsJButton JButtonT

Member Functions

add :: IsComponent α => JButton -> α RealWorld -> Mutable ComponentT RealWorld

inherited from Awt.IsContainer.add

addActionListener :: IsActionListener β => JButtonT α -> β α -> ST α ()

inherited from IsAbstractButton.addActionListener

addComponent :: JButton -> Component -> Mutable ComponentT RealWorld
native add

inherited from Awt.IsContainer.addComponent

asAbstractButton :: JButtonT α -> AbstractButtonT α
pure native (javax.swing.AbstractButton)

inherited from IsAbstractButton.asAbstractButton

asComponent :: JButton -> Component
pure native (java.awt.Component)

inherited from Awt.IsComponent.asComponent

asContainer :: JButton -> Container
pure native (java.awt.Container)

inherited from Awt.IsContainer.asContainer

asJButton :: JButtonT α -> JButtonT α
pure native (javax.swing.JButton)

inherited from IsJButton.asJButton

asJComponent :: JButtonT α -> JComponentT α
pure native (javax.swing.JComponent)

inherited from IsJComponent.asJComponent

nativeAddActionListener :: JButtonT α -> ActionListenerT α -> ST α ()
native addActionListener

inherited from IsAbstractButton.nativeAddActionListener

setEnabled :: JButtonT α -> Bool -> ST α ()
native setEnabled

inherited from Awt.IsComponent.setEnabled

setHorizontalTextPosition :: JButtonT α -> Int -> ST α ()
native setHorizontalTextPosition

inherited from IsAbstractButton.setHorizontalTextPosition

setOpaque :: JButtonT α -> Bool -> ST α ()
native setOpaque

inherited from IsJComponent.setOpaque

setVerticalTextPosition :: JButtonT α -> Int -> ST α ()
native setVerticalTextPosition

inherited from IsAbstractButton.setVerticalTextPosition

setVisible :: JButtonT α -> Bool -> ST α ()
native setVisible

inherited from Awt.IsComponent.setVisible

instance IsJComponent JComponentT

Member Functions

add :: IsComponent α => JComponent -> α RealWorld -> Mutable ComponentT RealWorld

inherited from Awt.IsContainer.add

addComponent :: JComponent -> Component -> Mutable ComponentT RealWorld
native add

inherited from Awt.IsContainer.addComponent

asComponent :: JComponent -> Component
pure native (java.awt.Component)

inherited from Awt.IsComponent.asComponent

asContainer :: JComponent -> Container
pure native (java.awt.Container)

inherited from Awt.IsContainer.asContainer

asJComponent :: JComponentT α -> JComponentT α
pure native (javax.swing.JComponent)

inherited from IsJComponent.asJComponent

setEnabled :: JComponentT α -> Bool -> ST α ()
native setEnabled

inherited from Awt.IsComponent.setEnabled

setOpaque :: JComponentT α -> Bool -> ST α ()
native setOpaque

inherited from IsJComponent.setOpaque

setVisible :: JComponentT α -> Bool -> ST α ()
native setVisible

inherited from Awt.IsComponent.setVisible

instance IsJPanel JPanelT

Member Functions

add :: IsComponent α => JPanel -> α RealWorld -> Mutable ComponentT RealWorld

inherited from Awt.IsContainer.add

addComponent :: JPanel -> Component -> Mutable ComponentT RealWorld
native add

inherited from Awt.IsContainer.addComponent

asComponent :: JPanel -> Component
pure native (java.awt.Component)

inherited from Awt.IsComponent.asComponent

asContainer :: JPanel -> Container
pure native (java.awt.Container)

inherited from Awt.IsContainer.asContainer

asJComponent :: JPanelT α -> JComponentT α
pure native (javax.swing.JComponent)

inherited from IsJComponent.asJComponent

asJPanel :: JPanelT α -> JPanelT α
pure native (javax.swing.JPanel)

inherited from IsJPanel.asJPanel

setEnabled :: JPanelT α -> Bool -> ST α ()
native setEnabled

inherited from Awt.IsComponent.setEnabled

setOpaque :: JPanelT α -> Bool -> ST α ()
native setOpaque

inherited from IsJComponent.setOpaque

setVisible :: JPanelT α -> Bool -> ST α ()
native setVisible

inherited from Awt.IsComponent.setVisible

instance IsWindow JFrameT

Member Functions

add :: IsComponent α => JFrame -> α RealWorld -> Mutable ComponentT RealWorld

inherited from Awt.IsContainer.add

addComponent :: JFrame -> Component -> Mutable ComponentT RealWorld
native add

inherited from Awt.IsContainer.addComponent

asComponent :: JFrame -> Component
pure native (java.awt.Component)

inherited from Awt.IsComponent.asComponent

asContainer :: JFrame -> Container
pure native (java.awt.Container)

inherited from Awt.IsContainer.asContainer

asWindow :: JFrame -> Window
pure native (java.awt.Window)

inherited from Awt.IsWindow.asWindow

pack :: JFrame -> IO ()
native pack

inherited from Awt.IsWindow.pack

setEnabled :: JFrameT α -> Bool -> ST α ()
native setEnabled

inherited from Awt.IsComponent.setEnabled

setVisible :: JFrameT α -> Bool -> ST α ()
native setVisible

inherited from Awt.IsComponent.setVisible

Data Types

data AbstractButtonT s = native javax.swing.AbstractButton

an object with compiler time type javax.swing.AbstractButton

data JButtonT s = native javax.swing.JButton

an object with compiler time type javax.swing.JButton

Member Functions

new :: String -> Mutable JButtonT s
native new
data JComponentT s = native javax.swing.JComponent

an object with compiler time type javax.swing.JComponent

data JFrameT s = native javax.swing.JFrame

A javax.swing.JFrame

Member Functions

dispose_on_close :: Int
pure native javax.swing.JFrame.DISPOSE_ON_CLOSE

constant to dispose of the window when closed

do_nothing_on_close :: Int
pure native javax.swing.JFrame.DO_NOTHING_ON_CLOSE

constant to do nothing when closed

exit_on_close :: Int
pure native javax.swing.JFrame.EXIT_ON_CLOSE

constant to exit the application when closed

getContentPane :: JFrame -> Mutable ContainerT RealWorld
native getContentPane
hide_on_close :: Int
pure native javax.swing.JFrame.HIDE_ON_CLOSE

constant to hide the window when closed

nativeSetContentPane :: JFrame -> Container -> IO ()
native setContentPane

this really belongs to interface RootPaneConatiner

new :: String -> Mutable JFrameT RealWorld
native new

creates a new invisible frame with the specified title

setContentPane :: IsContainer c => JFrame -> c RealWorld -> IO ()
setDefaultCloseOperation :: JFrame -> Int -> IO ()
native setDefaultCloseOperation

Sets the operation that will happen by default when the user initiates a "close" on this frame.

data JLabelT s = native javax.swing.JLabel

a swing label

Member Functions

new :: String -> Mutable JLabelT RealWorld
native new

create a label

data JPanelT s = native javax.swing.JPanel

an object with compiler time type javax.swing.JPanel

Member Functions

new :: () -> Mutable JPanelT s
native new
data SwingConstants = native javax.swing.SwingConstants

this is defined as an abstract type so as to enable the access to the constants in the usual way.

Note that the constants are in lowercase, in contast to java.

Member Functions

bottom :: Int
pure native javax.swing.SwingConstants.BOTTOM
center :: Int
pure native javax.swing.SwingConstants.CENTER
east :: Int
pure native javax.swing.SwingConstants.EAST
horizontal :: Int
pure native javax.swing.SwingConstants.HORIZONTAL
leading :: Int
pure native javax.swing.SwingConstants.LEADING
left :: Int
pure native javax.swing.SwingConstants.LEFT
next :: Int
pure native javax.swing.SwingConstants.NEXT
north :: Int
pure native javax.swing.SwingConstants.NORTH
north_east :: Int
pure native javax.swing.SwingConstants.NORTH_EAST
north_west :: Int
pure native javax.swing.SwingConstants.NORTH_WEST
previous :: Int
pure native javax.swing.SwingConstants.PREVIOUS
right :: Int
pure native javax.swing.SwingConstants.RIGHT
south :: Int
pure native javax.swing.SwingConstants.SOUTH
south_east :: Int
pure native javax.swing.SwingConstants.SOUTH_EAST
south_west :: Int
pure native javax.swing.SwingConstants.SOUTH_WEST
top :: Int
pure native javax.swing.SwingConstants.TOP
trailing :: Int
pure native javax.swing.SwingConstants.TRAILING
vertical :: Int
pure native javax.swing.SwingConstants.VERTICAL
west :: Int
pure native javax.swing.SwingConstants.WEST

Functions and Values

invokeAndWait :: Runnable -> IO (Exception ())
native javax.swing.SwingUtilities.invokeAndWait

wrapper for javax.swing.SwingUtilities.invokeAndWait

invokeLater :: Runnable -> IO ()
native javax.swing.SwingUtilities.invokeLater

wrapper for javax.swing.SwingUtilities.invokeLater

Functions and Values by Type

Runnable -> IO (Exception ())

invokeAndWait

Runnable -> IO ()

invokeLater

AbstractButton -> Component -> Mutable ComponentT RealWorld

IsAbstractButton_AbstractButtonT.addComponent

AbstractButton -> Component

IsAbstractButton_AbstractButtonT.asComponent

AbstractButton -> Container

IsAbstractButton_AbstractButtonT.asContainer

JButton -> Component -> Mutable ComponentT RealWorld

IsJButton_JButtonT.addComponent

JButton -> Component

IsJButton_JButtonT.asComponent

JButton -> Container

IsJButton_JButtonT.asContainer

JComponent -> Component -> Mutable ComponentT RealWorld

IsJComponent_JComponentT.addComponent

JComponent -> Component

IsJComponent_JComponentT.asComponent

JComponent -> Container

IsJComponent_JComponentT.asContainer

JFrame -> Component -> Mutable ComponentT RealWorld

IsWindow_JFrameT.addComponent

JFrame -> Container -> IO ()

JFrameT.nativeSetContentPane

JFrame -> Int -> IO ()

JFrameT.setDefaultCloseOperation

JFrame -> Mutable ContainerT RealWorld

JFrameT.getContentPane

JFrame -> IO ()

IsWindow_JFrameT.pack

JFrame -> Component

IsWindow_JFrameT.asComponent

JFrame -> Container

IsWindow_JFrameT.asContainer

JFrame -> Window

IsWindow_JFrameT.asWindow

JLabel -> Component -> Mutable ComponentT RealWorld

IsContainer_JLabelT.addComponent

JLabel -> Component

IsContainer_JLabelT.asComponent

JLabel -> Container

IsContainer_JLabelT.asContainer

JPanel -> Component -> Mutable ComponentT RealWorld

IsJPanel_JPanelT.addComponent

JPanel -> Component

IsJPanel_JPanelT.asComponent

JPanel -> Container

IsJPanel_JPanelT.asContainer

String -> Mutable JFrameT RealWorld

JFrameT.new

String -> Mutable JLabelT RealWorld

JLabelT.new

Int

JFrameT.exit_on_close, JFrameT.dispose_on_close, JFrameT.do_nothing_on_close, JFrameT.hide_on_close, SwingConstants.north, SwingConstants.horizontal, SwingConstants.center, SwingConstants.bottom, SwingConstants.east, SwingConstants.left, SwingConstants.leading, SwingConstants.next, SwingConstants.right, SwingConstants.north_west, SwingConstants.north_east, SwingConstants.previous, SwingConstants.top, SwingConstants.south_east, SwingConstants.south, SwingConstants.south_west, SwingConstants.vertical, SwingConstants.trailing, SwingConstants.west

AbstractButtonT α -> ActionListenerT α -> ST α ()

IsAbstractButton_AbstractButtonT.nativeAddActionListener

AbstractButtonT α -> Bool -> ST α ()

IsAbstractButton_AbstractButtonT.setEnabled, IsAbstractButton_AbstractButtonT.setOpaque, IsAbstractButton_AbstractButtonT.setVisible

AbstractButtonT α -> Int -> ST α ()

IsAbstractButton_AbstractButtonT.setHorizontalTextPosition, IsAbstractButton_AbstractButtonT.setVerticalTextPosition

AbstractButtonT α -> AbstractButtonT α

IsAbstractButton_AbstractButtonT.asAbstractButton

AbstractButtonT α -> JComponentT α

IsAbstractButton_AbstractButtonT.asJComponent

JButtonT α -> ActionListenerT α -> ST α ()

IsJButton_JButtonT.nativeAddActionListener

JButtonT α -> Bool -> ST α ()

IsJButton_JButtonT.setEnabled, IsJButton_JButtonT.setOpaque, IsJButton_JButtonT.setVisible

JButtonT α -> Int -> ST α ()

IsJButton_JButtonT.setHorizontalTextPosition, IsJButton_JButtonT.setVerticalTextPosition

JButtonT α -> AbstractButtonT α

IsJButton_JButtonT.asAbstractButton

JButtonT α -> JButtonT α

IsJButton_JButtonT.asJButton

JButtonT α -> JComponentT α

IsJButton_JButtonT.asJComponent

JComponentT α -> Bool -> ST α ()

IsJComponent_JComponentT.setEnabled, IsJComponent_JComponentT.setOpaque, IsJComponent_JComponentT.setVisible

JComponentT α -> JComponentT α

IsJComponent_JComponentT.asJComponent

JFrameT α -> Bool -> ST α ()

IsWindow_JFrameT.setEnabled, IsWindow_JFrameT.setVisible

JLabelT α -> Bool -> ST α ()

IsContainer_JLabelT.setEnabled, IsContainer_JLabelT.setVisible

JPanelT α -> Bool -> ST α ()

IsJPanel_JPanelT.setOpaque, IsJPanel_JPanelT.setEnabled, IsJPanel_JPanelT.setVisible

JPanelT α -> JComponentT α

IsJPanel_JPanelT.asJComponent

JPanelT α -> JPanelT α

IsJPanel_JPanelT.asJPanel

String -> Mutable JButtonT s

JButtonT.new

() -> Mutable JPanelT s

JPanelT.new

IsComponent α => AbstractButton -> α RealWorld -> Mutable ComponentT RealWorld

IsAbstractButton_AbstractButtonT.add

IsComponent α => JButton -> α RealWorld -> Mutable ComponentT RealWorld

IsJButton_JButtonT.add

IsComponent α => JComponent -> α RealWorld -> Mutable ComponentT RealWorld

IsJComponent_JComponentT.add

IsComponent α => JFrame -> α RealWorld -> Mutable ComponentT RealWorld

IsWindow_JFrameT.add

IsComponent α => JLabel -> α RealWorld -> Mutable ComponentT RealWorld

IsContainer_JLabelT.add

IsComponent α => JPanel -> α RealWorld -> Mutable ComponentT RealWorld

IsJPanel_JPanelT.add

IsContainer c => JFrame -> c RealWorld -> IO ()

JFrameT.setContentPane

IsActionListener β => AbstractButtonT α -> β α -> ST α ()

IsAbstractButton_AbstractButtonT.addActionListener

IsActionListener β => JButtonT α -> β α -> ST α ()

IsJButton_JButtonT.addActionListener

IsAbstractButton p => p s -> ActionListenerT s -> ST s ()

IsAbstractButton.nativeAddActionListener

IsAbstractButton p => p s -> Int -> ST s ()

IsAbstractButton.setHorizontalTextPosition, IsAbstractButton.setVerticalTextPosition

IsAbstractButton p => p s -> AbstractButtonT s

IsAbstractButton.asAbstractButton

IsJButton p => p s -> JButtonT s

IsJButton.asJButton

IsJComponent c => c s -> Bool -> ST s ()

IsJComponent.setOpaque

IsJComponent c => c s -> JComponentT s

IsJComponent.asJComponent

IsJPanel p => p s -> JPanelT s

IsJPanel.asJPanel

(IsAbstractButton p, IsActionListener a) => p s -> a s -> ST s ()

IsAbstractButton.addActionListener

Valid HTML 4.01 Strict