protected String getValue(String fullKey) { return _applet.getParameter(fullKey); }
/** * Constructs an object importer. * * <p>Remote objects are imported from the web server that the given * applet has been loaded from. * * @param applet the applet loaded from the <code>Webserver</code>. */ public ObjectImporter(Applet applet) { URL codebase = applet.getCodeBase(); orgServername = servername = codebase.getHost(); orgPort = port = codebase.getPort(); }
public void destroy () { remove(canvas); super.destroy(); } }
String param = getParameter("param"); System.out.println("parameter: " + param); add(new JLabel(param)); stub.addParameter(args[0], args[1]); ParamApplet pa = new ParamApplet(); pa.setStub(stub); pa.start(); pa.setPreferredSize(new java.awt.Dimension(200,200)); JOptionPane.showMessageDialog(null, pa);
public ClientPanel(@Nullable Applet client) { setSize(Constants.GAME_FIXED_SIZE); setMinimumSize(Constants.GAME_FIXED_SIZE); setPreferredSize(Constants.GAME_FIXED_SIZE); setLayout(new BorderLayout()); setBackground(Color.black); if (client == null) { return; } client.setLayout(null); client.setSize(Constants.GAME_FIXED_SIZE); client.init(); client.start(); add(client, BorderLayout.CENTER); // This causes the whole game frame to be redrawn each frame instead // of only the viewport, so we can hook to MainBufferProvider#draw // and draw anywhere without it leaving artifacts if (client instanceof Client) { ((Client)client).setGameDrawingMode(2); } } }
/** When the button is pressed, go for it! */ public void mousePressed(MouseEvent e) { parent.showStatus("Showing document at URL " + u); parent.getAppletContext().showDocument(u); // No error checking on showDocument() -- the // browser will honk at the user if the link // is invalid. We should open "u" ourselves, // check the open, and close it. Or not... } /** NotUsed */
private static void playApplet(String filename) { URL url = null; try { File file = new File(filename); if (file.canRead()) url = file.toURI().toURL(); } catch (MalformedURLException e) { throw new IllegalArgumentException("could not play '" + filename + "'", e); } // URL url = StdAudio.class.getResource(filename); if (url == null) { throw new IllegalArgumentException("could not play '" + filename + "'"); } AudioClip clip = Applet.newAudioClip(url); clip.play(); }
rs.setStub(new RSAppletStub(config)); return rs;
@Override public void stop() { wrappedApplet.stop(); active = false; }
/** * Play the sound if an event is being processed */ protected void append(LoggingEvent event) { if (clip != null) { clip.play(); } }
client.setSize(size); client.setPreferredSize(size); client.getParent().setPreferredSize(size); client.getParent().setSize(size);
/** * Calls the applet's resize * * @param width * @param height * @return void */ public void appletResize(int width, int height) { applet.resize(width, height); }
@Override protected Iterator<String> getKeysInternal() { final String[][] paramsInfo = applet.getParameterInfo(); final String[] keys = new String[paramsInfo != null ? paramsInfo.length : 0]; for (int i = 0; i < keys.length; i++) { keys[i] = paramsInfo[i][0]; } return Arrays.asList(keys).iterator(); } }
private void giveClientFocus() { if (client instanceof Client) { final Canvas c = ((Client) client).getCanvas(); if (c != null) { c.requestFocusInWindow(); } } else if (client != null) { client.requestFocusInWindow(); } }
/** * Constructs an object importer. * * <p>Remote objects are imported from the web server that the given * applet has been loaded from. * * @param applet the applet loaded from the <code>Webserver</code>. */ public ObjectImporter(@SuppressWarnings("deprecation") java.applet.Applet applet) { @SuppressWarnings("deprecation") URL codebase = applet.getCodeBase(); orgServername = servername = codebase.getHost(); orgPort = port = codebase.getPort(); }
@Override protected Object getPropertyInternal(final String key) { return handleDelimiters(applet.getParameter(key)); }
public void destroy () { remove(canvas); super.destroy(); } }
/** * Constructs an object importer. * * <p>Remote objects are imported from the web server that the given * applet has been loaded from. * * @param applet the applet loaded from the <code>Webserver</code>. */ public ObjectImporter(Applet applet) { URL codebase = applet.getCodeBase(); orgServername = servername = codebase.getHost(); orgPort = port = codebase.getPort(); }
if (getParameter("show")!=null) { show = getParameter("show");
/** * Constructs an object importer. * * <p>Remote objects are imported from the web server that the given * applet has been loaded from. * * @param applet the applet loaded from the <code>Webserver</code>. */ public ObjectImporter(@SuppressWarnings("deprecation") java.applet.Applet applet) { @SuppressWarnings("deprecation") URL codebase = applet.getCodeBase(); orgServername = servername = codebase.getHost(); orgPort = port = codebase.getPort(); }