我正试图使自动化,从系统(通过一名指挥手)提取一些档案,并制作相关的材料。
我将努力解释我的“意见”。
我为新的指挥“新单元”开了一个图形,通过“新单元Handler.java”处理。
Now i would like to make a wizard (applet) that helps me with certain selections that i need to make in order to complete that "newModule" command. so newModuleHandler extends Applet too.
i 写新《宪章》 Handler 类似情况。
package archetypedcomponent.commands;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import java.applet.*;// required when you create an applet
import java.awt.Graphics;
public class newModuleHandler extends AbstractHandler {
@Override
public boolean isEnabled() {
// TODO Auto-generated method stub
return true;
iii
@Override
public boolean isHandled() {
// TODO Auto-generated method stub
return true;
iii
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
// TODO Auto-generated method stub
return null;
iii
public class HelloWorld extends Applet
{
// The method that will be automatically called when the applet is started
public void init()
{
// It is required but does not need anything.
System.out.println("Applet initiated");
iii
// This method gets called when the applet is terminated
// That s when the user goes to another page or exits the browser.
public void stop()
{
// no actions needed here now.
System.out.println("Applet Stopped");
iii
// The standard method that you have to use to paint things on screen
// This overrides the empty Applet method, you can t called it "display" for example.
public void paint(Graphics g)
{
//method to draw text on screen
// String first, then x and y coordinate.
System.out.println("Applet in paint");
g.drawString("Hey hey hey",20,20);
g.drawString("Hellooow World",20,40);
iii
iii
iii
现在,鉴于这一方法,指挥人员将因此而放弃。
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
// TODO Auto-generated method stub
return null;
iii
必须在其内部打电话。 my 问:如何称呼?
======================================================================================== i was able to solve my problem but m replying here so that somebody who is also facing same problem can b guided
这是我新的“新摩迪莱赫和勒”。
package archetypedcomponent.commands;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import java.applet.*;// required when you create an applet
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Graphics;
import javax.swing.JFrame;
public class newModuleHandler extends AbstractHandler {
@Override
public boolean isEnabled() {
// TODO Auto-generated method stub
return true;
iii
@Override
public boolean isHandled() {
// TODO Auto-generated method stub
return true;
iii
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
// TODO Auto-generated method stub
// call applet here
JFrame jp1 = new JFrame();
Loader a=new Loader ();
jp1.getContentPane().add(a, BorderLayout.CENTER);
jp1.setSize(new Dimension(500,500));
jp1.setVisible(true);
return null;
iii
iii
i 提供新的<>Loader.java <>/strong>,并附上附录
package archetypedcomponent.commands;
import java.applet.Applet;
import java.awt.Graphics;
public class Loader extends Applet
{
// The method that will be automatically called when the applet is started
public void init()
{
// It is required but does not need anything.
System.out.println("Applet initiated");
// Graphics g=new ;
iii
// This method gets called when the applet is terminated
// That s when the user goes to another page or exits the browser.
public void stop()
{
// no actions needed here now.
System.out.println("Applet Stopped");
iii
// The standard method that you have to use to paint things on screen
// This overrides the empty Applet method, you can t called it "display" for example.
public void paint(Graphics g)
{
//method to draw text on screen
// String first, then x and y coordinate.
System.out.println("Applet in paint");
g.drawString("Hey hey hey",20,20);
g.drawString("Hellooow World",20,40);
iii
iii
现在,无论需要什么信息,都可以在洛纳德人的油漆中做。