Add plugin container, move TaskList and Plugin to public domain
parent
ce914964f9
commit
b757cb3fd7
@ -0,0 +1,202 @@
|
|||||||
|
/*
|
||||||
|
This code file defines a data storage standard.
|
||||||
|
It can be used for any purpose, and is hereby released into the public domain.
|
||||||
|
*/
|
||||||
|
package net.apocalypselabs.symat.plugin;
|
||||||
|
|
||||||
|
import java.awt.image.BufferedImage;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Plugin container class.
|
||||||
|
*/
|
||||||
|
public class Plugin implements Serializable {
|
||||||
|
|
||||||
|
public final int LANG_JS = 0;
|
||||||
|
public final int LANG_PY = 1;
|
||||||
|
|
||||||
|
private BufferedImage icon;
|
||||||
|
private String packageName = "";
|
||||||
|
private String script = "";
|
||||||
|
private String title = "";
|
||||||
|
private String desc = "";
|
||||||
|
private String longtitle = "";
|
||||||
|
private String author = "";
|
||||||
|
private String website = "";
|
||||||
|
private String other = "";
|
||||||
|
private int lang = LANG_JS;
|
||||||
|
|
||||||
|
public Plugin() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the plugin package name.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getPackage() {
|
||||||
|
return packageName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the plugin package name.
|
||||||
|
* @param pkg
|
||||||
|
*/
|
||||||
|
public void setPackage(String pkg) {
|
||||||
|
packageName = pkg;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the plugin author name.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getAuthor() {
|
||||||
|
return author;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the plugin author name.
|
||||||
|
* @param s
|
||||||
|
*/
|
||||||
|
public void setAuthor(String s) {
|
||||||
|
author = s;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the plugin website.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getWebsite() {
|
||||||
|
return website;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the plugin website.
|
||||||
|
* @param url
|
||||||
|
*/
|
||||||
|
public void setWebsite(String url) {
|
||||||
|
website = url;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get extra text data.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getOther() {
|
||||||
|
return other;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set extra text data.
|
||||||
|
* @param o
|
||||||
|
*/
|
||||||
|
public void setOther(String o) {
|
||||||
|
other = o;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the plugin icon.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public BufferedImage getIcon() {
|
||||||
|
return icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the plugin icon.
|
||||||
|
* @param i
|
||||||
|
*/
|
||||||
|
public void setIcon(BufferedImage i) {
|
||||||
|
icon = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the plugin code.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getScript() {
|
||||||
|
return script;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the plugin code.
|
||||||
|
* @param s
|
||||||
|
*/
|
||||||
|
public void setScript(String s) {
|
||||||
|
script = s;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See getTitle().
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the plugin short name/title.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the plugin short name/title.
|
||||||
|
* @param n
|
||||||
|
*/
|
||||||
|
public void setTitle(String n) {
|
||||||
|
title = n;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the plugin description text.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the plugin description text.
|
||||||
|
* @param d
|
||||||
|
*/
|
||||||
|
public void setDesc(String d) {
|
||||||
|
desc = d;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the long title/short description.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getLongTitle() {
|
||||||
|
return longtitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the long title/short description.
|
||||||
|
* @param t
|
||||||
|
*/
|
||||||
|
public void setLongTitle(String t) {
|
||||||
|
longtitle = t;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the script language.
|
||||||
|
* @return LANG_JS or LANG_PY
|
||||||
|
*/
|
||||||
|
public int getLang() {
|
||||||
|
return lang;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the script language.
|
||||||
|
* @param l LANG_JS or LANG_PY
|
||||||
|
*/
|
||||||
|
public void setLang(int l) {
|
||||||
|
lang = l;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue