Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,7 @@
|
|||
/* NetRexx */
|
||||
options replace format comments java crossref symbols binary
|
||||
|
||||
import javax.swing.
|
||||
|
||||
msgText = 'Goodbye, World!'
|
||||
JOptionPane.showMessageDialog(null, msgText)
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
/* NetRexx */
|
||||
options replace format comments java crossref symbols binary
|
||||
|
||||
import javax.swing.
|
||||
|
||||
msgText = 'Goodbye, World!'
|
||||
|
||||
window = JFrame(msgText)
|
||||
text = JTextArea()
|
||||
minSize = Dimension(200, 100)
|
||||
|
||||
text.setText(msgText)
|
||||
|
||||
window.setLayout(FlowLayout())
|
||||
window.add(text)
|
||||
window.setMinimumSize(minSize)
|
||||
window.pack
|
||||
window.setVisible(isTrue)
|
||||
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE)
|
||||
|
||||
return
|
||||
|
||||
method isTrue() public static returns boolean
|
||||
return 1 == 1
|
||||
|
||||
method isFalse() public static returns boolean
|
||||
return \isTrue
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
/* NetRexx */
|
||||
options replace format comments java crossref symbols binary
|
||||
|
||||
class RCHelloWorld_GraphicalAWT_01 extends Dialog implements ActionListener
|
||||
|
||||
properties private constant
|
||||
msgText = 'Goodbye, World!'
|
||||
|
||||
properties indirect
|
||||
ok = boolean
|
||||
can = boolean
|
||||
okButton = Button
|
||||
canButton = Button
|
||||
buttonPanel = Panel
|
||||
|
||||
method RCHelloWorld_GraphicalAWT_01(frame = Frame, msg = String, canaction = boolean) public
|
||||
super(frame, 'Default', isTrue)
|
||||
setLayout(BorderLayout())
|
||||
add(BorderLayout.CENTER, Label(msg))
|
||||
addOKCancelPanel(canaction)
|
||||
createFrame()
|
||||
pack()
|
||||
setVisible(isTrue)
|
||||
|
||||
return
|
||||
|
||||
method RCHelloWorld_GraphicalAWT_01(frame = Frame, msg = String) public
|
||||
this(frame, msg, isFalse)
|
||||
return
|
||||
|
||||
method addOKCancelPanel(canaction = boolean)
|
||||
setButtonPanel(Panel())
|
||||
getButtonPanel.setLayout(FlowLayout())
|
||||
createOKButton()
|
||||
if canaction then do
|
||||
createCancelButton()
|
||||
end
|
||||
add(BorderLayout.SOUTH, getButtonPanel)
|
||||
return
|
||||
|
||||
method createOKButton()
|
||||
setOkButton(Button('OK'))
|
||||
getButtonPanel.add(getOkButton)
|
||||
getOkButton.addActionListener(this)
|
||||
return
|
||||
|
||||
method createCancelButton()
|
||||
setCanButton(Button('Cancel'))
|
||||
getButtonPanel.add(getCanButton)
|
||||
getCanButton.addActionListener(this)
|
||||
return
|
||||
|
||||
method createFrame()
|
||||
dim = getToolkit().getScreenSize
|
||||
setLocation(int(dim.width / 3), int(dim.height / 3))
|
||||
return
|
||||
|
||||
method actionPerformed(ae = ActionEvent) public
|
||||
if ae.getSource == getOkButton then do
|
||||
setOk(isTrue)
|
||||
setCan(isFalse)
|
||||
setVisible(isFalse)
|
||||
end
|
||||
else if ae.getSource == getCanButton then do
|
||||
setCan(isTrue)
|
||||
setOk(isFalse)
|
||||
setVisible(isFalse)
|
||||
end
|
||||
return
|
||||
|
||||
method main(args = String[]) public constant
|
||||
mainFrame = Frame()
|
||||
mainFrame.setSize(200, 200)
|
||||
mainFrame.setVisible(isTrue)
|
||||
message = RCHelloWorld_GraphicalAWT_01(mainFrame, msgText, isTrue)
|
||||
if message.isOk then
|
||||
say 'OK pressed'
|
||||
if message.isCan then
|
||||
say 'Cancel pressed'
|
||||
message.dispose
|
||||
mainFrame.dispose
|
||||
return
|
||||
|
||||
method isTrue() public static returns boolean
|
||||
return 1 == 1
|
||||
|
||||
method isFalse() public static returns boolean
|
||||
return \isTrue
|
||||
Loading…
Add table
Add a link
Reference in a new issue