5 // Created by Lutz Mueller on 5/19/07.
8 // Copyright (C) 2007 Lutz Mueller
10 // This program is free software: you can redistribute it and/or modify
11 // it under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
15 // This program is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
20 // You should have received a copy of the GNU General Public License
21 // along with this program. If not, see <http://www.gnu.org/licenses/>.
27 import java
.awt
.event
.*;
28 import java
.awt
.font
.*;
30 import javax
.swing
.text
.*;
31 import javax
.swing
.border
.*;
34 public class gsObject
{
36 static HashMap widgets
= new HashMap();
40 JComponent jcomponent
= null;
41 Container container
= null;
42 Component component
= null;
43 Dispatcher dispatch
= null;
44 String mouseEvent
= null;
45 String keyEvent
= null;
47 public void addTo(StringTokenizer tokens
)
49 boolean isBorderLayout
= (container
.getLayout() instanceof LayoutBorder
);
50 while(tokens
.hasMoreTokens())
52 String comp
= tokens
.nextToken();
53 //System.out.println("adding: " + comp + " to: " + id);
54 gsObject gsobject
= (gsObject
)gsObject
.widgets
.get(comp
);
55 Component compnt
= gsobject
.component
;
58 String direction
= tokens
.nextToken();
59 if(direction
.equals("north")) container
.add(compnt
, BorderLayout
.NORTH
);
60 else if(direction
.equals("west")) container
.add(compnt
, BorderLayout
.WEST
);
61 else if(direction
.equals("center")) container
.add(compnt
, BorderLayout
.CENTER
);
62 else if(direction
.equals("east")) container
.add(compnt
, BorderLayout
.EAST
);
63 else if(direction
.equals("south")) container
.add(compnt
, BorderLayout
.SOUTH
);
64 else container
.add(compnt
, BorderLayout
.CENTER
);
66 else container
.add(compnt
);
70 public void removeFrom(StringTokenizer tokens
)
72 String comp
= tokens
.nextToken();
73 gsObject gsobject
= (gsObject
)gsObject
.widgets
.get(comp
);
74 Component compnt
= gsobject
.component
;
75 container
.remove(compnt
);
76 container
.update(container
.getGraphics());
79 public void layout(StringTokenizer tokens
)
84 public void getBounds(StringTokenizer tokens
)
86 int x
, y
, width
, height
;
91 width
= component
.getWidth();
92 height
= component
.getHeight();
94 guiserver
.out
.println("( set 'gs:bounds '(" + x
+ " " + y
+ " " + width
+ " " + height
+ "))\n");
95 guiserver
.out
.flush();
99 public void loadText(StringTokenizer tokens
)
103 public void saveText(StringTokenizer tokens
)
107 public void setText(StringTokenizer tokens
)
109 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
112 public void appendText(StringTokenizer tokens
)
114 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
117 public void getText(StringTokenizer tokens
)
119 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
122 public void getSelection(StringTokenizer tokens
)
124 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
127 public void clearText(StringTokenizer tokens
)
129 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
132 public void setCaret(StringTokenizer tokens
)
134 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
137 public void selectText(StringTokenizer tokens
)
139 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
142 public void copyText(StringTokenizer tokens
)
144 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
147 public void cutText(StringTokenizer tokens
)
149 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
152 public void pasteText(StringTokenizer tokens
)
154 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
157 public void undoText(StringTokenizer tokens
)
159 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
162 public void undoEnable(StringTokenizer tokens
)
164 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
167 public void redoText(StringTokenizer tokens
)
169 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
172 public void clearList(StringTokenizer tokens
)
174 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
177 public void setVisible(StringTokenizer tokens
)
179 if(tokens
.nextToken().equals("true"))
180 component
.setVisible(true);
182 component
.setVisible(false);
186 public void setResizable(StringTokenizer tokens
)
188 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
191 public void setSize(StringTokenizer tokens
)
193 int width
= Integer
.parseInt(tokens
.nextToken());
194 int height
= Integer
.parseInt(tokens
.nextToken());
195 component
.setSize(new Dimension(width
, height
));
198 public void setPreferredSize(StringTokenizer tokens
)
200 int width
= Integer
.parseInt(tokens
.nextToken());
201 int height
= Integer
.parseInt(tokens
.nextToken());
202 component
.setPreferredSize(new Dimension(width
, height
));
205 public void Enable(StringTokenizer tokens
)
209 component
.setEnabled(true);
211 while(tokens
.hasMoreTokens())
213 gsobject
= (gsObject
)gsObject
.widgets
.get(tokens
.nextToken());
214 gsobject
.component
.setEnabled(true);
218 public void Disable(StringTokenizer tokens
)
222 component
.setEnabled(false);
224 while(tokens
.hasMoreTokens())
226 gsobject
= (gsObject
)gsObject
.widgets
.get(tokens
.nextToken());
227 gsobject
.component
.setEnabled(false);
231 public void setToolTip(StringTokenizer tokens
)
233 jcomponent
.setToolTipText(Base64Coder
.decodeString(tokens
.nextToken()));
236 public void setEditable(StringTokenizer tokens
)
238 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
241 public void setValue(StringTokenizer tokens
)
243 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
246 public void setSelected(StringTokenizer tokens
)
248 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
251 public void setTitledBorder(StringTokenizer tokens
)
253 jcomponent
.setBorder(BorderFactory
.createTitledBorder(Base64Coder
.decodeString(tokens
.nextToken())));
256 public void setBevelBorder(StringTokenizer tokens
)
258 int type
= BevelBorder
.RAISED
;
260 if(tokens
.hasMoreTokens())
262 String stype
= tokens
.nextToken();
263 if(stype
.equals("lowered")) type
= BevelBorder
.LOWERED
;
266 jcomponent
.setBorder(BorderFactory
.createBevelBorder(type
));
269 public void setIcon(StringTokenizer tokens
)
271 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
274 public void setPressedIcon(StringTokenizer tokens
)
276 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
279 public void messageDialog(StringTokenizer tokens
)
281 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
284 public void confirmationDialog(StringTokenizer tokens
)
286 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
289 public void ColorChooser(StringTokenizer tokens
)
291 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
294 public void OpenFileChooser(StringTokenizer tokens
)
296 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
299 public void SaveFileChooser(StringTokenizer tokens
)
301 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
304 public void requestFocus(StringTokenizer tokens
)
306 component
.requestFocus();
309 public void setFont(StringTokenizer tokens
)
311 String name
= Base64Coder
.decodeString(tokens
.nextToken());
315 if(tokens
.hasMoreTokens())
316 size
= Integer
.parseInt(tokens
.nextToken());
318 while(tokens
.hasMoreTokens())
320 String sstyle
= tokens
.nextToken();
321 if(sstyle
.equals("plain")) style
= style
| Font
.PLAIN
;
322 if(sstyle
.equals("bold")) style
= style
| Font
.BOLD
;
323 if(sstyle
.equals("italic")) style
= style
| Font
.ITALIC
;
326 Font font
= new Font(name
, style
, size
);
327 jcomponent
.setFont(font
);
330 public void getFontMetrics(StringTokenizer tokens
)
332 String text
= Base64Coder
.decodeString(tokens
.nextToken());
334 FontMetrics fm
= component
.getFontMetrics(component
.getFont());
336 int width
= fm
.stringWidth(text
);
337 int height
= fm
.getHeight();
339 //System.out.println("width:" + width + " height:" + height);
341 guiserver
.out
.println("(set 'gs:font-metrics '(" + width
+ " " + height
+ "))");
342 guiserver
.out
.flush();
345 public void setForeground(StringTokenizer tokens
)
347 Float red
= Float
.parseFloat(tokens
.nextToken());
348 Float green
= Float
.parseFloat(tokens
.nextToken());
349 Float blue
= Float
.parseFloat(tokens
.nextToken());
350 if(tokens
.hasMoreTokens())
352 Float alpha
= Float
.parseFloat(tokens
.nextToken());
353 jcomponent
.setForeground(new Color(red
, green
, blue
, alpha
));
356 jcomponent
.setForeground(new Color(red
, green
, blue
));
359 public void setBackground(StringTokenizer tokens
)
361 Float red
= Float
.parseFloat(tokens
.nextToken());
362 Float green
= Float
.parseFloat(tokens
.nextToken());
363 Float blue
= Float
.parseFloat(tokens
.nextToken());
364 if(tokens
.hasMoreTokens())
366 Float alpha
= Float
.parseFloat(tokens
.nextToken());
367 jcomponent
.setBackground(new Color(red
, green
, blue
, alpha
));
370 jcomponent
.setBackground(new Color(red
, green
, blue
));
373 public void setCaretColor(StringTokenizer tokens
)
375 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
379 public void setSyntax(StringTokenizer tokens
)
381 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
384 public void setCursor(StringTokenizer tokens
)
386 String shape
= tokens
.nextToken();
387 Cursor cursor
= null;
389 if(shape
.equals("crosshair")) cursor
= new Cursor(Cursor
.CROSSHAIR_CURSOR
);
390 else if(shape
.equals("text")) cursor
= new Cursor(Cursor
.TEXT_CURSOR
);
391 else if(shape
.equals("wait")) cursor
= new Cursor(Cursor
.WAIT_CURSOR
);
392 else if(shape
.equals("sw-resize")) cursor
= new Cursor(Cursor
.SW_RESIZE_CURSOR
);
393 else if(shape
.equals("se-resize")) cursor
= new Cursor(Cursor
.SE_RESIZE_CURSOR
);
394 else if(shape
.equals("nw-resize")) cursor
= new Cursor(Cursor
.NW_RESIZE_CURSOR
);
395 else if(shape
.equals("ne-resize")) cursor
= new Cursor(Cursor
.NE_RESIZE_CURSOR
);
396 else if(shape
.equals("n-resize")) cursor
= new Cursor(Cursor
.N_RESIZE_CURSOR
);
397 else if(shape
.equals("s-resize")) cursor
= new Cursor(Cursor
.S_RESIZE_CURSOR
);
398 else if(shape
.equals("w-resize")) cursor
= new Cursor(Cursor
.W_RESIZE_CURSOR
);
399 else if(shape
.equals("e-resize")) cursor
= new Cursor(Cursor
.E_RESIZE_CURSOR
);
400 else if(shape
.equals("hand")) cursor
= new Cursor(Cursor
.HAND_CURSOR
);
401 else if(shape
.equals("move")) cursor
= new Cursor(Cursor
.MOVE_CURSOR
);
402 else cursor
= new Cursor(Cursor
.DEFAULT_CURSOR
);
404 if(this instanceof WindowFrame
|| this instanceof WindowWidget
)
405 component
.setCursor(cursor
);
407 jcomponent
.setCursor(cursor
);
411 public void dispose(StringTokenizer tokens
)
413 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
417 public void insertTab(StringTokenizer tokens
)
419 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
423 public void removeTab(StringTokenizer tokens
)
425 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
428 public void setAccelerator(StringTokenizer tokens
)
430 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
433 public void addListItem(StringTokenizer tokens
)
435 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
438 public void removeListItem(StringTokenizer tokens
)
440 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
443 public void selectListItem(StringTokenizer tokens
)
445 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
448 public void addSeparator(StringTokenizer tokens
)
450 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
453 public void insertListItem(StringTokenizer tokens
)
455 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
458 public void setTabSize(StringTokenizer tokens
)
460 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
463 public void setTrace(StringTokenizer tokens
)
465 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
468 public void setUTF8(StringTokenizer tokens
)
470 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
473 public void setLookAndFeel(StringTokenizer tokens
)
475 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
478 public void disposeSplash(StringTokenizer tokens
)
480 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
483 public void getProperties(StringTokenizer tokens
)
485 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
488 public void getScreen(StringTokenizer tokens
)
490 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
493 public void getFonts(StringTokenizer tokens
)
495 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
498 public void getVersion(StringTokenizer tokens
)
500 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
503 public void getTextPosition(StringTokenizer tokens
)
505 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
508 public void showPopup(StringTokenizer tokens
)
510 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
513 public void findText(StringTokenizer tokens
)
515 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
518 public void gotoText(StringTokenizer params
)
520 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
523 public void frameCloseEvent(StringTokenizer tokens
)
525 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
528 public void frameResizeEvent(StringTokenizer tokens
)
530 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
533 public void frameMoveEvent(StringTokenizer tokens
)
535 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
540 public void gsCanvas(StringTokenizer tokens
)
542 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
545 public void g2Background(StringTokenizer tokens
)
547 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
550 public void g2Font(StringTokenizer tokens
)
552 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
555 public void g2Stroke(StringTokenizer tokens
)
557 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
560 public void g2Paint(StringTokenizer tokens
)
562 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
565 public void g2Export(StringTokenizer tokens
)
567 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
570 public void g2Print(StringTokenizer tokens
)
572 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
575 public void g2Translation(StringTokenizer tokens
)
577 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
580 public void g2Scale(StringTokenizer tokens
)
582 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
585 public void g2Transform(StringTokenizer tokens
)
587 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
590 public void g2Rotation(StringTokenizer tokens
)
592 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
595 public void g2Composite(StringTokenizer tokens
)
597 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
600 public void g2Clip(StringTokenizer tokens
)
602 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
605 public void createLine(StringTokenizer tokens
)
607 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
610 public void drawLine(StringTokenizer tokens
)
612 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
615 public void drawRectangle(StringTokenizer tokens
)
617 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
620 public void fillRectangle(StringTokenizer tokens
)
622 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
625 public void drawRoundRect(StringTokenizer tokens
)
627 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
630 public void fillRoundRect(StringTokenizer tokens
)
632 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
635 public void drawEllipse(StringTokenizer tokens
)
637 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
640 public void fillEllipse(StringTokenizer tokens
)
642 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
645 public void drawCircle(StringTokenizer tokens
)
647 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
650 public void fillCircle(StringTokenizer tokens
)
652 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
655 public void drawArc(StringTokenizer tokens
)
657 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
660 public void fillArc(StringTokenizer tokens
)
662 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
665 public void drawPolygon(StringTokenizer tokens
)
667 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
670 public void fillPolygon(StringTokenizer tokens
)
672 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
675 public void drawPath(StringTokenizer tokens
)
677 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
680 public void drawText(StringTokenizer tokens
)
682 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
685 public void registerMouseEvent(StringTokenizer tokens
)
687 mouseEvent
= tokens
.nextToken();
688 component
.addMouseListener(new MouseAdapter () {
689 public void mouseClicked(MouseEvent e
) { mouseEventOut(e
, "clicked"); }
690 public void mousePressed(MouseEvent e
) { mouseEventOut(e
, "pressed"); }
691 public void mouseReleased(MouseEvent e
) { mouseEventOut(e
, "released"); }
695 public void registerKeyEvent(StringTokenizer tokens
)
697 keyEvent
= tokens
.nextToken();
698 component
.addKeyListener(new KeyAdapter () {
699 public void keyTyped(KeyEvent e
) { keyEventOut(e
, "typed"); }
700 public void keyPressed(KeyEvent e
) { keyEventOut(e
, "pressed"); }
701 public void keyReleased(KeyEvent e
) { keyEventOut(e
, "released"); }
705 public void registerMouseEntered(StringTokenizer tokens
)
707 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
710 public void registerMouseExited(StringTokenizer tokens
)
712 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
715 public void registerMousePressed(StringTokenizer tokens
)
717 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
720 public void registerMouseReleased(StringTokenizer tokens
)
722 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
725 public void registerMouseClicked(StringTokenizer tokens
)
727 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
730 public void registerMouseDragged(StringTokenizer tokens
)
732 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
735 public void registerMouseMoved(StringTokenizer tokens
)
737 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
740 public void registerMouseWheelMoved(StringTokenizer tokens
)
742 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
745 public void setAntiAliasing(StringTokenizer tokens
)
747 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
750 public void deleteTaggedShape(StringTokenizer tokens
)
752 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
755 public void moveTaggedShape(StringTokenizer tokens
)
757 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
760 public void translateTaggedShape(StringTokenizer tokens
)
762 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
765 public void rotateTaggedShape(StringTokenizer tokens
)
767 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
770 public void scaleTaggedShape(StringTokenizer tokens
)
772 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
775 public void shearTaggedShape(StringTokenizer tokens
)
777 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
780 public void hideTaggedShape(StringTokenizer tokens
)
782 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
785 public void orderTaggedShapes(StringTokenizer tokens
)
787 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
790 public void showTaggedShape(StringTokenizer tokens
)
792 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
795 public void colorTaggedShape(StringTokenizer tokens
)
797 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
800 public void update(StringTokenizer tokens
)
802 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
805 public void drawImage(StringTokenizer tokens
)
807 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
810 private void mouseEventOut(MouseEvent e
, String type
)
812 guiserver
.out
.println("(" + mouseEvent
+ " \"" + id
+ "\" \"" + type
+ "\" " + e
.getX() + " " + e
.getY() + " " +
813 e
.getButton() + " " + e
.getClickCount() + " " + e
.getModifiers() + ")");
814 guiserver
.out
.flush();
817 private void keyEventOut(KeyEvent e
, String type
)
819 guiserver
.out
.println("(" + keyEvent
+ " \"" + id
+ "\" \"" + type
+ "\" " +
820 e
.getKeyCode() + " " + e
.getModifiers() + ")");
821 guiserver
.out
.flush();
824 public void runShell(StringTokenizer tokens
)
826 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
829 public void evalShell(StringTokenizer tokens
)
831 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);
834 public void destroyShell(StringTokenizer tokens
)
836 ErrorDialog
.wrongApplication(Dispatcher
.cmd
, id
);