input
stringlengths 20
285k
| output
stringlengths 20
285k
|
---|---|
public static void beforeClass() throws Exception {
server = new DummyServer("localhost", 6999);
server.start();
server.register("my-app", "my-module", null, EchoBean.class.getSimpleName(), new EchoBean());
final Endpoint endpoint = Remoting.createEndpoint("endpoint", Executors.newSingleThreadExecutor(), OptionMap.EMPTY);
final Xnio xnio = Xnio.getInstance();
final Registration registration = endpoint.addConnectionProvider("remote", new RemoteConnectionProviderFactory(xnio), OptionMap.create(Options.SSL_ENABLED, false));
final IoFuture<Connection> futureConnection = endpoint.connect(new URI("remote://localhost:6999"), OptionMap.create(Options.SASL_POLICY_NOANONYMOUS, Boolean.FALSE), new AnonymousCallbackHandler());
connection = get(futureConnection, 5, TimeUnit.SECONDS);
}
| public static void beforeClass() throws Exception {
server = new DummyServer("localhost", 6999);
server.start();
server.register("my-app", "my-module", "", EchoBean.class.getSimpleName(), new EchoBean());
final Endpoint endpoint = Remoting.createEndpoint("endpoint", Executors.newSingleThreadExecutor(), OptionMap.EMPTY);
final Xnio xnio = Xnio.getInstance();
final Registration registration = endpoint.addConnectionProvider("remote", new RemoteConnectionProviderFactory(xnio), OptionMap.create(Options.SSL_ENABLED, false));
final IoFuture<Connection> futureConnection = endpoint.connect(new URI("remote://localhost:6999"), OptionMap.create(Options.SASL_POLICY_NOANONYMOUS, Boolean.FALSE), new AnonymousCallbackHandler());
connection = get(futureConnection, 5, TimeUnit.SECONDS);
}
|
public void testShades() throws IOException {
String mvn = System.getProperty("path.to.mvn", "mvn");
String version = BPMLocalTest.getBonitaVersion();
String thePom = getPom(version);
File file = new File("shadeTester");
file.mkdir();
String outputOfMaven;
try {
File file2 = new File(file, "pom.xml");
IOUtil.write(file2, thePom);
System.out.println("building " + file2.getAbsolutePath());
System.out.println("Run mvn in " + file.getAbsolutePath());
Process exec = Runtime.getRuntime().exec(mvn + " dependency:tree", new String[] {}, file);
InputStream inputStream = exec.getInputStream();
exec.getOutputStream().close();
exec.getErrorStream().close();
outputOfMaven = IOUtil.read(inputStream);
System.out.println(outputOfMaven);
} finally {
IOUtil.deleteDir(file);
}
assertTrue("build was not successfull", outputOfMaven.contains("BUILD SUCCESS"));
outputOfMaven = outputOfMaven.replaceAll("bonitasoft.engine:bonita-server", "");
outputOfMaven = outputOfMaven.replaceAll("bonitasoft.engine:bonita-client", "");
outputOfMaven = outputOfMaven.replaceAll("bonitasoft.engine:bonita-common", "");
if (outputOfMaven.contains("bonitasoft")) {
String str = "bonitasoft";
int indexOf = outputOfMaven.indexOf(str);
String part1 = outputOfMaven.substring(indexOf - 50, indexOf - 1);
String part2 = outputOfMaven.substring(indexOf - 1, indexOf + str.length());
String part3 = outputOfMaven.substring(indexOf + str.length(), indexOf + str.length() + 50);
fail("the dependency tree contains other modules than server/client/common: \"" + part1 + " =====>>>>>" + part2 + " <<<<<=====" + part3);
}
}
| public void testShades() throws IOException {
String mvn = System.getProperty("path.to.mvn", "mvn");
String version = BPMLocalTest.getBonitaVersion();
String thePom = getPom(version);
File file = new File("shadeTester");
file.mkdir();
String outputOfMaven;
try {
File file2 = new File(file, "pom.xml");
IOUtil.write(file2, thePom);
System.out.println("building " + file2.getAbsolutePath());
System.out.println("Run mvn in " + file.getAbsolutePath());
Process exec = Runtime.getRuntime().exec(mvn + " dependency:tree", null, file);
InputStream inputStream = exec.getInputStream();
exec.getOutputStream().close();
exec.getErrorStream().close();
outputOfMaven = IOUtil.read(inputStream);
System.out.println(outputOfMaven);
} finally {
IOUtil.deleteDir(file);
}
assertTrue("build was not successfull", outputOfMaven.contains("BUILD SUCCESS"));
outputOfMaven = outputOfMaven.replaceAll("bonitasoft.engine:bonita-server", "");
outputOfMaven = outputOfMaven.replaceAll("bonitasoft.engine:bonita-client", "");
outputOfMaven = outputOfMaven.replaceAll("bonitasoft.engine:bonita-common", "");
if (outputOfMaven.contains("bonitasoft")) {
String str = "bonitasoft";
int indexOf = outputOfMaven.indexOf(str);
String part1 = outputOfMaven.substring(indexOf - 50, indexOf - 1);
String part2 = outputOfMaven.substring(indexOf - 1, indexOf + str.length());
String part3 = outputOfMaven.substring(indexOf + str.length(), indexOf + str.length() + 50);
fail("the dependency tree contains other modules than server/client/common: \"" + part1 + " =====>>>>>" + part2 + " <<<<<=====" + part3);
}
}
|
public boolean use(Hero hero, LivingEntity target, String[] args) {
Player player = hero.getPlayer();
if (target instanceof Player) {
Player tPlayer = (Player) target;
if (!(player.getItemInHand().getType() == Material.PAPER)) {
Messaging.send(player, "You need paper to perform this.");
return false;
}
if (playerSchedulers.containsKey(tPlayer.getEntityId())) {
Messaging.send(player, "$1 is already being bandaged.", tPlayer.getName());
return false;
}
if (tPlayer.getHealth() >= 20) {
Messaging.send(player, "$1 is already at full health.", tPlayer.getName());
return false;
}
tickHealth = config.getInt("tick-health", 1);
ticks = config.getInt("ticks", 10);
playerSchedulers.put(tPlayer.getEntityId(), plugin.getServer().getScheduler().scheduleAsyncRepeatingTask(plugin, new BandageTask(plugin, tPlayer), 20L, 20L));
notifyNearbyPlayers(player.getLocation().toVector(), "$1 is bandaging $2.", player.getName(), tPlayer == player ? "himself" : tPlayer.getName());
int firstSlot = player.getInventory().first(Material.PAPER);
int num = player.getInventory().getItem(firstSlot).getAmount();
if (num == 1) {
player.getInventory().clear(firstSlot);
} else if (num > 1) {
player.getInventory().getItem(firstSlot).setAmount(num - 1);
}
return true;
}
return false;
}
| public boolean use(Hero hero, LivingEntity target, String[] args) {
Player player = hero.getPlayer();
if (target instanceof Player) {
Player tPlayer = (Player) target;
if (!(player.getItemInHand().getType() == Material.PAPER)) {
Messaging.send(player, "You need paper to perform this.");
return false;
}
if (playerSchedulers.containsKey(tPlayer.getEntityId())) {
Messaging.send(player, "$1 is already being bandaged.", tPlayer.getName());
return false;
}
if (tPlayer.getHealth() >= 20) {
Messaging.send(player, "$1 is already at full health.", tPlayer.getName());
return false;
}
tickHealth = config.getInt("tick-health", 1);
ticks = config.getInt("ticks", 10);
playerSchedulers.put(tPlayer.getEntityId(), plugin.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, new BandageTask(plugin, tPlayer), 20L, 20L));
notifyNearbyPlayers(player.getLocation().toVector(), "$1 is bandaging $2.", player.getName(), tPlayer == player ? "himself" : tPlayer.getName());
int firstSlot = player.getInventory().first(Material.PAPER);
int num = player.getInventory().getItem(firstSlot).getAmount();
if (num == 1) {
player.getInventory().clear(firstSlot);
} else if (num > 1) {
player.getInventory().getItem(firstSlot).setAmount(num - 1);
}
return true;
}
return false;
}
|
private RubyTime createTime(IRubyObject[] args, boolean gmt) {
int len = 6;
if (args.length == 10) {
args = new IRubyObject[] { args[5], args[4], args[3], args[2], args[1], args[0] };
} else {
len = checkArgumentCount(args, 1, 7);
}
ThreadContext tc = getRuntime().getCurrentContext();
if(!(args[0] instanceof RubyNumeric)) {
args[0] = args[0].callMethod(tc,"to_i");
}
int year = (int)RubyNumeric.num2long(args[0]);
int month = 0;
if (len > 1) {
if (!args[1].isNil()) {
if (args[1] instanceof RubyString) {
month = -1;
for (int i = 0; i < 12; i++) {
if (months[i].equalsIgnoreCase(args[1].toString())) {
month = i;
}
}
if (month == -1) {
try {
month = Integer.parseInt(args[1].toString()) - 1;
} catch (NumberFormatException nfExcptn) {
throw getRuntime().newArgumentError("Argument out of range.");
}
}
} else {
month = (int)RubyNumeric.num2long(args[1]) - 1;
}
}
if (0 > month || month > 11) {
throw getRuntime().newArgumentError("Argument out of range.");
}
}
int[] int_args = { 1, 0, 0, 0, 0 };
for (int i = 0; len > i + 2; i++) {
if (!args[i + 2].isNil()) {
if(!(args[i+2] instanceof RubyNumeric)) {
args[i+2] = args[i+2].callMethod(tc,"to_i");
}
int_args[i] = (int)RubyNumeric.num2long(args[i + 2]);
if (time_min[i] > int_args[i] || int_args[i] > time_max[i]) {
throw getRuntime().newArgumentError("Argument out of range.");
}
}
}
Calendar cal = gmt ? Calendar.getInstance(TimeZone.getTimeZone(RubyTime.UTC)) :
Calendar.getInstance();
RubyTime time = new RubyTime(getRuntime(), (RubyClass) this, cal);
cal.set(year, month, int_args[0], int_args[1], int_args[2], int_args[3]);
cal.set(Calendar.MILLISECOND, int_args[4] / 1000);
time.setUSec(int_args[4] % 1000);
time.callInit(args, Block.NULL_BLOCK);
return time;
}
| private RubyTime createTime(IRubyObject[] args, boolean gmt) {
int len = 6;
if (args.length == 10) {
args = new IRubyObject[] { args[5], args[4], args[3], args[2], args[1], args[0] };
} else {
len = checkArgumentCount(args, 1, 7);
}
ThreadContext tc = getRuntime().getCurrentContext();
if(!(args[0] instanceof RubyNumeric)) {
args[0] = args[0].callMethod(tc,"to_i");
}
int year = (int)RubyNumeric.num2long(args[0]);
int month = 0;
if (len > 1) {
if (!args[1].isNil()) {
if (args[1] instanceof RubyString) {
month = -1;
for (int i = 0; i < 12; i++) {
if (months[i].equalsIgnoreCase(args[1].toString())) {
month = i;
}
}
if (month == -1) {
try {
month = Integer.parseInt(args[1].toString()) - 1;
} catch (NumberFormatException nfExcptn) {
throw getRuntime().newArgumentError("Argument out of range.");
}
}
} else {
month = (int)RubyNumeric.num2long(args[1]) - 1;
}
}
if (0 > month || month > 11) {
throw getRuntime().newArgumentError("Argument out of range.");
}
}
int[] int_args = { 1, 0, 0, 0, 0 };
for (int i = 0; len > i + 2; i++) {
if (!args[i + 2].isNil()) {
if(!(args[i+2] instanceof RubyNumeric)) {
args[i+2] = args[i+2].callMethod(tc,"to_i");
}
int_args[i] = (int)RubyNumeric.num2long(args[i + 2]);
if (time_min[i] > int_args[i] || int_args[i] > time_max[i]) {
throw getRuntime().newArgumentError("Argument out of range.");
}
}
}
Calendar cal = gmt ? Calendar.getInstance(TimeZone.getTimeZone(RubyTime.UTC)) :
Calendar.getInstance();
cal.set(year, month, int_args[0], int_args[1], int_args[2], int_args[3]);
cal.set(Calendar.MILLISECOND, int_args[4] / 1000);
if (cal.getTimeInMillis() < 0) {
throw getRuntime().newArgumentError("time out of range");
}
RubyTime time = new RubyTime(getRuntime(), (RubyClass) this, cal);
time.setUSec(int_args[4] % 1000);
time.callInit(args, Block.NULL_BLOCK);
return time;
}
|
private void generateASCII()
{
System.out.println("Converting image into ASCII...");
this.output = "";
int width = this.output_image.getWidth();
int height = this.output_image.getHeight();
int last_percent = 0;
for(int i = 0; i < height; ++i)
{
for(int j = 0; j < width; ++j)
{
String character = " ";
int pixel = this.output_image.getRGB(j, i);
int red = (pixel >> 16) & 0xff;
int green = (pixel >> 8) & 0xff;
int blue = (pixel) & 0xff;
int grey = (int)(0.299 * red + 0.587 * green + 0.114 * blue);
if(grey <= 100)
{
character = "+";
}
else if(grey > 100 && grey <= 150)
{
character = "@";
}
else if(grey > 150 && grey <= 240)
{
character = "*";
}
this.output += character;
}
this.output += "\n\r";
int percent = (i / height) * 100;
if(percent != last_percent)
{
last_percent = percent;
System.out.println(String.format("Progress: %d%%", percent));
}
}
System.out.println("Image converted into ASCII!");
}
| private void generateASCII()
{
System.out.println("Converting image into ASCII...");
this.output = "";
int width = this.output_image.getWidth();
int height = this.output_image.getHeight();
int last_percent = 0;
for(int i = 0; i < height; ++i)
{
for(int j = 0; j < width; ++j)
{
String character = " ";
int pixel = this.output_image.getRGB(j, i);
int red = (pixel >> 16) & 0xff;
int green = (pixel >> 8) & 0xff;
int blue = (pixel) & 0xff;
int grey = (int)(0.299 * red + 0.587 * green + 0.114 * blue);
if(grey <= 100)
{
character = "+";
}
else if(grey > 100 && grey <= 150)
{
character = "@";
}
else if(grey > 150 && grey <= 240)
{
character = "*";
}
this.output += character;
}
this.output += "\n";
int percent = (i / height) * 100;
if(percent != last_percent)
{
last_percent = percent;
System.out.println(String.format("Progress: %d%%", percent));
}
}
System.out.println("Image converted into ASCII!");
}
|
public void testProjectNameValue() throws Exception {
final DistributedMasterBuilder masterBuilder = new DistributedMasterBuilder();
final Builder nestedBuilder = new MockBuilder();
masterBuilder.add(nestedBuilder);
masterBuilder.setModule("deprecatedModule");
try {
masterBuilder.build(new HashMap());
fail("Missing projectname property should have failed.");
} catch (CruiseControlException e) {
assertEquals(DistributedMasterBuilder.MSG_MISSING_PROJECT_NAME, e.getMessage());
}
final Map projectProperties = new HashMap();
projectProperties.put(PropertiesHelper.PROJECT_NAME, "testProjectName");
masterBuilder.setFailFast();
try {
masterBuilder.build(projectProperties);
fail("Null agent should have failed.");
} catch (CruiseControlException e) {
assertEquals("Distributed build runtime exception", e.getMessage());
}
}
| public void testProjectNameValue() throws Exception {
final DistributedMasterBuilder masterBuilder = DistributedMasterBuilderTest.getMasterBuilder_LocalhostONLY();
final Builder nestedBuilder = new MockBuilder();
masterBuilder.add(nestedBuilder);
masterBuilder.setModule("deprecatedModule");
try {
masterBuilder.build(new HashMap());
fail("Missing projectname property should have failed.");
} catch (CruiseControlException e) {
assertEquals(DistributedMasterBuilder.MSG_MISSING_PROJECT_NAME, e.getMessage());
}
final Map projectProperties = new HashMap();
projectProperties.put(PropertiesHelper.PROJECT_NAME, "testProjectName");
masterBuilder.setFailFast();
try {
masterBuilder.build(projectProperties);
fail("Null agent should have failed.");
} catch (CruiseControlException e) {
assertEquals("Distributed build runtime exception", e.getMessage());
}
}
|
public LinkedList<MIDPrimerCombo> loadMIDS() throws MIDFormatException
{
LinkedList <MIDPrimerCombo> MIDTags = new LinkedList <MIDPrimerCombo>();
int midCount = 0;
try
{
String line = input.readLine();
while (line != null)
{
if(line.trim().length() == 0)
{
continue;
}
String[] columns = line.split(",");
if(columns.length != 3)
{
columns = line.split("\t");
if(columns.length != 3)
throw new MIDFormatException("Incorrect number of columns in " + inputLocation);
}
String descriptor = columns[0].trim();
String midTag = columns[1].trim();
String primerSeq = columns[2].trim();
for(int i = 0; i < midTag.length();i++)
{
char curr = midTag.charAt(i);
if(! AcaciaEngine.getEngine().isIUPAC(curr))
{
throw new MIDFormatException("Invalid MID sequence: " + midTag);
}
}
midTag = midTag.replace("\"", "");
descriptor = descriptor.replace("\"", "");
MIDTags.add(new MIDPrimerCombo(midTag.toUpperCase(), primerSeq.toUpperCase(), descriptor));
line = input.readLine();
midCount++;
}
}
catch (IOException ie)
{
System.out.println("An input exception occurred from " + inputLocation);
}
return MIDTags;
}
| public LinkedList<MIDPrimerCombo> loadMIDS() throws MIDFormatException
{
LinkedList <MIDPrimerCombo> MIDTags = new LinkedList <MIDPrimerCombo>();
int midCount = 0;
try
{
String line = input.readLine();
while (line != null)
{
if(line.trim().length() == 0)
{
line = input.readLine();
continue;
}
String[] columns = line.split(",");
if(columns.length != 3)
{
columns = line.split("\t");
if(columns.length != 3)
throw new MIDFormatException("Incorrect number of columns in " + inputLocation);
}
String descriptor = columns[0].trim();
String midTag = columns[1].trim();
String primerSeq = columns[2].trim();
for(int i = 0; i < midTag.length();i++)
{
char curr = midTag.charAt(i);
if(! AcaciaEngine.getEngine().isIUPAC(curr))
{
throw new MIDFormatException("Invalid MID sequence: " + midTag);
}
}
midTag = midTag.replace("\"", "");
descriptor = descriptor.replace("\"", "");
MIDTags.add(new MIDPrimerCombo(midTag.toUpperCase(), primerSeq.toUpperCase(), descriptor));
line = input.readLine();
midCount++;
}
}
catch (IOException ie)
{
System.out.println("An input exception occurred from " + inputLocation);
}
return MIDTags;
}
|
public Map pageListToMap(HttpServletRequest req, boolean loggedIn, Site site,
SitePage page, String toolContextPath, String portalPrefix, boolean doPages,
boolean resetTools, boolean includeSummary)
{
Map<String, Object> theMap = new HashMap<String, Object>();
String pageUrl = Web.returnUrl(req, "/" + portalPrefix + "/"
+ Web.escapeUrl(getSiteEffectiveId(site)) + "/page/");
String toolUrl = Web.returnUrl(req, "/" + portalPrefix + "/"
+ Web.escapeUrl(getSiteEffectiveId(site)));
if (resetTools)
{
toolUrl = toolUrl + "/tool-reset/";
}
else
{
toolUrl = toolUrl + "/tool/";
}
String pagePopupUrl = Web.returnUrl(req, "/page/");
boolean showHelp = ServerConfigurationService.getBoolean("display.help.menu",
true);
String iconUrl = site.getIconUrlFull();
boolean published = site.isPublished();
String type = site.getType();
theMap.put("pageNavPublished", Boolean.valueOf(published));
theMap.put("pageNavType", type);
theMap.put("pageNavIconUrl", iconUrl);
List pages = getPermittedPagesInOrder(site);
List<Map> l = new ArrayList<Map>();
for (Iterator i = pages.iterator(); i.hasNext();)
{
SitePage p = (SitePage) i.next();
List pTools = p.getTools();
ToolConfiguration firstTool = null;
if (pTools != null && pTools.size() > 0)
{
firstTool = (ToolConfiguration) pTools.get(0);
}
String toolsOnPage = null;
boolean current = (page != null && p.getId().equals(page.getId()) && !p
.isPopUp());
String alias = lookupPageToAlias(site.getId(), p);
String pagerefUrl = pageUrl + Web.escapeUrl((alias != null)?alias:p.getId());
if (doPages || p.isPopUp())
{
Map<String, Object> m = new HashMap<String, Object>();
m.put("isPage", Boolean.valueOf(true));
m.put("current", Boolean.valueOf(current));
m.put("ispopup", Boolean.valueOf(p.isPopUp()));
m.put("pagePopupUrl", pagePopupUrl);
m.put("pageTitle", Web.escapeHtml(p.getTitle()));
m.put("jsPageTitle", Web.escapeJavascript(p.getTitle()));
m.put("pageId", Web.escapeUrl(p.getId()));
m.put("jsPageId", Web.escapeJavascript(p.getId()));
m.put("pageRefUrl", pagerefUrl);
Iterator tools = pTools.iterator();
StringBuffer desc = new StringBuffer();
int tCount = 0;
while(tools.hasNext()){
ToolConfiguration t = (ToolConfiguration)tools.next();
if (tCount > 0){
desc.append(" | ");
}
desc.append(t.getTool().getDescription());
tCount++;
}
String description = desc.toString().replace('"','-');
m.put("description", desc.toString());
if (toolsOnPage != null) m.put("toolsOnPage", toolsOnPage);
if (includeSummary) summarizePage(m, site, p);
if (firstTool != null)
{
String menuClass = firstTool.getToolId();
menuClass = "icon-" + menuClass.replace('.', '-');
m.put("menuClass", menuClass);
}
else
{
m.put("menuClass", "icon-default-tool");
}
m.put("pageProps", createPageProps(p));
m.put("_sitePage", p);
l.add(m);
continue;
}
Iterator iPt = pTools.iterator();
while (iPt.hasNext())
{
ToolConfiguration placement = (ToolConfiguration) iPt.next();
String toolrefUrl = toolUrl + Web.escapeUrl(placement.getId());
Map<String, Object> m = new HashMap<String, Object>();
m.put("isPage", Boolean.valueOf(false));
m.put("toolId", Web.escapeUrl(placement.getId()));
m.put("jsToolId", Web.escapeJavascript(placement.getId()));
m.put("toolRegistryId", placement.getToolId());
m.put("toolTitle", Web.escapeHtml(placement.getTitle()));
m.put("jsToolTitle", Web.escapeJavascript(placement.getTitle()));
m.put("toolrefUrl", toolrefUrl);
String menuClass = placement.getToolId();
menuClass = "icon-" + menuClass.replace('.', '-');
m.put("menuClass", menuClass);
m.put("_placement", placement);
l.add(m);
}
}
PageFilter pageFilter = portal.getPageFilter();
if (pageFilter != null)
{
l = pageFilter.filterPlacements(l, site);
}
theMap.put("pageNavTools", l);
theMap.put("pageMaxIfSingle", ServerConfigurationService.getBoolean(
"portal.experimental.maximizesinglepage", false));
theMap.put("pageNavToolsCount", Integer.valueOf(l.size()));
String helpUrl = ServerConfigurationService.getHelpUrl(null);
theMap.put("pageNavShowHelp", Boolean.valueOf(showHelp));
theMap.put("pageNavHelpUrl", helpUrl);
theMap.put("helpMenuClass", "icon-sakai-help");
theMap.put("subsiteClass", "icon-sakai-subsite");
boolean showPresence;
String globalShowPresence = ServerConfigurationService.getString("display.users.present");
if ("never".equals(globalShowPresence)) {
showPresence = false;
} else if ("always".equals(globalShowPresence)) {
showPresence = true;
} else {
String showPresenceSite = site.getProperties().getProperty("display-users-present");
if (showPresenceSite == null)
{
showPresence = Boolean.valueOf(globalShowPresence).booleanValue();
}
else
{
showPresence = Boolean.valueOf(showPresenceSite).booleanValue();
}
}
String presenceUrl = Web.returnUrl(req, "/presence/"
+ Web.escapeUrl(site.getId()));
theMap.put("pageNavShowPresenceLoggedIn", Boolean.valueOf(showPresence
&& loggedIn));
theMap.put("pageNavPresenceUrl", presenceUrl);
return theMap;
}
| public Map pageListToMap(HttpServletRequest req, boolean loggedIn, Site site,
SitePage page, String toolContextPath, String portalPrefix, boolean doPages,
boolean resetTools, boolean includeSummary)
{
Map<String, Object> theMap = new HashMap<String, Object>();
String pageUrl = Web.returnUrl(req, "/" + portalPrefix + "/"
+ Web.escapeUrl(getSiteEffectiveId(site)) + "/page/");
String toolUrl = Web.returnUrl(req, "/" + portalPrefix + "/"
+ Web.escapeUrl(getSiteEffectiveId(site)));
if (resetTools)
{
toolUrl = toolUrl + "/tool-reset/";
}
else
{
toolUrl = toolUrl + "/tool/";
}
String pagePopupUrl = Web.returnUrl(req, "/page/");
boolean showHelp = ServerConfigurationService.getBoolean("display.help.menu",
true);
String iconUrl = site.getIconUrlFull();
boolean published = site.isPublished();
String type = site.getType();
theMap.put("pageNavPublished", Boolean.valueOf(published));
theMap.put("pageNavType", type);
theMap.put("pageNavIconUrl", iconUrl);
List pages = getPermittedPagesInOrder(site);
List<Map> l = new ArrayList<Map>();
for (Iterator i = pages.iterator(); i.hasNext();)
{
SitePage p = (SitePage) i.next();
List pTools = p.getTools();
ToolConfiguration firstTool = null;
if (pTools != null && pTools.size() > 0)
{
firstTool = (ToolConfiguration) pTools.get(0);
}
String toolsOnPage = null;
boolean current = (page != null && p.getId().equals(page.getId()) && !p
.isPopUp());
String alias = lookupPageToAlias(site.getId(), p);
String pagerefUrl = pageUrl + Web.escapeUrl((alias != null)?alias:p.getId());
if (doPages || p.isPopUp())
{
Map<String, Object> m = new HashMap<String, Object>();
m.put("isPage", Boolean.valueOf(true));
m.put("current", Boolean.valueOf(current));
m.put("ispopup", Boolean.valueOf(p.isPopUp()));
m.put("pagePopupUrl", pagePopupUrl);
m.put("pageTitle", Web.escapeHtml(p.getTitle()));
m.put("jsPageTitle", Web.escapeJavascript(p.getTitle()));
m.put("pageId", Web.escapeUrl(p.getId()));
m.put("jsPageId", Web.escapeJavascript(p.getId()));
m.put("pageRefUrl", pagerefUrl);
Iterator tools = pTools.iterator();
StringBuffer desc = new StringBuffer();
int tCount = 0;
while(tools.hasNext()){
ToolConfiguration t = (ToolConfiguration)tools.next();
if (tCount > 0){
desc.append(" | ");
}
if ( t.getTool() == null ) continue;
desc.append(t.getTool().getDescription());
tCount++;
}
String description = desc.toString().replace('"','-');
m.put("description", desc.toString());
if (toolsOnPage != null) m.put("toolsOnPage", toolsOnPage);
if (includeSummary) summarizePage(m, site, p);
if (firstTool != null)
{
String menuClass = firstTool.getToolId();
menuClass = "icon-" + menuClass.replace('.', '-');
m.put("menuClass", menuClass);
}
else
{
m.put("menuClass", "icon-default-tool");
}
m.put("pageProps", createPageProps(p));
m.put("_sitePage", p);
l.add(m);
continue;
}
Iterator iPt = pTools.iterator();
while (iPt.hasNext())
{
ToolConfiguration placement = (ToolConfiguration) iPt.next();
String toolrefUrl = toolUrl + Web.escapeUrl(placement.getId());
Map<String, Object> m = new HashMap<String, Object>();
m.put("isPage", Boolean.valueOf(false));
m.put("toolId", Web.escapeUrl(placement.getId()));
m.put("jsToolId", Web.escapeJavascript(placement.getId()));
m.put("toolRegistryId", placement.getToolId());
m.put("toolTitle", Web.escapeHtml(placement.getTitle()));
m.put("jsToolTitle", Web.escapeJavascript(placement.getTitle()));
m.put("toolrefUrl", toolrefUrl);
String menuClass = placement.getToolId();
menuClass = "icon-" + menuClass.replace('.', '-');
m.put("menuClass", menuClass);
m.put("_placement", placement);
l.add(m);
}
}
PageFilter pageFilter = portal.getPageFilter();
if (pageFilter != null)
{
l = pageFilter.filterPlacements(l, site);
}
theMap.put("pageNavTools", l);
theMap.put("pageMaxIfSingle", ServerConfigurationService.getBoolean(
"portal.experimental.maximizesinglepage", false));
theMap.put("pageNavToolsCount", Integer.valueOf(l.size()));
String helpUrl = ServerConfigurationService.getHelpUrl(null);
theMap.put("pageNavShowHelp", Boolean.valueOf(showHelp));
theMap.put("pageNavHelpUrl", helpUrl);
theMap.put("helpMenuClass", "icon-sakai-help");
theMap.put("subsiteClass", "icon-sakai-subsite");
boolean showPresence;
String globalShowPresence = ServerConfigurationService.getString("display.users.present");
if ("never".equals(globalShowPresence)) {
showPresence = false;
} else if ("always".equals(globalShowPresence)) {
showPresence = true;
} else {
String showPresenceSite = site.getProperties().getProperty("display-users-present");
if (showPresenceSite == null)
{
showPresence = Boolean.valueOf(globalShowPresence).booleanValue();
}
else
{
showPresence = Boolean.valueOf(showPresenceSite).booleanValue();
}
}
String presenceUrl = Web.returnUrl(req, "/presence/"
+ Web.escapeUrl(site.getId()));
theMap.put("pageNavShowPresenceLoggedIn", Boolean.valueOf(showPresence
&& loggedIn));
theMap.put("pageNavPresenceUrl", presenceUrl);
return theMap;
}
|
protected void onRowPopulated(final WebMarkupContainer rowComponent) {
if (disableRowClickNotifications())
return;
rowComponent.add(new AjaxFormSubmitBehavior(getForm(), "onclick") {
private static final long serialVersionUID = 1L;
@Override
protected void onSubmit(AjaxRequestTarget target) {
}
@Override
protected void onError(AjaxRequestTarget target) {
}
@Override
protected void onEvent(AjaxRequestTarget target) {
Form form = getForm();
form.visitFormComponentsPostOrder(new FormComponent.AbstractVisitor() {
public void onFormComponent(final FormComponent formComponent) {
if (formComponent.isVisibleInHierarchy()) {
formComponent.inputChanged();
}
}
});
String column = getRequest().getParameter("column");
lastClickedColumn = column;
IModel model = rowComponent.getModel();
IGridColumn lastClickedColumn = getLastClickedColumn();
if (lastClickedColumn != null && lastClickedColumn.cellClicked(model) == true) {
return;
}
onRowClicked(target, model);
}
@Override
public CharSequence getCallbackUrl() {
return super.getCallbackUrl() + "&column='+col+'";
}
@Override
protected IAjaxCallDecorator getAjaxCallDecorator() {
return new AjaxCallDecorator() {
private static final long serialVersionUID = 1L;
@Override
public CharSequence decorateScript(CharSequence script) {
return super.decorateScript("if (InMethod.XTable.canSelectRow(event)) { "
+ "var col=(this.imxtClickedColumn || ''); this.imxtClickedColumn='';" + script
+ " } else return false;");
}
};
}
});
}
| protected void onRowPopulated(final WebMarkupContainer rowComponent) {
if (disableRowClickNotifications())
return;
rowComponent.add(new AjaxFormSubmitBehavior(getForm(), "onclick") {
private static final long serialVersionUID = 1L;
@Override
protected void onSubmit(AjaxRequestTarget target) {
}
@Override
protected void onError(AjaxRequestTarget target) {
}
@Override
protected void onEvent(AjaxRequestTarget target) {
Form form = getForm();
form.visitFormComponentsPostOrder(new FormComponent.AbstractVisitor() {
public void onFormComponent(final FormComponent formComponent) {
if (formComponent.isVisibleInHierarchy()) {
formComponent.inputChanged();
}
}
});
String column = getRequest().getParameter("column");
lastClickedColumn = column;
IModel model = rowComponent.getModel();
IGridColumn lastClickedColumn = getLastClickedColumn();
if (lastClickedColumn != null && lastClickedColumn.cellClicked(model) == true) {
return;
}
onRowClicked(target, model);
}
@Override
public CharSequence getCallbackUrl() {
return super.getCallbackUrl() + "&column='+col+'";
}
@Override
protected IAjaxCallDecorator getAjaxCallDecorator() {
return new AjaxCallDecorator() {
private static final long serialVersionUID = 1L;
@Override
public CharSequence decorateScript(CharSequence script) {
return super.decorateScript("if (InMethod.XTable.canSelectRow(event)) { "
+ "var col=(this.imxtClickedColumn || ''); this.imxtClickedColumn='';" + script
+ " }");
}
};
}
});
}
|
private void editResource
(AppleResponse
res, AppleRequest
req, String
type, String
messages) {
boolean validated = true;
boolean insertSuccess = false;
boolean updateDate = false;
String dctPublisher;
String dctIdentifier;
String dateAccepted;
String committer;
String allTopics = adminService.getAllTopics();
String allLanguages = adminService.getAllLanguages();
String allMediatypes = adminService.getAllMediaTypes();
String allAudiences = adminService.getAllAudiences();
String allStatuses = adminService.getAllStatuses();
StringBuffer messageBuffer = new StringBuffer();
messageBuffer.append("<c:messages xmlns:c=\"http://xmlns.computas.com/cocoon\" xmlns:i18n=\"http://apache.org/cocoon/i18n/2.1\">\n");
messageBuffer.append(messages);
Map<String, Object> bizData = new HashMap<String, Object>();
bizData.put("topics", allTopics);
bizData.put("languages", allLanguages);
bizData.put("mediatypes", allMediatypes);
bizData.put("audience", allAudiences);
bizData.put("status", allStatuses);
bizData.put("userprivileges", userPrivileges);
if (req.getCocoonRequest().getMethod().equalsIgnoreCase("GET")) {
bizData.put("tempvalues", "<empty></empty>");
if ("ny".equalsIgnoreCase(type)) {
registerNewResourceURL(req, res);
return;
} else {
bizData.put("resource", adminService.getResourceByURI(req.getCocoonRequest().getParameter("uri")));
bizData.put("publishers", adminService.getAllPublishers());
bizData.put("mode", "edit");
bizData.put("messages", "<empty></empty>");
res.sendPage("xml2/ressurs", bizData);
}
} else if (req.getCocoonRequest().getMethod().equalsIgnoreCase("POST")) {
if ("Slett ressurs".equalsIgnoreCase(req.getCocoonRequest().getParameter("actionbutton")) || "Delete resource".equalsIgnoreCase(req.getCocoonRequest().getParameter("actionbutton"))) {
String deleteString = "DELETE {\n" +
"<" + req.getCocoonRequest().getParameter("uri") + "> ?a ?o.\n" +
"} WHERE {\n" +
"<" + req.getCocoonRequest().getParameter("uri") + "> ?a ?o. }";
boolean deleteResourceSuccess = sparulDispatcher.query(deleteString);
logger.trace("ResourceController.editResource --> DELETE RESOURCE QUERY:\n" + deleteString);
logger.trace("ResourceController.editResource --> DELETE RESOURCE QUERY RESULT: " + deleteResourceSuccess);
if (deleteResourceSuccess) {
messageBuffer.append("<c:message>Ressursen slettet!</c:message>\n");
bizData.put("resource", "<empty></empty>");
bizData.put("tempvalues", "<empty></empty>");
bizData.put("mode", "edit");
} else {
messageBuffer.append("<c:message>Feil ved sletting av ressurs</c:message>\n");
bizData.put("tempvalues", "<empty></empty>");
bizData.put("resource", adminService.getResourceByURI(req.getCocoonRequest().getParameter("sub:url")));
bizData.put("mode", "edit");
}
} else {
Map<String, String[]> parameterMap = new TreeMap<String, String[]>(createParametersMap(req.getCocoonRequest()));
String tempPrefixes = "<c:tempvalues \n" +
"xmlns:topic=\"" + getProperty("sublima.base.url") + "topic/\"\n" +
"xmlns:skos=\"http://www.w3.org/2004/02/skos/core#\"\n" +
"xmlns:wdr=\"http://www.w3.org/2007/05/powder#\"\n" +
"xmlns:lingvoj=\"http://www.lingvoj.org/ontology#\"\n" +
"xmlns:sioc=\"http://rdfs.org/sioc/ns#\"\n" +
"xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n" +
"xmlns:foaf=\"http://xmlns.com/foaf/0.1/\"\n" +
"xmlns:owl=\"http://www.w3.org/2002/07/owl#\"\n" +
"xmlns:dct=\"http://purl.org/dc/terms/\"\n" +
"xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\"\n" +
"xmlns:dcmitype=\"http://purl.org/dc/dcmitype/\"\n" +
"xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\"\n" +
"xmlns:c=\"http://xmlns.computas.com/cocoon\"\n" +
"xmlns:i18n=\"http://apache.org/cocoon/i18n/2.1\"\n" +
"xmlns:sub=\"http://xmlns.computas.com/sublima#\">\n";
Date date = new Date();
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
dateAccepted = dateFormat.format(date);
if (parameterMap.containsKey("markasnew")) {
updateDate = true;
parameterMap.remove("markasnew");
}
parameterMap.put("sub:committer", new String[]{user.getId()});
if ("".equalsIgnoreCase(req.getCocoonRequest().getParameter("dct:identifier")) || req.getCocoonRequest().getParameter("dct:identifier") == null) {
updateDate = true;
dctIdentifier = req.getCocoonRequest().getParameter("dct:title-1").replace(" ", "_");
dctIdentifier = dctIdentifier.replace(",", "_");
dctIdentifier = dctIdentifier.replace(".", "_");
dctIdentifier = getProperty("sublima.base.url") + "resource/" + dctIdentifier + parameterMap.get("the-resource").hashCode();
} else {
dctIdentifier = req.getCocoonRequest().getParameter("dct:identifier");
}
if (updateDate) {
parameterMap.put("dct:dateAccepted", new String[]{dateAccepted});
}
Form2SparqlService form2SparqlService = new Form2SparqlService(parameterMap.get("prefix"));
parameterMap.put("sub:url", parameterMap.get("the-resource"));
parameterMap.remove("dct:identifier");
parameterMap.put("dct:identifier", new String[] {dctIdentifier});
parameterMap.remove("prefix");
parameterMap.remove("actionbutton");
if (parameterMap.get("subjecturi-prefix") != null) {
parameterMap.put("subjecturi-prefix", new String[]{getProperty("sublima.base.url") +
parameterMap.get("subjecturi-prefix")[0]});
}
String sparqlQuery = null;
try {
sparqlQuery = form2SparqlService.convertForm2Sparul(parameterMap);
}
catch (IOException e) {
messageBuffer.append("<c:message>Feil ved lagring av emne</c:message>\n");
}
insertSuccess = sparulDispatcher.query(sparqlQuery);
logger.trace("AdminController.editResource --> INSERT QUERY RESULT: " + insertSuccess);
if (insertSuccess) {
messageBuffer.append("<c:message>Ny ressurs lagt til!</c:message>\n");
} else {
messageBuffer.append("<c:message>Feil ved lagring av ny ressurs</c:message>\n");
bizData.put("resource", "<empty></empty>");
}
}
if (insertSuccess) {
bizData.put("resource", adminService.getResourceByURI(req.getCocoonRequest().getParameter("the-resource")));
bizData.put("tempvalues", "<empty></empty>");
bizData.put("mode", "edit");
} else {
bizData.put("resource", "<empty></empty>");
bizData.put("tempvalues", "<empty/>");
bizData.put("mode", "temp");
}
messageBuffer.append("</c:messages>\n");
bizData.put("messages", messageBuffer.toString());
bizData.put("userprivileges", userPrivileges);
bizData.put("publishers", adminService.getAllPublishers());
res.sendPage("xml2/ressurs", bizData);
}
| private void editResource
(AppleResponse
res, AppleRequest
req, String
type, String
messages) {
boolean validated = true;
boolean insertSuccess = false;
boolean updateDate = false;
String dctPublisher;
String dctIdentifier;
String dateAccepted;
String committer;
String allTopics = adminService.getAllTopics();
String allLanguages = adminService.getAllLanguages();
String allMediatypes = adminService.getAllMediaTypes();
String allAudiences = adminService.getAllAudiences();
String allStatuses = adminService.getAllStatuses();
StringBuffer messageBuffer = new StringBuffer();
messageBuffer.append("<c:messages xmlns:c=\"http://xmlns.computas.com/cocoon\" xmlns:i18n=\"http://apache.org/cocoon/i18n/2.1\">\n");
messageBuffer.append(messages);
Map<String, Object> bizData = new HashMap<String, Object>();
bizData.put("topics", allTopics);
bizData.put("languages", allLanguages);
bizData.put("mediatypes", allMediatypes);
bizData.put("audience", allAudiences);
bizData.put("status", allStatuses);
bizData.put("userprivileges", userPrivileges);
if (req.getCocoonRequest().getMethod().equalsIgnoreCase("GET")) {
bizData.put("tempvalues", "<empty></empty>");
if ("ny".equalsIgnoreCase(type)) {
registerNewResourceURL(req, res);
return;
} else {
bizData.put("resource", adminService.getResourceByURI(req.getCocoonRequest().getParameter("uri")));
bizData.put("publishers", adminService.getAllPublishers());
bizData.put("mode", "edit");
bizData.put("messages", "<empty></empty>");
res.sendPage("xml2/ressurs", bizData);
}
} else if (req.getCocoonRequest().getMethod().equalsIgnoreCase("POST")) {
if ("Slett ressurs".equalsIgnoreCase(req.getCocoonRequest().getParameter("actionbutton")) || "Delete resource".equalsIgnoreCase(req.getCocoonRequest().getParameter("actionbutton"))) {
String deleteString = "DELETE {\n" +
"<" + req.getCocoonRequest().getParameter("uri") + "> ?a ?o.\n" +
"} WHERE {\n" +
"<" + req.getCocoonRequest().getParameter("uri") + "> ?a ?o. }";
boolean deleteResourceSuccess = sparulDispatcher.query(deleteString);
logger.trace("ResourceController.editResource --> DELETE RESOURCE QUERY:\n" + deleteString);
logger.trace("ResourceController.editResource --> DELETE RESOURCE QUERY RESULT: " + deleteResourceSuccess);
if (deleteResourceSuccess) {
messageBuffer.append("<c:message>Ressursen slettet!</c:message>\n");
bizData.put("resource", "<empty></empty>");
bizData.put("tempvalues", "<empty></empty>");
bizData.put("mode", "edit");
} else {
messageBuffer.append("<c:message>Feil ved sletting av ressurs</c:message>\n");
bizData.put("tempvalues", "<empty></empty>");
bizData.put("resource", adminService.getResourceByURI(req.getCocoonRequest().getParameter("sub:url")));
bizData.put("mode", "edit");
}
} else {
Map<String, String[]> parameterMap = new TreeMap<String, String[]>(createParametersMap(req.getCocoonRequest()));
String tempPrefixes = "<c:tempvalues \n" +
"xmlns:topic=\"" + getProperty("sublima.base.url") + "topic/\"\n" +
"xmlns:skos=\"http://www.w3.org/2004/02/skos/core#\"\n" +
"xmlns:wdr=\"http://www.w3.org/2007/05/powder#\"\n" +
"xmlns:lingvoj=\"http://www.lingvoj.org/ontology#\"\n" +
"xmlns:sioc=\"http://rdfs.org/sioc/ns#\"\n" +
"xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n" +
"xmlns:foaf=\"http://xmlns.com/foaf/0.1/\"\n" +
"xmlns:owl=\"http://www.w3.org/2002/07/owl#\"\n" +
"xmlns:dct=\"http://purl.org/dc/terms/\"\n" +
"xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\"\n" +
"xmlns:dcmitype=\"http://purl.org/dc/dcmitype/\"\n" +
"xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\"\n" +
"xmlns:c=\"http://xmlns.computas.com/cocoon\"\n" +
"xmlns:i18n=\"http://apache.org/cocoon/i18n/2.1\"\n" +
"xmlns:sub=\"http://xmlns.computas.com/sublima#\">\n";
Date date = new Date();
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
dateAccepted = dateFormat.format(date);
if (parameterMap.containsKey("markasnew")) {
updateDate = true;
parameterMap.remove("markasnew");
}
parameterMap.put("sub:committer", new String[]{user.getId()});
if ("".equalsIgnoreCase(req.getCocoonRequest().getParameter("dct:identifier")) || req.getCocoonRequest().getParameter("dct:identifier") == null) {
updateDate = true;
dctIdentifier = req.getCocoonRequest().getParameter("dct:title-1").replace(" ", "_");
dctIdentifier = dctIdentifier.replace(",", "_");
dctIdentifier = dctIdentifier.replace(".", "_");
dctIdentifier = getProperty("sublima.base.url") + "resource/" + dctIdentifier + parameterMap.get("the-resource").hashCode();
} else {
dctIdentifier = req.getCocoonRequest().getParameter("dct:identifier");
}
if (updateDate) {
parameterMap.put("dct:dateAccepted", new String[]{dateAccepted});
}
Form2SparqlService form2SparqlService = new Form2SparqlService(parameterMap.get("prefix"));
parameterMap.put("sub:url", parameterMap.get("the-resource"));
parameterMap.remove("dct:identifier");
parameterMap.put("dct:identifier", new String[] {dctIdentifier});
parameterMap.remove("prefix");
parameterMap.remove("actionbutton");
if (parameterMap.get("subjecturi-prefix") != null) {
parameterMap.put("subjecturi-prefix", new String[]{getProperty("sublima.base.url") +
parameterMap.get("subjecturi-prefix")[0]});
}
String sparqlQuery = null;
try {
sparqlQuery = form2SparqlService.convertForm2Sparul(parameterMap);
}
catch (IOException e) {
messageBuffer.append("<c:message>Feil ved lagring av emne</c:message>\n");
}
insertSuccess = sparulDispatcher.query(sparqlQuery);
logger.trace("AdminController.editResource --> INSERT QUERY RESULT: " + insertSuccess);
if (insertSuccess) {
messageBuffer.append("<c:message>Ny ressurs lagt til!</c:message>\n");
} else {
messageBuffer.append("<c:message>Feil ved lagring av ny ressurs</c:message>\n");
}
}
if (insertSuccess) {
bizData.put("resource", adminService.getResourceByURI(req.getCocoonRequest().getParameter("the-resource")));
bizData.put("tempvalues", "<empty></empty>");
bizData.put("mode", "edit");
} else {
bizData.put("resource", "<empty></empty>");
bizData.put("tempvalues", "<empty/>");
bizData.put("mode", "edit");
}
messageBuffer.append("</c:messages>\n");
bizData.put("messages", messageBuffer.toString());
bizData.put("userprivileges", userPrivileges);
bizData.put("publishers", adminService.getAllPublishers());
res.sendPage("xml2/ressurs", bizData);
}
|
public void run() {
try {
socket = new DatagramSocket(port);
} catch (Exception e) {
System.out.println("Unable to start UDP server on port " + port + ". Ignoring ...");
return ;
}
System.out.println("UDP server started on port " + port);
while (true) {
try {
if (isInterrupted()) break;
byte[] buf = new byte[256];
DatagramPacket packet = new DatagramPacket(buf, buf.length);
socket.receive(packet);
msgList.add(packet);
} catch (IOException e) {
if (e.getMessage().equals("socket closed")) {
} else {
System.out.println("ERROR in UDP server. Stack trace:");
e.printStackTrace();
}
}
}
socket.close();
System.out.println("UDP NAT server closed.");
}
| public void run() {
try {
socket = new DatagramSocket(port);
} catch (Exception e) {
System.out.println("Unable to start UDP server on port " + port + ". Ignoring ...");
return ;
}
System.out.println("UDP server started on port " + port);
while (true) {
try {
if (isInterrupted()) break;
byte[] buf = new byte[256];
DatagramPacket packet = new DatagramPacket(buf, buf.length);
socket.receive(packet);
msgList.add(packet);
} catch (IOException e) {
if (e.getMessage().equalsIgnoreCase("socket closed")) {
} else {
System.out.println("ERROR in UDP server. Stack trace:");
e.printStackTrace();
}
}
}
socket.close();
System.out.println("UDP NAT server closed.");
}
|
ChartsPanel(RemoteCollector remoteCollector) {
super(remoteCollector);
final JLabel throbberLabel = new JLabel(THROBBER_ICON);
add(throbberLabel, BorderLayout.NORTH);
add(createButtonsPanel(), BorderLayout.CENTER);
final SwingWorker<Map<String, byte[]>, Object> swingWorker = new SwingWorker<Map<String, byte[]>, Object>() {
@Override
protected Map<String, byte[]> doInBackground() throws IOException {
return getRemoteCollector().collectJRobins(CHART_WIDTH, CHART_HEIGHT);
}
@Override
protected void done() {
try {
final Map<String, byte[]> jrobins = get();
final JPanel mainJRobinsPanel = createJRobinPanel(jrobins);
remove(throbberLabel);
add(mainJRobinsPanel, BorderLayout.NORTH);
revalidate();
} catch (final Exception e) {
MSwingUtilities.showException(e);
}
}
};
swingWorker.execute();
}
| ChartsPanel(RemoteCollector remoteCollector) {
super(remoteCollector);
final JLabel throbberLabel = new JLabel(THROBBER_ICON);
add(throbberLabel, BorderLayout.NORTH);
add(createButtonsPanel(), BorderLayout.CENTER);
final SwingWorker<Map<String, byte[]>, Object> swingWorker = new SwingWorker<Map<String, byte[]>, Object>() {
@Override
protected Map<String, byte[]> doInBackground() throws IOException {
return getRemoteCollector().collectJRobins(CHART_WIDTH, CHART_HEIGHT);
}
@Override
protected void done() {
try {
final Map<String, byte[]> jrobins = get();
final JPanel mainJRobinsPanel = createJRobinPanel(jrobins);
remove(throbberLabel);
add(mainJRobinsPanel, BorderLayout.NORTH);
revalidate();
} catch (final Exception e) {
MSwingUtilities.showException(e);
remove(throbberLabel);
}
}
};
swingWorker.execute();
}
|
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
service = new TrollServiceSqlLite(getBaseContext());
String levelId = getIntent().getExtras().getString(HomeScreenActiity.LEVEL_ID);
level = service.getLevel(levelId);
loadComponents();
initGraphics();
moveToCity(service.getCity(level.getStartCityId()));
City goal = service.getCity(level.getGoalCityId());
goalView.setText("Goal: " + goal.getName());
mapView.setGoalCity(goal);
counter = new CountDown(10000,1000, timeLeftView);
counter.start();
counter.setOnFinishListener(new CountDown.OnCounterFinishListener() {
public void finished() {
failDialog.show();
}
});
successDialog = new SuccessDialog(this);
Typeface tf = Typeface.createFromAsset(getAssets(), "fonts/fixed.ttf");
button1.setTypeface(tf);
button2.setTypeface(tf);
button3.setTypeface(tf);
button4.setTypeface(tf);
goalView.setTypeface(tf);
timeLeftView.setTypeface(tf);
}
| public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
service = new TrollServiceSqlLite(getBaseContext());
String levelId = getIntent().getExtras().getString(HomeScreenActiity.LEVEL_ID);
level = service.getLevel(levelId);
loadComponents();
initGraphics();
moveToCity(service.getCity(level.getStartCityId()));
City goal = service.getCity(level.getGoalCityId());
goalView.setText("Goal: " + goal.getName());
mapView.setGoalCity(goal);
counter = new CountDown(10000,1000, timeLeftView);
counter.start();
counter.setOnFinishListener(new CountDown.OnCounterFinishListener() {
public void finished() {
failDialog.show();
}
});
successDialog = new SuccessDialog(this, levelId);
Typeface tf = Typeface.createFromAsset(getAssets(), "fonts/fixed.ttf");
button1.setTypeface(tf);
button2.setTypeface(tf);
button3.setTypeface(tf);
button4.setTypeface(tf);
goalView.setTypeface(tf);
timeLeftView.setTypeface(tf);
}
|
private final TextElement parseText(String currentText, String tag, String arg) {
TextElement result = new TextElement(tag);
if(result.mType == TextElementType.Quote)
result.mContent = arg;
if (currentText.substring(0,1).equals("\n")) {
result.mConsumedLength++;
}
Pattern tagPattern = Pattern.compile("\\[(.+?)(?:=\"?(.+?)\"?)?\\]", Pattern.MULTILINE|Pattern.DOTALL);
Matcher tagMatcher = tagPattern.matcher(currentText);
String keyRegex = "(CH|SS|US|KS)K@[%,~" + URLEncoder.getSafeURLCharacters() + "]+";
Pattern keyPattern = Pattern.compile(keyRegex, Pattern.MULTILINE|Pattern.DOTALL);
Matcher keyMatcher = keyPattern.matcher(currentText);
Pattern oldQuotePattern = Pattern.compile("^(\\S+@\\S+?.freetalk) wrote:\n", Pattern.MULTILINE|Pattern.DOTALL);
Matcher oldQuoteMatcher = oldQuotePattern.matcher(currentText);
while (result.mConsumedLength < currentText.length()) {
int tagPos = currentText.length();
if (tagMatcher.find(result.mConsumedLength))
tagPos = tagMatcher.start();
int keyPos = currentText.length();
if (keyMatcher.find(result.mConsumedLength))
keyPos = keyMatcher.start();
int oldQuotePos = currentText.length();
if (oldQuoteMatcher.find(result.mConsumedLength))
oldQuotePos = oldQuoteMatcher.start();
int textEndPos = Math.min(Math.min(tagPos, keyPos),oldQuotePos);
if (textEndPos > result.mConsumedLength)
{
TextElement newElement = new TextElement(TextElementType.PlainText);
newElement.mContent = currentText.substring(result.mConsumedLength, textEndPos);
newElement.mConsumedLength = textEndPos-result.mConsumedLength;
result.mChildren.add(newElement);
result.mConsumedLength += newElement.mConsumedLength;
}
if (textEndPos == currentText.length()) {
break;
}
if (textEndPos == tagPos) {
result.mConsumedLength += tagMatcher.group().length();
String t = tagMatcher.group(1);
String a = tagMatcher.group(2);
if (t.equals("/"+tag))
return result;
if (t.substring(0,1).equals("/")) {
TextElement newElement = new TextElement(TextElementType.Error);
newElement.mContent = tagMatcher.group();
newElement.mConsumedLength = newElement.mContent.length();
result.mChildren.add(newElement);
} else {
TextElement subElement = parseText(currentText.substring(tagMatcher.end()), t, a);
result.mChildren.add(subElement);
result.mConsumedLength += subElement.mConsumedLength;
}
} else if (textEndPos == keyPos) {
TextElement newElement = new TextElement(TextElementType.Key);
newElement.mContent = keyMatcher.group();
newElement.mConsumedLength = newElement.mContent.length();
result.mChildren.add(newElement);
result.mConsumedLength += newElement.mConsumedLength;
} else if (textEndPos == oldQuotePos) {
String author = oldQuoteMatcher.group(1);
result.mConsumedLength += oldQuoteMatcher.group().length();
Pattern endOfOldQuotePattern = Pattern.compile("^[^>]", Pattern.MULTILINE|Pattern.DOTALL);
Matcher endOfOldQuoteMatcher = endOfOldQuotePattern.matcher(currentText);
int endOfOldQuotePos = currentText.length();
if (endOfOldQuoteMatcher.find(result.mConsumedLength))
endOfOldQuotePos = endOfOldQuoteMatcher.start();
String quoted = currentText.substring(result.mConsumedLength, endOfOldQuotePos);
result.mConsumedLength += quoted.length();
Pattern quotePartPattern = Pattern.compile("^>\\s*", Pattern.MULTILINE|Pattern.DOTALL);
Matcher quotePartMatcher = quotePartPattern.matcher(quoted);
String unquoted = quotePartMatcher.replaceAll("");
TextElement subElement = parseText(unquoted, "quote", author);
result.mChildren.add(subElement);
}
}
return result;
}
| private final TextElement parseText(String currentText, String tag, String arg) {
TextElement result = new TextElement(tag);
if(result.mType == TextElementType.Quote)
result.mContent = arg;
if (currentText.length() > 0) {
if (currentText.substring(0,1).equals("\n")) {
result.mConsumedLength++;
}
}
Pattern tagPattern = Pattern.compile("\\[(.+?)(?:=\"?(.+?)\"?)?\\]", Pattern.MULTILINE|Pattern.DOTALL);
Matcher tagMatcher = tagPattern.matcher(currentText);
String keyRegex = "(CH|SS|US|KS)K@[%,~" + URLEncoder.getSafeURLCharacters() + "]+";
Pattern keyPattern = Pattern.compile(keyRegex, Pattern.MULTILINE|Pattern.DOTALL);
Matcher keyMatcher = keyPattern.matcher(currentText);
Pattern oldQuotePattern = Pattern.compile("^(\\S+@\\S+?.freetalk) wrote:\n", Pattern.MULTILINE|Pattern.DOTALL);
Matcher oldQuoteMatcher = oldQuotePattern.matcher(currentText);
while (result.mConsumedLength < currentText.length()) {
int tagPos = currentText.length();
if (tagMatcher.find(result.mConsumedLength))
tagPos = tagMatcher.start();
int keyPos = currentText.length();
if (keyMatcher.find(result.mConsumedLength))
keyPos = keyMatcher.start();
int oldQuotePos = currentText.length();
if (oldQuoteMatcher.find(result.mConsumedLength))
oldQuotePos = oldQuoteMatcher.start();
int textEndPos = Math.min(Math.min(tagPos, keyPos),oldQuotePos);
if (textEndPos > result.mConsumedLength)
{
TextElement newElement = new TextElement(TextElementType.PlainText);
newElement.mContent = currentText.substring(result.mConsumedLength, textEndPos);
newElement.mConsumedLength = textEndPos-result.mConsumedLength;
result.mChildren.add(newElement);
result.mConsumedLength += newElement.mConsumedLength;
}
if (textEndPos == currentText.length()) {
break;
}
if (textEndPos == tagPos) {
result.mConsumedLength += tagMatcher.group().length();
String t = tagMatcher.group(1);
String a = tagMatcher.group(2);
if (t.equals("/"+tag))
return result;
if (t.substring(0,1).equals("/")) {
TextElement newElement = new TextElement(TextElementType.Error);
newElement.mContent = tagMatcher.group();
newElement.mConsumedLength = newElement.mContent.length();
result.mChildren.add(newElement);
} else {
TextElement subElement = parseText(currentText.substring(tagMatcher.end()), t, a);
result.mChildren.add(subElement);
result.mConsumedLength += subElement.mConsumedLength;
}
} else if (textEndPos == keyPos) {
TextElement newElement = new TextElement(TextElementType.Key);
newElement.mContent = keyMatcher.group();
newElement.mConsumedLength = newElement.mContent.length();
result.mChildren.add(newElement);
result.mConsumedLength += newElement.mConsumedLength;
} else if (textEndPos == oldQuotePos) {
String author = oldQuoteMatcher.group(1);
result.mConsumedLength += oldQuoteMatcher.group().length();
Pattern endOfOldQuotePattern = Pattern.compile("^[^>]", Pattern.MULTILINE|Pattern.DOTALL);
Matcher endOfOldQuoteMatcher = endOfOldQuotePattern.matcher(currentText);
int endOfOldQuotePos = currentText.length();
if (endOfOldQuoteMatcher.find(result.mConsumedLength))
endOfOldQuotePos = endOfOldQuoteMatcher.start();
String quoted = currentText.substring(result.mConsumedLength, endOfOldQuotePos);
result.mConsumedLength += quoted.length();
Pattern quotePartPattern = Pattern.compile("^>\\s*", Pattern.MULTILINE|Pattern.DOTALL);
Matcher quotePartMatcher = quotePartPattern.matcher(quoted);
String unquoted = quotePartMatcher.replaceAll("");
TextElement subElement = parseText(unquoted, "quote", author);
result.mChildren.add(subElement);
}
}
return result;
}
|
public void testRegistration() {
Page page = tester.startPage(RegisterPage.class);
tester.assertRenderedPage(RegisterPage.class);
PortalSession.get().getRights().add(new Right("captcha.disabled"));
FormTester ft = tester.newFormTester("form");
ft.setValue("username", "peterpan");
ft.setValue("firstname", "mike");
ft.setValue("lastname", "jack");
ft.setValue("email", "[email protected]");
ft.setValue("birthday", "1981-10-13");
ft.setValue("password1", "testing");
ft.setValue("password2", "testing");
ft.setValue("termsOfUse", true);
tester.executeAjaxEvent("form:registerButton", "onclick");
tester.assertNoErrorMessage();
tester.assertRenderedPage(MessagePage.class);
tester.assertContains(page.getString("confirm.email"));
}
| public void testRegistration() {
Page page = tester.startPage(RegisterPage.class);
tester.assertRenderedPage(RegisterPage.class);
PortalSession.get().getRights().add(new Right("captcha.disabled"));
FormTester ft = tester.newFormTester("form");
ft.setValue("username", "peterpan123");
ft.setValue("firstname", "mike");
ft.setValue("lastname", "jack");
ft.setValue("email", "[email protected]");
ft.setValue("birthday", "1981-10-13");
ft.setValue("password1", "testing");
ft.setValue("password2", "testing");
ft.setValue("termsOfUse", true);
tester.executeAjaxEvent("form:registerButton", "onclick");
tester.assertNoErrorMessage();
tester.assertRenderedPage(MessagePage.class);
tester.assertContains(page.getString("confirm.email"));
}
|
public void draw(Canvas canvas) {
if (mViews != null) {
final int n = mViews.size();
for (int i = 0; i < mCurrent; i++) {
drawView(mViews.get(i), canvas);
}
for (int i = n - 1; i > mCurrent; i--) {
drawView(mViews.get(i), canvas);
}
drawView(mViews.get(mCurrent), canvas);
}
}
| public void draw(Canvas canvas) {
if ((mViews != null) && (mCurrent > -1)) {
final int n = mViews.size();
for (int i = 0; i < mCurrent; i++) {
drawView(mViews.get(i), canvas);
}
for (int i = n - 1; i > mCurrent; i--) {
drawView(mViews.get(i), canvas);
}
drawView(mViews.get(mCurrent), canvas);
}
}
|
public void init(FMLInitializationEvent event)
{
System.out.println("Initilizing Sustainable Resources Mod (SMR)");
System.out.println("You are using a pre-alpha build! And peter fails :P");
}
| public void init(FMLInitializationEvent event)
{
System.out.println("Initilizing Sustainable Resources Mod (SMR)");
System.out.println("You are using a pre-alpha build!");
}
|
public static void main (String [] args) {
assert args.length > 5;
int NUM_READERS = 5;
int NUM_WRITERS = 1;
final int N = Integer.parseInt(args[0]);
final int R = Integer.parseInt(args[1]);
int W = Integer.parseInt(args[2]);
int K = Integer.parseInt(args[3]);
assert K >= 1;
int ITERATIONS = Integer.parseInt(args[4]);
DelayModel delaymodel = null;
if(args[5].equals("FILE"))
{
String sendDelayFile = args[6];
String ackDelayFile = args[7];
delaymodel = new EmpiricalDelayModel(sendDelayFile, ackDelayFile);
}
else if(args[5].equals("PARETO"))
{
delaymodel = new ParetoDelayModel(Double.parseDouble(args[6]),
Double.parseDouble(args[7]),
Double.parseDouble(args[8]),
Double.parseDouble(args[9]));
}
else if(args[5].equals("MULTIDC"))
{
delaymodel = new MultiDCDelayModel(Double.parseDouble(args[6]),
Double.parseDouble(args[7]),
Double.parseDouble(args[8]),
Double.parseDouble(args[9]),
Double.parseDouble(args[10]),
N);
}
else if(args[5].equals("EXPONENTIAL"))
{
delaymodel = new ExponentialDelayModel(Double.parseDouble(args[6]),
Double.parseDouble(args[7]));
}
else
{
System.err.println(
"Usage: Simulator <N> <R> <W> <k> <iters> FILE <sendF> <ackF> OPT\n" +
"Usage: Simulator <N> <R> <W> <iters> PARETO <W-min> <W-alpha> <ARS-min> <ARS-alpha> OPT\n" +
"Usage: Simulator <N> <R> <W> <iters> EXPONENTIAL <W-lambda> <ARS-lambda> OPT\n +" +
"Usage: Simulator <N> <R> <W> <iters> MULTIDC <W-min> <W-alpha> <ARS-min> <ARS-alpha> <DC-delay> OPT\n +" +
"OPT= O <SWEEP|LATS>");
System.exit(1);
}
final DelayModel delay = delaymodel;
String optsinput = "";
for(int i = 0; i < args.length; ++i)
{
if(args[i].equals("O"))
{
optsinput = args[i+1];
assert optsinput.equals("SWEEP") || optsinput.equals("LATS");
break;
}
}
final String opts = optsinput;
final Vector<KVServer> replicas = new Vector<KVServer>();
for(int i = 0; i < N; ++i)
{
replicas.add(new KVServer());
}
Vector<Double> writelats = new Vector<Double>();
final ConcurrentLinkedQueue<Double> readlats = new ConcurrentLinkedQueue<Double>();
HashMap<Integer, Double> commitTimes = new HashMap<Integer, Double>();
Vector<WriteInstance> writes = new Vector<WriteInstance>();
final CommitTimes commits = new CommitTimes();
final ConcurrentLinkedQueue<ReadPlot> readPlotConcurrent = new ConcurrentLinkedQueue<ReadPlot>();
double ltime = 0;
double ftime = 1000;
for(int wid = 0; wid < NUM_WRITERS; wid++)
{
double time = 0;
for(int i = 0; i < ITERATIONS; ++i)
{
Vector<Double> oneways = new Vector<Double>();
Vector<Double> rtts = new Vector<Double>();
for(int w = 0; w < N; ++w)
{
double oneway = delay.getWriteSendDelay();
double ack = delay.getWriteAckDelay();
oneways.add(time + oneway);
rtts.add(oneway + ack);
}
Collections.sort(rtts);
double wlat = rtts.get(W-1);
if(opts.equals("LATS"))
{
writelats.add(wlat);
}
double committime = time+wlat;
writes.add(new WriteInstance(oneways, time, committime));
time = committime;
}
if(time > ltime)
ltime = time;
if(time < ftime)
ftime = time;
}
final double maxtime = ltime;
final double firsttime = ftime;
Collections.sort(writes);
for(int wno = 0; wno < writes.size(); ++wno)
{
WriteInstance curWrite = writes.get(wno);
for(int sno = 0; sno < N; ++sno)
{
replicas.get(sno).write(curWrite.getOneway().get(sno), wno);
}
commits.record(curWrite.getCommittime(), wno);
}
final CountDownLatch latch = new CountDownLatch(NUM_READERS);
for(int rid = 0; rid < NUM_READERS; ++rid)
{
Thread t = new Thread(new Runnable ()
{
public void run()
{
double time = firsttime*2;
while(time < maxtime)
{
Vector<ReadInstance> readRound = new Vector<ReadInstance>();
for(int sno = 0; sno < N; ++sno)
{
double onewaytime = delay.getReadSendDelay();
int version = replicas.get(sno).read(time+onewaytime);
double rtt = onewaytime+delay.getReadAckDelay();
readRound.add(new ReadInstance(version, rtt));
}
Collections.sort(readRound);
double endtime = readRound.get(R-1).getFinishtime();
if(opts.equals("LATS"))
{
readlats.add(endtime);
}
int maxversion = -1;
for(int rno = 0; rno < R; ++rno)
{
int readVersion = readRound.get(rno).getVersion();
if(readVersion > maxversion)
maxversion = readVersion;
}
readPlotConcurrent.add(new ReadPlot(
new ReadOutput(commits.last_committed_version(time), maxversion, time),
commits.get_commit_time(commits.last_committed_version(time))));
int staleness = maxversion-commits.last_committed_version(time);
time += endtime;
}
latch.countDown();
}
});
t.start();
}
try {
latch.await();
}
catch (Exception e)
{
System.out.println(e.getMessage());
}
if(opts.equals("SWEEP"))
{
Vector<ReadPlot> readPlots = new Vector<ReadPlot>(readPlotConcurrent);
Collections.sort(readPlots);
Collections.reverse(readPlots);
HashMap<Long, ReadPlot> manystalemap = new HashMap<Long, ReadPlot>();
long stale = 0;
for(ReadPlot r : readPlots)
{
if(r.getRead().getVersion_read() < r.getRead().getVersion_at_start()-K-1)
{
stale += 1;
manystalemap.put(stale, r);
}
}
for(double p = .9; p < 1; p += .001)
{
double tstale = 0;
long how_many_stale = (long)Math.ceil(readPlots.size()*p);
ReadPlot r = manystalemap.get(how_many_stale);
if(r == null)
tstale = 0;
else
tstale = r.getRead().getStart_time() - r.getCommit_time_at_start();
System.out.println(p+" "+tstale);
}
}
if(opts.equals("LATS"))
{
System.out.println("WRITE");
Collections.sort(writelats);
for(double p = 0; p < 1; p += .01)
{
System.out.printf("%f %f\n", p, writelats.get((int) Math.round(p * writelats.size())));
}
Vector<Double> readLatencies = new Vector<Double>(readlats);
System.out.println("READ");
Collections.sort(readLatencies);
for(double p = 0; p < 1; p += .01)
{
System.out.printf("%f %f\n", p, readLatencies.get((int)Math.round(p*readLatencies.size())));
}
}
}
| public static void main (String [] args) {
assert args.length > 5;
int NUM_READERS = 5;
int NUM_WRITERS = 1;
final int N = Integer.parseInt(args[0]);
final int R = Integer.parseInt(args[1]);
int W = Integer.parseInt(args[2]);
int K = Integer.parseInt(args[3]);
assert K >= 1;
int ITERATIONS = Integer.parseInt(args[4]);
DelayModel delaymodel = null;
if(args[5].equals("FILE"))
{
String sendDelayFile = args[6];
String ackDelayFile = args[7];
delaymodel = new EmpiricalDelayModel(sendDelayFile, ackDelayFile);
}
else if(args[5].equals("PARETO"))
{
delaymodel = new ParetoDelayModel(Double.parseDouble(args[6]),
Double.parseDouble(args[7]),
Double.parseDouble(args[8]),
Double.parseDouble(args[9]));
}
else if(args[5].equals("MULTIDC"))
{
delaymodel = new MultiDCDelayModel(Double.parseDouble(args[6]),
Double.parseDouble(args[7]),
Double.parseDouble(args[8]),
Double.parseDouble(args[9]),
Double.parseDouble(args[10]),
N);
}
else if(args[5].equals("EXPONENTIAL"))
{
delaymodel = new ExponentialDelayModel(Double.parseDouble(args[6]),
Double.parseDouble(args[7]));
}
else
{
System.err.println(
"Usage: Simulator <N> <R> <W> <k> <iters> FILE <sendF> <ackF> OPT\n" +
"Usage: Simulator <N> <R> <W> <iters> PARETO <W-min> <W-alpha> <ARS-min> <ARS-alpha> OPT\n" +
"Usage: Simulator <N> <R> <W> <iters> EXPONENTIAL <W-lambda> <ARS-lambda> OPT\n +" +
"Usage: Simulator <N> <R> <W> <iters> MULTIDC <W-min> <W-alpha> <ARS-min> <ARS-alpha> <DC-delay> OPT\n +" +
"OPT= O <SWEEP|LATS>");
System.exit(1);
}
final DelayModel delay = delaymodel;
String optsinput = "";
for(int i = 0; i < args.length; ++i)
{
if(args[i].equals("O"))
{
optsinput = args[i+1];
assert optsinput.equals("SWEEP") || optsinput.equals("LATS");
break;
}
}
final String opts = optsinput;
final Vector<KVServer> replicas = new Vector<KVServer>();
for(int i = 0; i < N; ++i)
{
replicas.add(new KVServer());
}
Vector<Double> writelats = new Vector<Double>();
final ConcurrentLinkedQueue<Double> readlats = new ConcurrentLinkedQueue<Double>();
HashMap<Integer, Double> commitTimes = new HashMap<Integer, Double>();
Vector<WriteInstance> writes = new Vector<WriteInstance>();
final CommitTimes commits = new CommitTimes();
final ConcurrentLinkedQueue<ReadPlot> readPlotConcurrent = new ConcurrentLinkedQueue<ReadPlot>();
double ltime = 0;
double ftime = 1000;
for(int wid = 0; wid < NUM_WRITERS; wid++)
{
double time = 0;
for(int i = 0; i < ITERATIONS; ++i)
{
Vector<Double> oneways = new Vector<Double>();
Vector<Double> rtts = new Vector<Double>();
for(int w = 0; w < N; ++w)
{
double oneway = delay.getWriteSendDelay();
double ack = delay.getWriteAckDelay();
oneways.add(time + oneway);
rtts.add(oneway + ack);
}
Collections.sort(rtts);
double wlat = rtts.get(W-1);
if(opts.equals("LATS"))
{
writelats.add(wlat);
}
double committime = time+wlat;
writes.add(new WriteInstance(oneways, time, committime));
time = committime;
}
if(time > ltime)
ltime = time;
if(time < ftime)
ftime = time;
}
final double maxtime = ltime;
final double firsttime = ftime;
Collections.sort(writes);
for(int wno = 0; wno < writes.size(); ++wno)
{
WriteInstance curWrite = writes.get(wno);
for(int sno = 0; sno < N; ++sno)
{
replicas.get(sno).write(curWrite.getOneway().get(sno), wno);
}
commits.record(curWrite.getCommittime(), wno);
}
final CountDownLatch latch = new CountDownLatch(NUM_READERS);
for(int rid = 0; rid < NUM_READERS; ++rid)
{
Thread t = new Thread(new Runnable ()
{
public void run()
{
double time = firsttime*2;
while(time < maxtime)
{
Vector<ReadInstance> readRound = new Vector<ReadInstance>();
for(int sno = 0; sno < N; ++sno)
{
double onewaytime = delay.getReadSendDelay();
int version = replicas.get(sno).read(time+onewaytime);
double rtt = onewaytime+delay.getReadAckDelay();
readRound.add(new ReadInstance(version, rtt));
}
Collections.sort(readRound);
double endtime = readRound.get(R-1).getFinishtime();
if(opts.equals("LATS"))
{
readlats.add(endtime);
}
int maxversion = -1;
for(int rno = 0; rno < R; ++rno)
{
int readVersion = readRound.get(rno).getVersion();
if(readVersion > maxversion)
maxversion = readVersion;
}
readPlotConcurrent.add(new ReadPlot(
new ReadOutput(commits.last_committed_version(time), maxversion, time),
commits.get_commit_time(commits.last_committed_version(time))));
int staleness = maxversion-commits.last_committed_version(time);
time += endtime;
}
latch.countDown();
}
});
t.start();
}
try {
latch.await();
}
catch (Exception e)
{
System.out.println(e.getMessage());
}
if(opts.equals("SWEEP"))
{
Vector<ReadPlot> readPlots = new Vector<ReadPlot>(readPlotConcurrent);
Collections.sort(readPlots);
Collections.reverse(readPlots);
HashMap<Long, ReadPlot> manystalemap = new HashMap<Long, ReadPlot>();
long stale = 0;
for(ReadPlot r : readPlots)
{
if(r.getRead().getVersion_read() < r.getRead().getVersion_at_start()-K-1)
{
stale += 1;
manystalemap.put(stale, r);
}
}
for(double p = .9; p < 1; p += .001)
{
double tstale = 0;
long how_many_stale = (long)Math.ceil(readPlots.size()*(1-p));
ReadPlot r = manystalemap.get(how_many_stale);
if(r == null)
tstale = 0;
else
tstale = r.getRead().getStart_time() - r.getCommit_time_at_start();
System.out.println(p+" "+tstale);
}
}
if(opts.equals("LATS"))
{
System.out.println("WRITE");
Collections.sort(writelats);
for(double p = 0; p < 1; p += .01)
{
System.out.printf("%f %f\n", p, writelats.get((int) Math.round(p * writelats.size())));
}
Vector<Double> readLatencies = new Vector<Double>(readlats);
System.out.println("READ");
Collections.sort(readLatencies);
for(double p = 0; p < 1; p += .01)
{
System.out.printf("%f %f\n", p, readLatencies.get((int)Math.round(p*readLatencies.size())));
}
}
}
|
public void execute(final ScheduledJob scheduledJob) {
final SystemHelper systemHelper = SingletonS2Container
.getComponent(SystemHelper.class);
final JobLog jobLog = new JobLog(scheduledJob);
final String scriptType = scheduledJob.getScriptType();
final String script = scheduledJob.getScriptData();
final Long id = scheduledJob.getId();
final String jobId = Constants.JOB_ID_PREFIX + id;
final JobExecutor jobExecutor = SingletonS2Container
.getComponent(scriptType + JOB_EXECUTOR_SUFFIX);
if (jobExecutor == null) {
throw new ScheduledJobException("No jobExecutor: " + scriptType
+ JOB_EXECUTOR_SUFFIX);
}
if (systemHelper.startJobExecutoer(id, jobExecutor) != null) {
if (logger.isDebugEnabled()) {
logger.debug(jobId + " is running.");
}
return;
}
try {
if (scheduledJob.isLoggingEnabled()) {
storeJobLog(jobLog);
}
if (logger.isDebugEnabled()) {
logger.debug("Starting Job " + jobId + ". scriptType: "
+ scriptType + ", script: " + script);
} else if (logger.isInfoEnabled()) {
logger.info("Starting Job " + jobId + ".");
}
final Object ret = jobExecutor.execute(script);
if (ret == null) {
logger.info("Finished Job " + jobId + ".");
} else {
logger.info("Finished Job " + jobId
+ ". The return value is:\n" + ret);
jobLog.setScriptResult(ret.toString());
}
jobLog.setJobStatus(Constants.OK);
} catch (final Throwable e) {
logger.error("Failed to execute " + jobId + ": " + script, e);
jobLog.setJobStatus(Constants.FAIL);
jobLog.setScriptResult(systemHelper.abbreviateLongText(e
.getLocalizedMessage()));
} finally {
systemHelper.finishJobExecutoer(id);
jobLog.setEndTime(new Timestamp(System.currentTimeMillis()));
if (logger.isDebugEnabled()) {
logger.debug("jobLog: " + jobLog);
}
if (scheduledJob.isLoggingEnabled()) {
storeJobLog(jobLog);
}
}
}
| public void execute(final ScheduledJob scheduledJob) {
final SystemHelper systemHelper = SingletonS2Container
.getComponent(SystemHelper.class);
final JobLog jobLog = new JobLog(scheduledJob);
final String scriptType = scheduledJob.getScriptType();
final String script = scheduledJob.getScriptData();
final Long id = scheduledJob.getId();
final String jobId = Constants.JOB_ID_PREFIX + id;
final JobExecutor jobExecutor = SingletonS2Container
.getComponent(scriptType + JOB_EXECUTOR_SUFFIX);
if (jobExecutor == null) {
throw new ScheduledJobException("No jobExecutor: " + scriptType
+ JOB_EXECUTOR_SUFFIX);
}
if (systemHelper.startJobExecutoer(id, jobExecutor) != null) {
if (logger.isDebugEnabled()) {
logger.debug(jobId + " is running.");
}
return;
}
try {
if (scheduledJob.isLoggingEnabled()) {
storeJobLog(jobLog);
}
if (logger.isDebugEnabled()) {
logger.debug("Starting Job " + jobId + ". scriptType: "
+ scriptType + ", script: " + script);
} else if (scheduledJob.isLoggingEnabled()
&& logger.isInfoEnabled()) {
logger.info("Starting Job " + jobId + ".");
}
final Object ret = jobExecutor.execute(script);
if (ret == null) {
if (scheduledJob.isLoggingEnabled() && logger.isInfoEnabled()) {
logger.info("Finished Job " + jobId + ".");
}
} else {
if (scheduledJob.isLoggingEnabled() && logger.isInfoEnabled()) {
logger.info("Finished Job " + jobId
+ ". The return value is:\n" + ret);
}
jobLog.setScriptResult(ret.toString());
}
jobLog.setJobStatus(Constants.OK);
} catch (final Throwable e) {
logger.error("Failed to execute " + jobId + ": " + script, e);
jobLog.setJobStatus(Constants.FAIL);
jobLog.setScriptResult(systemHelper.abbreviateLongText(e
.getLocalizedMessage()));
} finally {
systemHelper.finishJobExecutoer(id);
jobLog.setEndTime(new Timestamp(System.currentTimeMillis()));
if (logger.isDebugEnabled()) {
logger.debug("jobLog: " + jobLog);
}
if (scheduledJob.isLoggingEnabled()) {
storeJobLog(jobLog);
}
}
}
|
public static void init() {
oi = new OI();
SmartDashboard.putData(driveTrain);
SmartDashboard.putData(shooter);
SmartDashboard.putdata(feeder);
}
| public static void init() {
oi = new OI();
SmartDashboard.putData(driveTrain);
SmartDashboard.putData(shooter);
SmartDashboard.putData(feeder);
}
|
protected boolean processCharacters( HWPFDocumentCore document,
int currentTableLevel, Range range, final Element block )
{
if ( range == null )
return false;
boolean haveAnyText = false;
if ( document instanceof HWPFDocument )
{
final HWPFDocument doc = (HWPFDocument) document;
Map<Integer, List<Bookmark>> rangeBookmarks = doc.getBookmarks()
.getBookmarksStartedBetween( range.getStartOffset(),
range.getEndOffset() );
if ( rangeBookmarks != null && !rangeBookmarks.isEmpty() )
{
boolean processedAny = processRangeBookmarks( doc,
currentTableLevel, range, block, rangeBookmarks );
if ( processedAny )
return true;
}
}
for ( int c = 0; c < range.numCharacterRuns(); c++ )
{
CharacterRun characterRun = range.getCharacterRun( c );
if ( characterRun == null )
throw new AssertionError();
if ( document instanceof HWPFDocument
&& ( (HWPFDocument) document ).getPicturesTable()
.hasPicture( characterRun ) )
{
HWPFDocument newFormat = (HWPFDocument) document;
Picture picture = newFormat.getPicturesTable().extractPicture(
characterRun, true );
processImage( block, characterRun.text().charAt( 0 ) == 0x01,
picture );
continue;
}
String text = characterRun.text();
if ( text.getBytes().length == 0 )
continue;
if ( characterRun.isSpecialCharacter() )
{
if ( text.charAt( 0 ) == SPECCHAR_AUTONUMBERED_FOOTNOTE_REFERENCE
&& ( document instanceof HWPFDocument ) )
{
HWPFDocument doc = (HWPFDocument) document;
processNoteAnchor( doc, characterRun, block );
continue;
}
}
if ( text.getBytes()[0] == FIELD_BEGIN_MARK )
{
if ( document instanceof HWPFDocument )
{
Field aliveField = ( (HWPFDocument) document )
.getFieldsTables().lookupFieldByStartOffset(
FieldsDocumentPart.MAIN,
characterRun.getStartOffset() );
if ( aliveField != null )
{
processField( ( (HWPFDocument) document ), range,
currentTableLevel, aliveField, block );
int continueAfter = aliveField.getFieldEndOffset();
while ( c < range.numCharacterRuns()
&& range.getCharacterRun( c ).getEndOffset() <= continueAfter )
c++;
if ( c < range.numCharacterRuns() )
c--;
continue;
}
}
int skipTo = tryDeadField( document, range, currentTableLevel,
c, block );
if ( skipTo != c )
{
c = skipTo;
continue;
}
continue;
}
if ( text.getBytes()[0] == FIELD_SEPARATOR_MARK )
{
continue;
}
if ( text.getBytes()[0] == FIELD_END_MARK )
{
continue;
}
if ( characterRun.isSpecialCharacter() || characterRun.isObj()
|| characterRun.isOle2() )
{
continue;
}
if ( text.endsWith( "\r" )
|| ( text.charAt( text.length() - 1 ) == BEL_MARK && currentTableLevel != Integer.MIN_VALUE ) )
text = text.substring( 0, text.length() - 1 );
{
StringBuilder stringBuilder = new StringBuilder();
for ( char charChar : text.toCharArray() )
{
if ( charChar == 11 )
{
if ( stringBuilder.length() > 0 )
{
outputCharacters( block, characterRun,
stringBuilder.toString() );
stringBuilder.setLength( 0 );
}
processLineBreak( block, characterRun );
}
else if ( charChar == 30 )
{
stringBuilder.append( UNICODECHAR_NONBREAKING_HYPHEN );
}
else if ( charChar == 31 )
{
stringBuilder.append( UNICODECHAR_ZERO_WIDTH_SPACE );
}
else if ( charChar > 0x20 || charChar == 0x09
|| charChar == 0x0A || charChar == 0x0D )
{
stringBuilder.append( charChar );
}
}
if ( stringBuilder.length() > 0 )
{
outputCharacters( block, characterRun,
stringBuilder.toString() );
stringBuilder.setLength( 0 );
}
}
haveAnyText |= text.trim().length() != 0;
}
return haveAnyText;
}
| protected boolean processCharacters( HWPFDocumentCore document,
int currentTableLevel, Range range, final Element block )
{
if ( range == null )
return false;
boolean haveAnyText = false;
if ( document instanceof HWPFDocument )
{
final HWPFDocument doc = (HWPFDocument) document;
Map<Integer, List<Bookmark>> rangeBookmarks = doc.getBookmarks()
.getBookmarksStartedBetween( range.getStartOffset(),
range.getEndOffset() );
if ( rangeBookmarks != null && !rangeBookmarks.isEmpty() )
{
boolean processedAny = processRangeBookmarks( doc,
currentTableLevel, range, block, rangeBookmarks );
if ( processedAny )
return true;
}
}
for ( int c = 0; c < range.numCharacterRuns(); c++ )
{
CharacterRun characterRun = range.getCharacterRun( c );
if ( characterRun == null )
throw new AssertionError();
if ( document instanceof HWPFDocument
&& ( (HWPFDocument) document ).getPicturesTable()
.hasPicture( characterRun ) )
{
HWPFDocument newFormat = (HWPFDocument) document;
Picture picture = newFormat.getPicturesTable().extractPicture(
characterRun, true );
processImage( block, characterRun.text().charAt( 0 ) == 0x01,
picture );
continue;
}
String text = characterRun.text();
if ( text.getBytes().length == 0 )
continue;
if ( characterRun.isSpecialCharacter() )
{
if ( text.charAt( 0 ) == SPECCHAR_AUTONUMBERED_FOOTNOTE_REFERENCE
&& ( document instanceof HWPFDocument ) )
{
HWPFDocument doc = (HWPFDocument) document;
processNoteAnchor( doc, characterRun, block );
continue;
}
}
if ( text.getBytes()[0] == FIELD_BEGIN_MARK )
{
if ( document instanceof HWPFDocument )
{
Field aliveField = ( (HWPFDocument) document )
.getFieldsTables().lookupFieldByStartOffset(
FieldsDocumentPart.MAIN,
characterRun.getStartOffset() );
if ( aliveField != null )
{
processField( ( (HWPFDocument) document ), range,
currentTableLevel, aliveField, block );
int continueAfter = aliveField.getFieldEndOffset();
while ( c < range.numCharacterRuns()
&& range.getCharacterRun( c ).getEndOffset() <= continueAfter )
c++;
if ( c < range.numCharacterRuns() )
c--;
continue;
}
}
int skipTo = tryDeadField( document, range, currentTableLevel,
c, block );
if ( skipTo != c )
{
c = skipTo;
continue;
}
continue;
}
if ( text.getBytes()[0] == FIELD_SEPARATOR_MARK )
{
continue;
}
if ( text.getBytes()[0] == FIELD_END_MARK )
{
continue;
}
if ( characterRun.isSpecialCharacter() || characterRun.isObj()
|| characterRun.isOle2() )
{
continue;
}
if ( text.endsWith( "\r" )
|| ( text.charAt( text.length() - 1 ) == BEL_MARK && currentTableLevel != Integer.MIN_VALUE ) )
text = text.substring( 0, text.length() - 1 );
{
StringBuilder stringBuilder = new StringBuilder();
for ( char charChar : text.toCharArray() )
{
if ( charChar == 11 )
{
if ( stringBuilder.length() > 0 )
{
outputCharacters( block, characterRun,
stringBuilder.toString() );
stringBuilder.setLength( 0 );
}
processLineBreak( block, characterRun );
}
else if ( charChar == 30 )
{
stringBuilder.append( UNICODECHAR_NONBREAKING_HYPHEN );
}
else if ( charChar == 31 )
{
stringBuilder.append( UNICODECHAR_ZERO_WIDTH_SPACE );
}
else if ( charChar >= 0x20 || charChar == 0x09
|| charChar == 0x0A || charChar == 0x0D )
{
stringBuilder.append( charChar );
}
}
if ( stringBuilder.length() > 0 )
{
outputCharacters( block, characterRun,
stringBuilder.toString() );
stringBuilder.setLength( 0 );
}
}
haveAnyText |= text.trim().length() != 0;
}
return haveAnyText;
}
|
public String getSelector() {
buildEngineMap();
if (_engines.isEmpty())
return "<b>No search engines specified</b>";
String dflt = _context.getProperty(PROP_DEFAULT);
if (dflt == null || !_engines.containsKey(dflt)) {
int idx = _context.random().nextInt(_engines.size());
int i = 0;
for (String name : _engines.keySet()) {
dflt = name;
if (i++ >= idx) {
_context.router().saveConfig(PROP_DEFAULT, dflt);
break;
}
}
}
StringBuilder buf = new StringBuilder(1024);
buf.append("<select name=\"engine\">");
for (String name : _engines.keySet()) {
buf.append("<option value=\"").append(name).append('\"');
if (name.equals(dflt))
buf.append(" selected=\"true\"");
buf.append('>').append(name).append("</option>\n");
}
buf.append("</select>\n");
return buf.toString();
}
| public String getSelector() {
buildEngineMap();
if (_engines.isEmpty())
return "<b>No search engines specified</b>";
String dflt = _context.getProperty(PROP_DEFAULT);
if (dflt == null || !_engines.containsKey(dflt)) {
int idx = _context.random().nextInt(_engines.size());
int i = 0;
for (String name : _engines.keySet()) {
dflt = name;
if (i++ >= idx) {
_context.router().saveConfig(PROP_DEFAULT, dflt);
break;
}
}
}
StringBuilder buf = new StringBuilder(1024);
buf.append("<select name=\"engine\">");
for (String name : _engines.keySet()) {
buf.append("<option value=\"").append(name).append('\"');
if (name.equals(dflt))
buf.append(" selected=\"selected\"");
buf.append('>').append(name).append("</option>\n");
}
buf.append("</select>\n");
return buf.toString();
}
|
public void save(){
Iterator<SaveCommand> siter = saveCommands.iterator();
int previousCommand = -1;
int count = 0;
while(siter.hasNext()){
this.progress = (int)((double)count / (double)this.saveCommands.size() * 100);
this.mapDel.setProgressBarValue(this.progress, "Saving Map");
count++;
SaveCommand tempCo = siter.next();
if(tempCo.getCommand() == SaveCommand.COPY_COMMAND){
this.saveCurrentChunks();
this.mapChunksE = null;
try {
MapChunkExtended copyFrom = new MapChunkExtended(tempCo.getChunkA());
MapChunkExtended copyTo = new MapChunkExtended(tempCo.getChunkB());
copyTo.copy(copyFrom);
copyTo.save();
} catch (IOException e) {
e.printStackTrace();
}
}
if(tempCo.getCommand() == SaveCommand.DELETE_COMMAND){
System.out.println("Delete Command");
this.deleteCommands.add(tempCo);
}
if(tempCo.getCommand() != SaveCommand.ADD_BLOCKS_COMMAND ||
tempCo.getCommand() != SaveCommand.CHANGE_HEIGHT_COMMAND){
continue;
}
if(this.mapChunksE == null){
this.mapChunksE = new HashMap<String, LinkedList<SaveCommand>>();
}
if(!this.mapChunksE.containsKey(tempCo.getChunkA())){
LinkedList<SaveCommand> tempList = new LinkedList<SaveCommand>();
tempList.add(tempCo);
this.mapChunksE.put(tempCo.getChunkA(), tempList);
}
else{
this.mapChunksE.get(tempCo.getChunkA()).add(tempCo);
}
}
this.saveCurrentChunks();
this.delete();
this.mapDel.progressBarComplete("Finished Saving");
}
| public void save(){
Iterator<SaveCommand> siter = saveCommands.iterator();
int previousCommand = -1;
int count = 0;
while(siter.hasNext()){
this.progress = (int)((double)count / (double)this.saveCommands.size() * 100);
this.mapDel.setProgressBarValue(this.progress, "Saving Map");
count++;
SaveCommand tempCo = siter.next();
if(tempCo.getCommand() == SaveCommand.COPY_COMMAND){
this.saveCurrentChunks();
this.mapChunksE = null;
try {
MapChunkExtended copyFrom = new MapChunkExtended(tempCo.getChunkA());
MapChunkExtended copyTo = new MapChunkExtended(tempCo.getChunkB());
copyTo.copy(copyFrom);
copyTo.save();
} catch (IOException e) {
e.printStackTrace();
}
}
if(tempCo.getCommand() == SaveCommand.DELETE_COMMAND){
System.out.println("Delete Command");
this.deleteCommands.add(tempCo);
}
if(tempCo.getCommand() != SaveCommand.ADD_BLOCKS_COMMAND &&
tempCo.getCommand() != SaveCommand.CHANGE_HEIGHT_COMMAND){
continue;
}
if(this.mapChunksE == null){
this.mapChunksE = new HashMap<String, LinkedList<SaveCommand>>();
}
if(!this.mapChunksE.containsKey(tempCo.getChunkA())){
LinkedList<SaveCommand> tempList = new LinkedList<SaveCommand>();
tempList.add(tempCo);
this.mapChunksE.put(tempCo.getChunkA(), tempList);
} else {
this.mapChunksE.get(tempCo.getChunkA()).add(tempCo);
}
}
this.saveCurrentChunks();
this.delete();
this.mapDel.progressBarComplete("Finished Saving");
}
|
public SessionProvider(
Registry registry,
MBeanService mBeanService,
@SessionCache Cache<?, ?> cache,
@BackgroundScheduler ScheduledExecutorService scheduler,
@Named(IpcSessionConfig.EXPIRATION_TIME) long time,
@Named(IpcSessionConfig.EXPIRATION_TIME_UNIT) TimeUnit timeUnit) {
this.registry = Preconditions.checkNotNull(registry, "Registry");
this.mBeanService = Preconditions.checkNotNull(mBeanService, "MBeanService");
this.cache = (Cache<Session.Key, IpcSession>) Preconditions.checkNotNull(cache, "Cache");
this.scheduler = Preconditions.checkNotNull(scheduler, "Scheduler");
this.expirationTime = time;
this.expirationTimeUnit = Preconditions.checkNotNull(timeUnit, "TimeUnit");
}
| public SessionProvider(
Registry registry,
MBeanService mBeanService,
@SuppressWarnings("rawtypes") @SessionCache Cache cache,
@BackgroundScheduler ScheduledExecutorService scheduler,
@Named(IpcSessionConfig.EXPIRATION_TIME) long time,
@Named(IpcSessionConfig.EXPIRATION_TIME_UNIT) TimeUnit timeUnit) {
this.registry = Preconditions.checkNotNull(registry, "Registry");
this.mBeanService = Preconditions.checkNotNull(mBeanService, "MBeanService");
this.cache = (Cache<Session.Key, IpcSession>) Preconditions.checkNotNull(cache, "Cache");
this.scheduler = Preconditions.checkNotNull(scheduler, "Scheduler");
this.expirationTime = time;
this.expirationTimeUnit = Preconditions.checkNotNull(timeUnit, "TimeUnit");
}
|
private synchronized void broadcastTags(Intent intent) {
TagCache cache = app.getTagCache();
synchronized(cache) {
Integer currentNestId = Integer.valueOf(intent.getIntExtra(BUNDLE_NEST_ID, -1));
List<String> out = new ArrayList<String>();
Set<String> lt = cache.getLocalTags(currentNestId);
if(lt != null) {
out.addAll(lt);
}
String[] rt = cache.getRemoteTags(currentNestId);
if(rt != null) {
for(String tag : rt) {
out.add(tag);
}
}
Intent broadcastIntent = new Intent(ACTION_AUTOCOMPLETE_TAGS);
broadcastIntent.putExtra(BUNDLE_NEST_ID, currentNestId);
broadcastIntent.putExtra(BUNDLE_TAG_LIST, out.toArray(new String[out.size()]));
mLocalBroadcastManager.sendBroadcast(broadcastIntent);
broadcastIntent.putExtra(BUNDLE_NEST_ID, currentNestId);
broadcastIntent = new Intent(ACTION_LAST_USED_TAGS);
String[] tags = cache.getLastUsedTags(currentNestId);
if(tags == null) {
tags = new String[0];
}
broadcastIntent.putExtra(BUNDLE_TAG_LIST, tags);
mLocalBroadcastManager.sendBroadcast(broadcastIntent);
}
}
| private synchronized void broadcastTags(Intent intent) {
TagCache cache = app.getTagCache();
synchronized(cache) {
Integer currentNestId = Integer.valueOf(intent.getIntExtra(BUNDLE_NEST_ID, -1));
Set<String> out;
Set<String> lt = cache.getLocalTags(currentNestId);
if(lt != null) {
out = new HashSet<String>(lt);
} else {
out = new HashSet<String>();
}
String[] rt = cache.getRemoteTags(currentNestId);
if(rt != null) {
for(String tag : rt) {
out.add(tag);
}
}
Intent broadcastIntent = new Intent(ACTION_AUTOCOMPLETE_TAGS);
broadcastIntent.putExtra(BUNDLE_NEST_ID, currentNestId);
broadcastIntent.putExtra(BUNDLE_TAG_LIST, out.toArray(new String[out.size()]));
mLocalBroadcastManager.sendBroadcast(broadcastIntent);
broadcastIntent.putExtra(BUNDLE_NEST_ID, currentNestId);
broadcastIntent = new Intent(ACTION_LAST_USED_TAGS);
String[] tags = cache.getLastUsedTags(currentNestId);
if(tags == null) {
tags = new String[0];
}
broadcastIntent.putExtra(BUNDLE_TAG_LIST, tags);
mLocalBroadcastManager.sendBroadcast(broadcastIntent);
}
}
|
protected void onHandleIntent(Intent intent) {
long now = java.lang.System.currentTimeMillis();
SharedPreferences settings=PreferenceManager.getDefaultSharedPreferences(this);
long last = settings.getLong("lastDataUpdate", 0);
boolean updateNeeded = false;
if (last == 0) {
updateNeeded = true;
Log.d("UPDATE","Yes, never updated before");
} else if (now > last) {
Log.d("UPDATEDATENOW",Long.toString(now));
Log.d("UPDATEDATELAST",Long.toString(last));
Log.d("UPDATEDATEMINUS",Long.toString(now - last));
ConnectivityManager connManager = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);
NetworkInfo mWifi = connManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
long interval;
if (mWifi.isConnected()) {
Log.d("UPDATE","WiFi Connected so 1 week");
interval = 1000*60*60*24*7;
} else {
Log.d("UPDATE","No WiFi so 1 month");
interval = 1000*60*60*24*7;
}
if ((now - last) > interval) {
updateNeeded = true;
Log.d("UPDATE","Yes, to old");
}
} else {
updateNeeded = true;
Log.d("UPDATE","Yes, clock has run backwards");
}
if (updateNeeded) {
startService(new Intent(this, LoadDataService.class));
}
}
| protected void onHandleIntent(Intent intent) {
long now = java.lang.System.currentTimeMillis();
SharedPreferences settings=PreferenceManager.getDefaultSharedPreferences(this);
long last = settings.getLong("lastDataUpdate", 0);
boolean updateNeeded = false;
if (last == 0) {
updateNeeded = true;
Log.d("UPDATE","Yes, never updated before");
} else if (now > last) {
Log.d("UPDATEDATENOW",Long.toString(now));
Log.d("UPDATEDATELAST",Long.toString(last));
Log.d("UPDATEDATEMINUS",Long.toString(now - last));
ConnectivityManager connManager = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);
NetworkInfo mWifi = connManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
long interval;
if (mWifi.isConnected()) {
Log.d("UPDATE","WiFi Connected so 1 week");
interval = 1000*60*60*24*7;
} else {
Log.d("UPDATE","No WiFi so 1 month");
interval = 1000*60*60*24*30;
}
if ((now - last) > interval) {
updateNeeded = true;
Log.d("UPDATE","Yes, to old");
}
} else {
updateNeeded = true;
Log.d("UPDATE","Yes, clock has run backwards");
}
if (updateNeeded) {
startService(new Intent(this, LoadDataService.class));
}
}
|
public static int processSum(ResultSet result, int sample_size, int db_size) throws SQLException {
HashMap<Integer, Integer> frequencies = new HashMap<Integer, Integer>();
Integer k;
Integer v;
int sum = 0;
int s = 0;
while (result.next()) {
k = new Integer(result.getInt("value"));
if (frequencies.containsKey(k)) {
v = frequencies.get(k);
frequencies.put(k, new Integer(++v));
} else
frequencies.put(k, new Integer(1));
s++;
}
System.out.println(s);
Iterator<Map.Entry<Integer, Integer>> it = frequencies.entrySet().iterator();
while (it.hasNext()) {
Entry<Integer, Integer> entry = (Entry<Integer, Integer>) it.next();
sum += entry.getKey() * (entry.getValue() / (double)sample_size) * db_size;
}
return sum;
}
| public static long processSum(ResultSet result, int sample_size, int db_size) throws SQLException {
HashMap<Integer, Integer> frequencies = new HashMap<Integer, Integer>();
Integer k;
Integer v;
long sum = 0;
int s = 0;
while (result.next()) {
k = new Integer(result.getInt("value"));
if (frequencies.containsKey(k)) {
v = frequencies.get(k);
frequencies.put(k, new Integer(++v));
} else
frequencies.put(k, new Integer(1));
s++;
}
System.out.println(s);
Iterator<Map.Entry<Integer, Integer>> it = frequencies.entrySet().iterator();
while (it.hasNext()) {
Entry<Integer, Integer> entry = (Entry<Integer, Integer>) it.next();
sum += entry.getKey() * (entry.getValue() / (double)sample_size) * db_size;
}
return sum;
}
|
public User(String email_, String password_, String firstname_, String lastname_, String question_, String answer_)
{
this.email_ = email_;
this.password_ = password_;
this.firstname_ = firstname_;
this.lastname_ = lastname_;
this.question_ = question_;
this.answer_ = answer_;
if (User.count() == 0)
{
this.admin_ = true;
}
else
{
this.admin_ = true;
}
}
| public User(String email_, String password_, String firstname_, String lastname_, String question_, String answer_)
{
this.email_ = email_;
this.password_ = password_;
this.firstname_ = firstname_;
this.lastname_ = lastname_;
this.question_ = question_;
this.answer_ = answer_;
if (User.count() == 0)
{
this.admin_ = true;
}
else
{
this.admin_ = false;
}
}
|
public void completeJoblet(int jobletId, JobletResult result,
String logMessage) throws TransportException, InvalidApiKey,
InvalidJobletId {
log.trace("completeJoblet()");
Joblet joblet = readJoblet(jobletId);
joblet.setStatus(result.getStatus());
dao.update(joblet);
result.setJoblet(joblet);
result.setTimeCreated(System.currentTimeMillis());
dao.create(result);
if ((logMessage != null) && (logMessage.length() > 0)) {
JobletLogEntry log = new JobletLogEntry(0, joblet, logMessage);
dao.create(log);
}
Criteria crit = queryDAO.createCriteria(Joblet.class);
crit.add(Restrictions.eq("jobId", joblet.getJobId()));
crit.add(Restrictions.or(
Restrictions.eq("status", JOB_STATUS.RECEIVED), Restrictions
.or(Restrictions.eq("status", JOB_STATUS.QUEUED),
Restrictions
.eq("status", JOB_STATUS.PROCESSING))));
crit.setProjection(Projections.rowCount());
int active = ((Integer) crit.list().get(0)).intValue();
if (active == 0) {
Query query = queryDAO
.createQuery("update Joblet set status = ? where (jobId = ? and status = ?)");
query.setInteger(0, JOB_STATUS.RECEIVED);
query.setInteger(1, joblet.getJobId());
query.setInteger(2, JOB_STATUS.SAVED);
active = query.executeUpdate();
}
if (active == 0) {
Job job = (Job) dao.read(Job.class, joblet.getJobId());
Criteria failures = queryDAO.createCriteria(Joblet.class);
failures.add(Restrictions.eq("jobId", job.getId()));
failures.add(Restrictions.eq("status", JOB_STATUS.FAILED));
failures.setProjection(Projections.rowCount());
int failureCount = ((Integer) failures.list().get(0)).intValue();
int jobStatus = (failureCount == 0) ? JOB_STATUS.COMPLETED
: JOB_STATUS.FAILED;
job.setStatus(jobStatus);
job = (Job) dao.update(job);
if ((job.getCallbackType() != 0)
&& (job.getCallbackType() != JOB_CALLBACK_TYPES.NONE)) {
Map<String, String> params = new HashMap<String, String>();
params.put("jobId", Integer.toString(job.getId()));
params.put("jobStatus", jobStatusTypes[jobStatus]);
params.put("callbackType", ApiCallbackTypes
.getStringCallbackType(job.getCallbackType()));
params.put("callbackAddress", job.getCallbackAddress());
Joblet callback = new Joblet(0, System.currentTimeMillis(), 0,
0, job.getSubmitter(), 2, Constants.CALLBACK_JOBLET,
"Callback for job # ", params, null,
JOB_STATUS.RECEIVED);
try {
self.submitJoblet(callback, 0, JOB_CALLBACK_TYPES.NONE,
null, null);
} catch (InvalidJobId e) {
log.error("InvalidJobId called while submitting callback!",
e);
}
}
}
}
| public void completeJoblet(int jobletId, JobletResult result,
String logMessage) throws TransportException, InvalidApiKey,
InvalidJobletId {
log.trace("completeJoblet()");
Joblet joblet = readJoblet(jobletId);
joblet.setStatus(result.getStatus());
dao.update(joblet);
result.setJoblet(joblet);
result.setTimeCreated(System.currentTimeMillis());
dao.create(result);
if ((logMessage != null) && (logMessage.length() > 0)) {
JobletLogEntry log = new JobletLogEntry(0, joblet, logMessage);
dao.create(log);
}
Criteria crit = queryDAO.createCriteria(Joblet.class);
crit.add(Restrictions.eq("jobId", joblet.getJobId()));
crit.add(Restrictions.or(
Restrictions.eq("status", JOB_STATUS.RECEIVED), Restrictions
.or(Restrictions.eq("status", JOB_STATUS.QUEUED),
Restrictions
.eq("status", JOB_STATUS.PROCESSING))));
crit.setProjection(Projections.rowCount());
int active = ((Integer) crit.list().get(0)).intValue();
if (active == 0) {
Query query = queryDAO
.createQuery("update Joblet set status = ? where (jobId = ? and status = ?)");
query.setInteger(0, JOB_STATUS.RECEIVED);
query.setInteger(1, joblet.getJobId());
query.setInteger(2, JOB_STATUS.SAVED);
active = query.executeUpdate();
}
if (active == 0) {
Job job = (Job) dao.read(Job.class, joblet.getJobId());
Criteria failures = queryDAO.createCriteria(Joblet.class);
failures.add(Restrictions.eq("jobId", job.getId()));
failures.add(Restrictions.eq("status", JOB_STATUS.FAILED));
failures.setProjection(Projections.rowCount());
int failureCount = ((Integer) failures.list().get(0)).intValue();
int jobStatus = (failureCount == 0) ? JOB_STATUS.COMPLETED
: JOB_STATUS.FAILED;
job.setStatus(jobStatus);
job = (Job) dao.update(job);
if ((job.getCallbackType() != 0)
&& (job.getCallbackType() != JOB_CALLBACK_TYPES.NONE)) {
Map<String, String> params = new HashMap<String, String>();
params.put("jobId", Integer.toString(job.getId()));
params.put("jobStatus", jobStatusTypes[jobStatus]);
params.put("callbackType", ApiCallbackTypes
.getStringCallbackType(job.getCallbackType()));
params.put("callbackAddress", job.getCallbackAddress());
Joblet callback = new Joblet(0, System.currentTimeMillis(), 0,
0, job.getSubmitter(), 2, Constants.CALLBACK_JOBLET,
"Callback for job # ", params, job.getCallbackContent(),
JOB_STATUS.RECEIVED);
try {
self.submitJoblet(callback, 0, JOB_CALLBACK_TYPES.NONE,
null, null);
} catch (InvalidJobId e) {
log.error("InvalidJobId called while submitting callback!",
e);
}
}
}
}
|
public void shouldGetListOfUserSupportedProgramsForAFacilityForGivenRights() {
Program program = new Program();
List<Program> programs = new ArrayList<>(Arrays.asList(program));
Long facilityId = 12345L;
when(programService.getProgramsSupportedByUserHomeFacilityWithRights(facilityId, USER_ID, VIEW_REQUISITION)).thenReturn(programs);
assertEquals(programs, controller.getProgramsToViewRequisitions(facilityId, httpServletRequest));
}
| public void shouldGetListOfUserSupportedProgramsForAFacilityForGivenRights() {
Program program = new Program();
List<Program> programs = new ArrayList<>(Arrays.asList(program));
Long facilityId = 12345L;
when(programService.getProgramsForUserByFacilityAndRights(facilityId, USER_ID, VIEW_REQUISITION)).thenReturn(programs);
assertEquals(programs, controller.getProgramsToViewRequisitions(facilityId, httpServletRequest));
}
|
private void _startScan( File folder ){
File[] files = folder.listFiles( new FileFilter() {
@Override
public boolean accept(File pathname) {
if ( ! pathname.canRead() ) return false;
if ( pathname.isHidden() && ! _hidden ) return false;
if ( pathname.isDirectory() && ! _recursive ) return false;
if ( _ff != null ){
return _ff.accept( pathname );
} else {
for ( String ext : ALLOWED_MEDIA )
if ( pathname.getName().endsWith( ext ) )
return true;
}
return false;
}
});
for ( File file : files ){
if ( this.isStopped() ) return;
if ( file.isDirectory() ){
this._startScan( file );
continue;
}
this.files.add( file );
this.getThreadListener().onProgress(this, 0, 0, 0, file);
}
}
| private void _startScan( File folder ){
File[] files = folder.listFiles( new FileFilter() {
@Override
public boolean accept(File pathname) {
if ( ! pathname.canRead() ) return false;
if ( pathname.isHidden() && ! _hidden ) return false;
if ( pathname.isDirectory() && ! _recursive ) return false;
if ( _ff != null ){
return _ff.accept( pathname );
} else {
for ( String ext : ALLOWED_MEDIA )
if ( pathname.getName().endsWith( "." + ext ) )
return true;
}
return false;
}
});
for ( File file : files ){
if ( this.isStopped() ) return;
if ( file.isDirectory() ){
this._startScan( file );
continue;
}
this.files.add( file );
this.getThreadListener().onProgress(this, 0, 0, 0, file);
}
}
|
private boolean getLockInformation(ITransaction transaction,
HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
Node lockInfoNode = null;
DocumentBuilder documentBuilder = null;
documentBuilder = getDocumentBuilder();
try {
Document document = documentBuilder.parse(new InputSource(req
.getInputStream()));
Element rootElement = document.getDocumentElement();
lockInfoNode = rootElement;
if (lockInfoNode != null) {
NodeList childList = lockInfoNode.getChildNodes();
Node lockScopeNode = null;
Node lockTypeNode = null;
Node lockOwnerNode = null;
Node currentNode = null;
String nodeName = null;
for (int i = 0; i < childList.getLength(); i++) {
currentNode = childList.item(i);
if (currentNode.getNodeType() == Node.ELEMENT_NODE
|| currentNode.getNodeType() == Node.TEXT_NODE) {
nodeName = currentNode.getNodeName();
if (nodeName.endsWith("locktype")) {
lockTypeNode = currentNode;
}
if (nodeName.endsWith("lockscope")) {
lockScopeNode = currentNode;
}
if (nodeName.endsWith("owner")) {
lockOwnerNode = currentNode;
}
} else {
return false;
}
}
if (lockScopeNode != null) {
String scope = null;
childList = lockScopeNode.getChildNodes();
for (int i = 0; i < childList.getLength(); i++) {
currentNode = childList.item(i);
if (currentNode.getNodeType() == Node.ELEMENT_NODE) {
scope = currentNode.getNodeName();
if (scope.endsWith("exclusive")) {
_exclusive = true;
} else if (scope.equals("shared")) {
_exclusive = false;
}
}
}
if (scope == null) {
return false;
}
} else {
return false;
}
if (lockTypeNode != null) {
childList = lockTypeNode.getChildNodes();
for (int i = 0; i < childList.getLength(); i++) {
currentNode = childList.item(i);
if (currentNode.getNodeType() == Node.ELEMENT_NODE) {
_type = currentNode.getNodeName();
if (_type.endsWith("write")) {
_type = "write";
} else if (_type.equals("read")) {
_type = "read";
}
}
}
if (_type == null) {
return false;
}
} else {
return false;
}
if (lockOwnerNode != null) {
childList = lockOwnerNode.getChildNodes();
for (int i = 0; i < childList.getLength(); i++) {
currentNode = childList.item(i);
if (currentNode.getNodeType() == Node.ELEMENT_NODE) {
_lockOwner = currentNode.getNodeValue();
}
}
}
if (_lockOwner == null) {
return false;
}
} else {
return false;
}
} catch (DOMException e) {
resp.sendError(WebdavStatus.SC_INTERNAL_SERVER_ERROR);
e.printStackTrace();
return false;
} catch (SAXException e) {
resp.sendError(WebdavStatus.SC_INTERNAL_SERVER_ERROR);
e.printStackTrace();
return false;
}
return true;
}
| private boolean getLockInformation(ITransaction transaction,
HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
Node lockInfoNode = null;
DocumentBuilder documentBuilder = null;
documentBuilder = getDocumentBuilder();
try {
Document document = documentBuilder.parse(new InputSource(req
.getInputStream()));
Element rootElement = document.getDocumentElement();
lockInfoNode = rootElement;
if (lockInfoNode != null) {
NodeList childList = lockInfoNode.getChildNodes();
Node lockScopeNode = null;
Node lockTypeNode = null;
Node lockOwnerNode = null;
Node currentNode = null;
String nodeName = null;
for (int i = 0; i < childList.getLength(); i++) {
currentNode = childList.item(i);
if (currentNode.getNodeType() == Node.ELEMENT_NODE
|| currentNode.getNodeType() == Node.TEXT_NODE) {
nodeName = currentNode.getNodeName();
if (nodeName.endsWith("locktype")) {
lockTypeNode = currentNode;
}
if (nodeName.endsWith("lockscope")) {
lockScopeNode = currentNode;
}
if (nodeName.endsWith("owner")) {
lockOwnerNode = currentNode;
}
} else {
return false;
}
}
if (lockScopeNode != null) {
String scope = null;
childList = lockScopeNode.getChildNodes();
for (int i = 0; i < childList.getLength(); i++) {
currentNode = childList.item(i);
if (currentNode.getNodeType() == Node.ELEMENT_NODE) {
scope = currentNode.getNodeName();
if (scope.endsWith("exclusive")) {
_exclusive = true;
} else if (scope.equals("shared")) {
_exclusive = false;
}
}
}
if (scope == null) {
return false;
}
} else {
return false;
}
if (lockTypeNode != null) {
childList = lockTypeNode.getChildNodes();
for (int i = 0; i < childList.getLength(); i++) {
currentNode = childList.item(i);
if (currentNode.getNodeType() == Node.ELEMENT_NODE) {
_type = currentNode.getNodeName();
if (_type.endsWith("write")) {
_type = "write";
} else if (_type.equals("read")) {
_type = "read";
}
}
}
if (_type == null) {
return false;
}
} else {
return false;
}
if (lockOwnerNode != null) {
childList = lockOwnerNode.getChildNodes();
for (int i = 0; i < childList.getLength(); i++) {
currentNode = childList.item(i);
if (currentNode.getNodeType() == Node.ELEMENT_NODE) {
_lockOwner = currentNode.getFirstChild()
.getNodeValue();
}
}
}
if (_lockOwner == null) {
return false;
}
} else {
return false;
}
} catch (DOMException e) {
resp.sendError(WebdavStatus.SC_INTERNAL_SERVER_ERROR);
e.printStackTrace();
return false;
} catch (SAXException e) {
resp.sendError(WebdavStatus.SC_INTERNAL_SERVER_ERROR);
e.printStackTrace();
return false;
}
return true;
}
|
public static double[] getUniquedValuesFromMatrix(IMatrix data, IElementAdapter cellAdapter, int valueDimension, int maxUnique, IProgressMonitor monitor) {
Double[] values = null;
List<Double> valueList = new ArrayList<Double>();
MatrixUtils.DoubleCast cast = MatrixUtils.createDoubleCast(
cellAdapter.getProperty(valueDimension).getValueClass());
Double min = Double.POSITIVE_INFINITY;
Double max = Double.NEGATIVE_INFINITY;
int colNb = data.getColumnCount();
int rowNb = data.getRowCount();
IProgressMonitor submonitor = monitor.subtask();
String valueDimensionName = data.getCellAttributes().get(valueDimension).getName();
submonitor.begin("Reading all values in data matrix for "+ valueDimensionName, rowNb);
int randomRows = 50 > rowNb ? rowNb : 50;
int[] randomRowsIdx = new int[randomRows];
for (int i = 0; i < randomRows; i++)
randomRowsIdx[i] = (int)(Math.random() * ((rowNb) + 1));
int rr = 0;
for (int r = 0; r<rowNb; r++) {
monitor.worked(1);
for (int c = 0; c < colNb; c++) {
double d = cast.getDoubleValue(
data.getCellValue(r, c, valueDimension));
if (!Double.isNaN(d)) {
if (valueList.size() <= maxUnique && !valueList.contains(d) )
valueList.add(d);
min = d < min ? d : min;
max = d > max ? d : max;
}
}
if (rr >= randomRows-1)
break;
else if (valueList.size() >= maxUnique) {
r = randomRowsIdx[rr];
rr++;
}
}
if (!valueList.contains(min))
valueList.add(min);
if (!valueList.contains(max))
valueList.add(max);
if (valueList.size() >= maxUnique) {
valueList.clear();
double spectrum = max-min;
double step = spectrum/maxUnique;
for (int i = 0; i < maxUnique; i++) {
valueList.add(i*step-(spectrum - max));
}
}
return ArrayUtils.toPrimitive(valueList.toArray(new Double[]{}));
}
| public static double[] getUniquedValuesFromMatrix(IMatrix data, IElementAdapter cellAdapter, int valueDimension, int maxUnique, IProgressMonitor monitor) {
Double[] values = null;
List<Double> valueList = new ArrayList<Double>();
MatrixUtils.DoubleCast cast = MatrixUtils.createDoubleCast(
cellAdapter.getProperty(valueDimension).getValueClass());
Double min = Double.POSITIVE_INFINITY;
Double max = Double.NEGATIVE_INFINITY;
int colNb = data.getColumnCount();
int rowNb = data.getRowCount();
IProgressMonitor submonitor = monitor.subtask();
String valueDimensionName = data.getCellAttributes().get(valueDimension).getName();
submonitor.begin("Reading all values in data matrix for "+ valueDimensionName, rowNb);
int randomRows = 50 > rowNb ? rowNb : 50;
int[] randomRowsIdx = new int[randomRows];
for (int i = 0; i < randomRows; i++)
randomRowsIdx[i] = (int)(Math.random() * ((rowNb) + 1));
int rr = 0;
for (int r = 0; r<rowNb; r++) {
monitor.worked(1);
for (int c = 0; c < colNb; c++) {
Object v = data.getCellValue(r, c, valueDimension);
if (v == null)
continue;
double d = cast.getDoubleValue(v);
if (!Double.isNaN(d)) {
if (valueList.size() <= maxUnique && !valueList.contains(d) )
valueList.add(d);
min = d < min ? d : min;
max = d > max ? d : max;
}
}
if (rr >= randomRows-1)
break;
else if (valueList.size() >= maxUnique) {
r = randomRowsIdx[rr];
rr++;
}
}
if (!valueList.contains(min))
valueList.add(min);
if (!valueList.contains(max))
valueList.add(max);
if (valueList.size() >= maxUnique) {
valueList.clear();
double spectrum = max-min;
double step = spectrum/maxUnique;
for (int i = 0; i < maxUnique; i++) {
valueList.add(i*step-(spectrum - max));
}
}
return ArrayUtils.toPrimitive(valueList.toArray(new Double[]{}));
}
|
void startCleanup() {
final long now = System.currentTimeMillis();
if (locallyOwnedMap != null) {
locallyOwnedMap.evict(now);
}
if (mapNearCache != null) {
mapNearCache.evict(now, false);
}
final Set<Record> recordsDirty = new HashSet<Record>();
final Set<Record> recordsUnknown = new HashSet<Record>();
final Set<Record> recordsToPurge = new HashSet<Record>();
final Set<Record> recordsToEvict = new HashSet<Record>();
final Set<Record> sortedRecords = new TreeSet<Record>(evictionComparator);
final Collection<Record> records = mapRecords.values();
final int clusterMemberSize = node.getClusterImpl().getMembers().size();
final int memberCount = (clusterMemberSize == 0) ? 1 : clusterMemberSize;
final int maxSizePerJVM = maxSize / memberCount;
final boolean evictionAware = evictionComparator != null && maxSizePerJVM > 0;
final PartitionServiceImpl partitionService = concurrentMapManager.partitionManager.partitionServiceImpl;
int recordsStillOwned = 0;
int backupPurgeCount = 0;
for (Record record : records) {
PartitionServiceImpl.PartitionProxy partition = partitionService.getPartition(record.getBlockId());
Member owner = partition.getOwner();
if (owner != null && !partition.isMigrating()) {
boolean owned = owner.localMember();
if (owned) {
if (store != null && record.isDirty()) {
if (now > record.getWriteTime()) {
recordsDirty.add(record);
record.setDirty(false);
}
} else if (shouldPurgeRecord(record, now)) {
recordsToPurge.add(record);
} else if (record.isActive() && !record.isValid(now)) {
recordsToEvict.add(record);
} else if (evictionAware && record.isActive() && record.isEvictable()) {
sortedRecords.add(record);
recordsStillOwned++;
} else {
recordsStillOwned++;
}
} else {
Member ownerEventual = partition.getEventualOwner();
boolean backup = false;
if (ownerEventual != null && owner != null && !owner.localMember()) {
int distance = node.getClusterImpl().getDistanceFrom(ownerEventual);
backup = (distance != -1 && distance <= getBackupCount());
}
if (backup) {
if (shouldPurgeRecord(record, now)) {
recordsToPurge.add(record);
backupPurgeCount++;
}
} else {
recordsUnknown.add(record);
}
}
}
}
if (evictionAware && maxSizePerJVM < recordsStillOwned) {
int numberOfRecordsToEvict = (int) (recordsStillOwned * evictionRate);
int evictedCount = 0;
for (Record record : sortedRecords) {
if (record.isActive() && record.isEvictable()) {
recordsToEvict.add(record);
if (++evictedCount >= numberOfRecordsToEvict) {
break;
}
}
}
}
Level levelLog = (concurrentMapManager.LOG_STATE) ? Level.INFO : Level.FINEST;
logger.log(levelLog, name + " Cleanup "
+ ", dirty:" + recordsDirty.size()
+ ", purge:" + recordsToPurge.size()
+ ", evict:" + recordsToEvict.size()
+ ", unknown:" + recordsUnknown.size()
+ ", stillOwned:" + recordsStillOwned
+ ", backupPurge:" + backupPurgeCount
);
executeStoreUpdate(recordsDirty);
executeEviction(recordsToEvict);
executePurge(recordsToPurge);
executePurgeUnknowns(recordsUnknown);
}
| void startCleanup() {
final long now = System.currentTimeMillis();
if (locallyOwnedMap != null) {
locallyOwnedMap.evict(now);
}
if (mapNearCache != null) {
mapNearCache.evict(now, false);
}
final Set<Record> recordsDirty = new HashSet<Record>();
final Set<Record> recordsUnknown = new HashSet<Record>();
final Set<Record> recordsToPurge = new HashSet<Record>();
final Set<Record> recordsToEvict = new HashSet<Record>();
final Set<Record> sortedRecords = new TreeSet<Record>(evictionComparator);
final Collection<Record> records = mapRecords.values();
final int clusterMemberSize = node.getClusterImpl().getMembers().size();
final int memberCount = (clusterMemberSize == 0) ? 1 : clusterMemberSize;
final int maxSizePerJVM = maxSize / memberCount;
final boolean evictionAware = evictionComparator != null && maxSizePerJVM > 0;
final PartitionServiceImpl partitionService = concurrentMapManager.partitionManager.partitionServiceImpl;
int recordsStillOwned = 0;
int backupPurgeCount = 0;
for (Record record : records) {
PartitionServiceImpl.PartitionProxy partition = partitionService.getPartition(record.getBlockId());
Member owner = partition.getOwner();
if (owner != null && !partition.isMigrating()) {
boolean owned = owner.localMember();
if (owned) {
if (store != null && writeDelayMillis > 0 && record.isDirty()) {
if (now > record.getWriteTime()) {
recordsDirty.add(record);
record.setDirty(false);
}
} else if (shouldPurgeRecord(record, now)) {
recordsToPurge.add(record);
} else if (record.isActive() && !record.isValid(now)) {
recordsToEvict.add(record);
} else if (evictionAware && record.isActive() && record.isEvictable()) {
sortedRecords.add(record);
recordsStillOwned++;
} else {
recordsStillOwned++;
}
} else {
Member ownerEventual = partition.getEventualOwner();
boolean backup = false;
if (ownerEventual != null && owner != null && !owner.localMember()) {
int distance = node.getClusterImpl().getDistanceFrom(ownerEventual);
backup = (distance != -1 && distance <= getBackupCount());
}
if (backup) {
if (shouldPurgeRecord(record, now)) {
recordsToPurge.add(record);
backupPurgeCount++;
}
} else {
recordsUnknown.add(record);
}
}
}
}
if (evictionAware && maxSizePerJVM < recordsStillOwned) {
int numberOfRecordsToEvict = (int) (recordsStillOwned * evictionRate);
int evictedCount = 0;
for (Record record : sortedRecords) {
if (record.isActive() && record.isEvictable()) {
recordsToEvict.add(record);
if (++evictedCount >= numberOfRecordsToEvict) {
break;
}
}
}
}
Level levelLog = (concurrentMapManager.LOG_STATE) ? Level.INFO : Level.FINEST;
logger.log(levelLog, name + " Cleanup "
+ ", dirty:" + recordsDirty.size()
+ ", purge:" + recordsToPurge.size()
+ ", evict:" + recordsToEvict.size()
+ ", unknown:" + recordsUnknown.size()
+ ", stillOwned:" + recordsStillOwned
+ ", backupPurge:" + backupPurgeCount
);
executeStoreUpdate(recordsDirty);
executeEviction(recordsToEvict);
executePurge(recordsToPurge);
executePurgeUnknowns(recordsUnknown);
}
|
protected void writeRatings(RatingDataAccessObject dao, Long2IntMap userSegments) throws MojoExecutionException, SQLException {
Connection[] dbcs = new Connection[numFolds];
PreparedStatement[] insert = new PreparedStatement[numFolds];
PreparedStatement[] test = new PreparedStatement[numFolds];
try {
for (int i = 0; i < numFolds; i++) {
String fn = String.format(databaseFilePattern, i+1);
getLog().debug("Opening database " + fn);
dbcs[i] = DriverManager.getConnection("jdbc:sqlite:" + fn);
JDBCUtils.execute(dbcs[i], "DROP TABLE IF EXISTS train;");
JDBCUtils.execute(dbcs[i], "DROP TABLE IF EXISTS test;");
String qmake = "CREATE TABLE %s (user INTEGER, item INTEGER, rating REAL";
if (useTimestamp)
qmake += ", timestamp INTEGER";
qmake += ");";
JDBCUtils.execute(dbcs[i], String.format(qmake, "train"));
JDBCUtils.execute(dbcs[i], String.format(qmake, "test"));
qmake = "INSERT INTO %s (user, item, rating";
if (useTimestamp) qmake += ", timestamp";
qmake += ") VALUES (?, ?, ?";
if (useTimestamp) qmake += ", ?";
qmake += ");";
insert[i] = dbcs[i].prepareStatement(String.format(qmake, "train"));
test[i] = dbcs[i].prepareStatement(String.format(qmake, "test"));
dbcs[i].setAutoCommit(false);
}
Long2ObjectMap<List<Rating>> userRatings = new Long2ObjectOpenHashMap<List<Rating>>(userSegments.size());
LongIterator iter = userSegments.keySet().iterator();
while (iter.hasNext())
userRatings.put(iter.nextLong(), new ArrayList<Rating>());
getLog().info("Processing ratings");
Cursor<Rating> ratings = dao.getRatings();
try {
int n = 0;
for (Rating r: ratings) {
long uid = r.getUserId();
int s = userSegments.get(uid);
userRatings.get(uid).add(r);
long ts = r.getTimestamp();
for (int i = 0; i < numFolds; i++) {
if (i != s) {
insert[i].setLong(1, uid);
insert[i].setLong(2, r.getItemId());
insert[i].setDouble(3, r.getRating());
if (useTimestamp) {
if (ts >= 0)
insert[i].setLong(4, ts);
else
insert[i].setNull(4, Types.INTEGER);
}
insert[i].executeUpdate();
}
}
n++;
if (n % 50 == 0 && getLog().isInfoEnabled())
System.out.format("%d\r", n);
}
if (getLog().isInfoEnabled())
System.out.format("%d\n", n);
} finally {
ratings.close();
}
getLog().info("Writing test sets");
int n = 0;
for (Long2ObjectMap.Entry<List<Rating>> e: userRatings.long2ObjectEntrySet()) {
long uid = e.getLongKey();
int seg = userSegments.get(uid);
PreparedStatement sTrain = insert[seg];
PreparedStatement sTest = test[seg];
sTrain.setLong(1, uid);
sTest.setLong(1, uid);
List<Rating> urs = e.getValue();
Collections.shuffle(urs);
int midpt = urs.size() - holdoutCount;
for (Rating r: urs.subList(0, midpt)) {
long iid = r.getItemId();
double v = r.getRating();
long ts = r.getTimestamp();
sTrain.setLong(2, iid);
sTrain.setDouble(3, v);
if (useTimestamp) {
if (ts >= 0)
sTrain.setLong(4, ts);
else
sTrain.setNull(4, Types.INTEGER);
}
sTrain.executeUpdate();
}
for (Rating r: urs.subList(0, midpt)) {
long iid = r.getItemId();
double v = r.getRating();
long ts = r.getTimestamp();
sTest.setLong(2, iid);
sTest.setDouble(3, v);
if (useTimestamp) {
if (ts >= 0)
sTest.setLong(4, ts);
else
sTest.setNull(4, Types.INTEGER);
}
sTest.executeUpdate();
}
urs.clear();
n++;
if (n % 50 == 0 && getLog().isInfoEnabled())
System.out.format("%d\r", n);
}
if (getLog().isInfoEnabled())
System.out.format("%d\n", n);
userRatings = null;
getLog().info("Committing data");
for (int i = 0; i < numFolds; i++) {
getLog().debug(String.format("Committing and indexing set %d", i+1));
dbcs[i].commit();
dbcs[i].setAutoCommit(true);
JDBCUtils.execute(dbcs[i], "CREATE INDEX train_user_idx ON train (user);");
JDBCUtils.execute(dbcs[i], "CREATE INDEX train_item_idx ON train (item);");
JDBCUtils.execute(dbcs[i], "CREATE INDEX train_timestamp_idx ON train (timestamp);");
JDBCUtils.execute(dbcs[i], "CREATE INDEX test_user_idx ON test (user);");
JDBCUtils.execute(dbcs[i], "CREATE INDEX test_item_idx ON test (item);");
JDBCUtils.execute(dbcs[i], "ANALYZE;");
}
} finally {
boolean failed = false;
for (int i = 0; i < dbcs.length; i++) {
if (test[i] != null) {
try {
test[i].close();
} catch (SQLException e) {
getLog().error(e);
failed = true;
}
}
if (insert[i] != null) {
try {
insert[i].close();
} catch (SQLException e) {
getLog().error(e);
failed = true;
}
}
if (dbcs[i] != null) {
try {
dbcs[i].close();
} catch (SQLException e) {
getLog().error(e);
failed = true;
}
}
if (failed)
throw new MojoExecutionException("Failed to close database");
}
}
}
| protected void writeRatings(RatingDataAccessObject dao, Long2IntMap userSegments) throws MojoExecutionException, SQLException {
Connection[] dbcs = new Connection[numFolds];
PreparedStatement[] insert = new PreparedStatement[numFolds];
PreparedStatement[] test = new PreparedStatement[numFolds];
try {
for (int i = 0; i < numFolds; i++) {
String fn = String.format(databaseFilePattern, i+1);
getLog().debug("Opening database " + fn);
dbcs[i] = DriverManager.getConnection("jdbc:sqlite:" + fn);
JDBCUtils.execute(dbcs[i], "DROP TABLE IF EXISTS train;");
JDBCUtils.execute(dbcs[i], "DROP TABLE IF EXISTS test;");
String qmake = "CREATE TABLE %s (user INTEGER, item INTEGER, rating REAL";
if (useTimestamp)
qmake += ", timestamp INTEGER";
qmake += ");";
JDBCUtils.execute(dbcs[i], String.format(qmake, "train"));
JDBCUtils.execute(dbcs[i], String.format(qmake, "test"));
qmake = "INSERT INTO %s (user, item, rating";
if (useTimestamp) qmake += ", timestamp";
qmake += ") VALUES (?, ?, ?";
if (useTimestamp) qmake += ", ?";
qmake += ");";
insert[i] = dbcs[i].prepareStatement(String.format(qmake, "train"));
test[i] = dbcs[i].prepareStatement(String.format(qmake, "test"));
dbcs[i].setAutoCommit(false);
}
Long2ObjectMap<List<Rating>> userRatings = new Long2ObjectOpenHashMap<List<Rating>>(userSegments.size());
LongIterator iter = userSegments.keySet().iterator();
while (iter.hasNext())
userRatings.put(iter.nextLong(), new ArrayList<Rating>());
getLog().info("Processing ratings");
Cursor<Rating> ratings = dao.getRatings();
try {
int n = 0;
for (Rating r: ratings) {
long uid = r.getUserId();
int s = userSegments.get(uid);
userRatings.get(uid).add(r);
long ts = r.getTimestamp();
for (int i = 0; i < numFolds; i++) {
if (i != s) {
insert[i].setLong(1, uid);
insert[i].setLong(2, r.getItemId());
insert[i].setDouble(3, r.getRating());
if (useTimestamp) {
if (ts >= 0)
insert[i].setLong(4, ts);
else
insert[i].setNull(4, Types.INTEGER);
}
insert[i].executeUpdate();
}
}
n++;
if (n % 50 == 0 && getLog().isInfoEnabled())
System.out.format("%d\r", n);
}
if (getLog().isInfoEnabled())
System.out.format("%d\n", n);
} finally {
ratings.close();
}
getLog().info("Writing test sets");
int n = 0;
for (Long2ObjectMap.Entry<List<Rating>> e: userRatings.long2ObjectEntrySet()) {
long uid = e.getLongKey();
int seg = userSegments.get(uid);
PreparedStatement sTrain = insert[seg];
PreparedStatement sTest = test[seg];
sTrain.setLong(1, uid);
sTest.setLong(1, uid);
List<Rating> urs = e.getValue();
Collections.shuffle(urs);
int midpt = urs.size() - holdoutCount;
for (Rating r: urs.subList(0, midpt)) {
long iid = r.getItemId();
double v = r.getRating();
long ts = r.getTimestamp();
sTrain.setLong(2, iid);
sTrain.setDouble(3, v);
if (useTimestamp) {
if (ts >= 0)
sTrain.setLong(4, ts);
else
sTrain.setNull(4, Types.INTEGER);
}
sTrain.executeUpdate();
}
for (Rating r: urs.subList(midpt, urs.size())) {
long iid = r.getItemId();
double v = r.getRating();
long ts = r.getTimestamp();
sTest.setLong(2, iid);
sTest.setDouble(3, v);
if (useTimestamp) {
if (ts >= 0)
sTest.setLong(4, ts);
else
sTest.setNull(4, Types.INTEGER);
}
sTest.executeUpdate();
}
urs.clear();
n++;
if (n % 50 == 0 && getLog().isInfoEnabled())
System.out.format("%d\r", n);
}
if (getLog().isInfoEnabled())
System.out.format("%d\n", n);
userRatings = null;
getLog().info("Committing data");
for (int i = 0; i < numFolds; i++) {
getLog().debug(String.format("Committing and indexing set %d", i+1));
dbcs[i].commit();
dbcs[i].setAutoCommit(true);
JDBCUtils.execute(dbcs[i], "CREATE INDEX train_user_idx ON train (user);");
JDBCUtils.execute(dbcs[i], "CREATE INDEX train_item_idx ON train (item);");
JDBCUtils.execute(dbcs[i], "CREATE INDEX train_timestamp_idx ON train (timestamp);");
JDBCUtils.execute(dbcs[i], "CREATE INDEX test_user_idx ON test (user);");
JDBCUtils.execute(dbcs[i], "CREATE INDEX test_item_idx ON test (item);");
JDBCUtils.execute(dbcs[i], "ANALYZE;");
}
} finally {
boolean failed = false;
for (int i = 0; i < dbcs.length; i++) {
if (test[i] != null) {
try {
test[i].close();
} catch (SQLException e) {
getLog().error(e);
failed = true;
}
}
if (insert[i] != null) {
try {
insert[i].close();
} catch (SQLException e) {
getLog().error(e);
failed = true;
}
}
if (dbcs[i] != null) {
try {
dbcs[i].close();
} catch (SQLException e) {
getLog().error(e);
failed = true;
}
}
if (failed)
throw new MojoExecutionException("Failed to close database");
}
}
}
|
private static void initWizards() {
WIZARDS_DICT = new HashMap<String, WizardInfo>();
WIZARDS_DICT.put("BASIC", new WizardInfo("BASIC", "Basic",
R.drawable.ic_wizard_basic, 50,
new Locale[] {}, true, false,
Basic.class));
WIZARDS_DICT.put("ADVANCED", new WizardInfo("ADVANCED", "Advanced",
R.drawable.ic_wizard_advanced, 10,
new Locale[] {}, true, false,
Advanced.class));
WIZARDS_DICT.put(WizardUtils.EXPERT_WIZARD_TAG, new WizardInfo(WizardUtils.EXPERT_WIZARD_TAG, "Expert",
R.drawable.ic_wizard_expert, 1,
new Locale[] {}, true, false,
Expert.class));
WIZARDS_DICT.put(WizardUtils.LOCAL_WIZARD_TAG, new WizardInfo(WizardUtils.LOCAL_WIZARD_TAG, "Local",
R.drawable.ic_wizard_expert, 1,
new Locale[] {}, true, false,
Local.class));
if(CustomDistribution.distributionWantsOtherProviders()) {
WIZARDS_DICT.put("EKIGA", new WizardInfo("EKIGA", "Ekiga",
R.drawable.ic_wizard_ekiga, 50,
new Locale[]{}, false, true,
Ekiga.class));
WIZARDS_DICT.put("SIP2SIP", new WizardInfo("SIP2SIP", "Sip2Sip",
R.drawable.ic_wizard_sip2sip, 10,
new Locale[]{}, false, true,
Sip2Sip.class));
WIZARDS_DICT.put("IPTEL", new WizardInfo("IPTEL", "IpTel",
R.drawable.ic_wizard_iptel, 30,
new Locale[]{}, false, true,
IpTel.class));
WIZARDS_DICT.put("SIPSORCERY", new WizardInfo("SIPSORCERY", "SIPSorcery",
R.drawable.ic_wizard_sipsorcery, 35,
new Locale[]{}, false, true,
SipSorcery.class));
WIZARDS_DICT.put("PBXES", new WizardInfo("PBXES", "Pbxes.org",
R.drawable.ic_wizard_pbxes, 20,
new Locale[]{}, false, true,
Pbxes.class));
WIZARDS_DICT.put("ECS", new WizardInfo("ECS", "Alcatel-Lucent OmniPCX Office",
R.drawable.ic_wizard_ale, 5,
new Locale[]{}, false, true,
OXO810.class));
WIZARDS_DICT.put("ITTELENET", new WizardInfo("ITTELENET", "ITTelenet",
R.drawable.ic_wizard_ittelenet, 10,
new Locale[]{}, false, true,
ITTelenet.class));
WIZARDS_DICT.put("DELTATHREE", new WizardInfo("DELTATHREE", "deltathree",
R.drawable.ic_wizard_deltathree, 35,
new Locale[]{ }, false, true,
DeltaThree.class));
WIZARDS_DICT.put("CAMUNDANET", new WizardInfo("CAMUNDANET", "CamundaNet",
R.drawable.ic_wizard_camundanet, 15,
new Locale[]{}, false, true,
CamundaNet.class));
WIZARDS_DICT.put("BETAMAX", new WizardInfo("BETAMAX", "Betamax clone",
R.drawable.ic_wizard_basic, 30,
new Locale[]{}, false, true,
Betamax.class));
WIZARDS_DICT.put("SIPCEL", new WizardInfo("SIPCEL", "SipCel Telecom",
R.drawable.ic_wizard_sipcel, 14,
new Locale[]{}, false, true,
SipCel.class));
WIZARDS_DICT.put("LOCALPHONE", new WizardInfo("LOCALPHONE", "Localphone",
R.drawable.ic_wizard_localphone, 10,
new Locale[]{ }, false, true,
Localphone.class));
WIZARDS_DICT.put("BROADSOFT", new WizardInfo("BROADSOFT", "Broadsoft",
R.drawable.ic_wizard_broadsoft, 9,
new Locale[]{ }, false, true,
Broadsoft.class));
WIZARDS_DICT.put("DVCNG", new WizardInfo("DVCNG", "DVC'NG",
R.drawable.ic_wizard_dvcng, 16,
new Locale[]{ }, false, true,
DvcNg.class));
WIZARDS_DICT.put("PFINGO", new WizardInfo("PFINGO", "Pfingo",
R.drawable.ic_wizard_pfingo, 19,
new Locale[]{ }, false, true,
Pfingo.class));
WIZARDS_DICT.put("FASTVOIP", new WizardInfo("FASTVOIP", "FastVoip",
R.drawable.ic_wizard_fastvoip, 20,
new Locale[]{ }, false, true,
FastVoip.class));
WIZARDS_DICT.put("SIPWISE", new WizardInfo("SIPWISE", "sipwise",
R.drawable.ic_wizard_sipwise, 34,
new Locale[]{ }, false, true,
SipWise.class));
WIZARDS_DICT.put("VOIPMS", new WizardInfo("VOIPMS", "VoIP.ms",
R.drawable.ic_wizard_voipms, 18,
new Locale[]{ }, false, true,
VoipMS.class));
WIZARDS_DICT.put("SONETEL", new WizardInfo("SONETEL", "Sonetel",
R.drawable.ic_wizard_sonetel, 17,
new Locale[]{ }, false, true,
Sonetel.class));
WIZARDS_DICT.put("RAPIDVOX", new WizardInfo("RAPIDVOX", "Rapidvox",
R.drawable.ic_wizard_rapidvox, 19,
new Locale[]{ }, false, true,
Rapidvox.class));
WIZARDS_DICT.put("TANSTAGI", new WizardInfo("TANSTAGI", "tanstagi",
R.drawable.ic_wizard_tanstagi, 35,
new Locale[]{ }, false, true,
Tanstagi.class));
WIZARDS_DICT.put("NYMGO", new WizardInfo("NYMGO", "Nymgo",
R.drawable.ic_wizard_nymgo, 18,
new Locale[]{ }, false, true,
Nymgo.class));
WIZARDS_DICT.put("SIPKOM", new WizardInfo("SIPKOM", "sipkom",
R.drawable.ic_wizard_sipkom, 18,
new Locale[]{ }, false, true,
Sipkom.class));
WIZARDS_DICT.put("ABCVOIP", new WizardInfo("ABCVOIP", "ABC-VoIP",
R.drawable.ic_wizard_abcvoip, 18,
new Locale[]{ }, false, true,
AbcVoip.class));
WIZARDS_DICT.put("AMIVOX", new WizardInfo("AMIVOX", "Amivox",
R.drawable.ic_wizard_amivox, 18,
new Locale[]{ }, false, true,
Amivox.class));
WIZARDS_DICT.put("CALLCENTRIC", new WizardInfo("CALLCENTRIC", "Callcentric",
R.drawable.ic_wizard_callcentric, 10,
new Locale[]{Locale.US}, false, false,
Callcentric.class));
WIZARDS_DICT.put("EUTELIA", new WizardInfo("EUTELIA", "Eutelia",
R.drawable.ic_wizard_eutelia, 30,
new Locale[]{Locale.ITALY}, false, false,
Eutelia.class));
WIZARDS_DICT.put("WIMOBILE", new WizardInfo("WIMOBILE", "WiMobile",
R.drawable.ic_wizard_wimobile, 20,
new Locale[]{Locale.ITALY}, false, false,
WiMobile.class));
WIZARDS_DICT.put("FREEPHONIE", new WizardInfo("FREEPHONIE", "Freephonie",
R.drawable.ic_wizard_freephonie, 30,
new Locale[]{Locale.FRANCE}, false, false,
Freephonie.class));
WIZARDS_DICT.put("NEUFTALK", new WizardInfo("NEUFTALK", "NeufTalk",
R.drawable.ic_wizard_neuftalk, 25,
new Locale[]{Locale.FRANCE}, false, false,
NeufTalk.class));
WIZARDS_DICT.put("IPPI", new WizardInfo("IPPI", "ippi",
R.drawable.ic_wizard_ippi, 21,
new Locale[]{ Locale.FRENCH, Locale.CANADA, Locale.US, }, false, false,
Ippi.class));
WIZARDS_DICT.put("KEYYO", new WizardInfo("KEYYO", "Keyyo",
R.drawable.ic_wizard_keyyo, 9,
new Locale[]{Locale.FRANCE}, false, false,
Keyyo.class));
WIZARDS_DICT.put("PHONZO", new WizardInfo("PHONZO", "Phonzo",
R.drawable.ic_wizard_phonzo, 10,
new Locale[]{new Locale("SE")}, false, false,
Phonzo.class));
WIZARDS_DICT.put("PLANETPHONE", new WizardInfo("PLANETPHONE", "PlanetPhone",
R.drawable.ic_wizard_planetphone, 10,
new Locale[]{ locale("bg_BG") }, false, false,
PlanetPhone.class));
WIZARDS_DICT.put("SIPGATE", new WizardInfo("SIPGATE", "Sipgate",
R.drawable.ic_wizard_sipgate, 10,
new Locale[]{Locale.US, Locale.UK, Locale.GERMANY}, false, false,
Sipgate.class));
WIZARDS_DICT.put("PENNYTEL", new WizardInfo("PENNYTEL", "Pennytel",
R.drawable.ic_wizard_pennytel, 10,
new Locale[]{ locale("en_AU") }, false, false,
Pennytel.class));
WIZARDS_DICT.put("ONSIP", new WizardInfo("ONSIP", "OnSIP",
R.drawable.ic_wizard_onsip, 30,
new Locale[]{ Locale.US}, false, false,
OnSip.class));
WIZARDS_DICT.put("BTONE", new WizardInfo("BTONE", "BlueTone",
R.drawable.ic_wizard_btone, 20,
new Locale[]{ Locale.US}, false, false,
BTone.class));
WIZARDS_DICT.put("IINET", new WizardInfo("IINET", "iinet",
R.drawable.ic_wizard_iinet, 5,
new Locale[]{new Locale("EN", "au")}, false, false,
IiNet.class));
WIZARDS_DICT.put("VPHONE", new WizardInfo("VPHONE", "VTel",
R.drawable.ic_wizard_vphone, 5,
new Locale[]{new Locale("EN", "au")}, false, false,
VPhone.class));
WIZARDS_DICT.put("UKRTEL", new WizardInfo("UKRTEL", "UkrTelecom",
R.drawable.ic_wizard_ukrtelecom, 10,
new Locale[]{new Locale("UK", "ua")}, false, false,
UkrTelecom.class));
WIZARDS_DICT.put("IP2MOBILE", new WizardInfo("IP2MOBILE", "ip2Mobile",
R.drawable.ic_wizard_ip2mobile, 10,
new Locale[]{new Locale("DK", "dk")}, false, false,
Ip2Mobile.class));
WIZARDS_DICT.put("SPEAKEZI", new WizardInfo("SPEAKEZI", "Speakezi Telecoms",
R.drawable.ic_wizard_speakezi, 30,
new Locale[] {new Locale("EN", "za"), new Locale("AF", "za")}, false, false,
Speakezi.class));
WIZARDS_DICT.put("POZITEL", new WizardInfo("POZITEL", "Pozitel",
R.drawable.ic_wizard_pozitel, 30,
new Locale[] {new Locale("TR", "tr")}, false, false,
Pozitel.class));
WIZARDS_DICT.put("MONDOTALK", new WizardInfo("MONDOTALK", "Mondotalk",
R.drawable.ic_wizard_mondotalk, 20,
new Locale[] {new Locale("EN", "au"), new Locale("EN", "us"), new Locale("EN", "nz")}, false, false,
Mondotalk.class));
WIZARDS_DICT.put("A1", new WizardInfo("A1", "A1",
R.drawable.ic_wizard_a1, 20,
new Locale[] {new Locale("DE", "at")}, false, false,
A1.class));
WIZARDS_DICT.put("SCARLET", new WizardInfo("SCARLET", "scarlet.be",
R.drawable.ic_wizard_scarlet, 10,
new Locale[]{
locale("fr_BE"), locale("nl_BE"), locale("nl_NL")
}, false, false, Scarlet.class));
WIZARDS_DICT.put("VONO", new WizardInfo("VONO", "vono",
R.drawable.ic_wizard_vono, 10,
new Locale[] {new Locale("PT", "br")}, false, false,
Vono.class));
WIZARDS_DICT.put("OVH", new WizardInfo("OVH", "Ovh",
R.drawable.ic_wizard_ovh, 20,
new Locale[]{
Locale.FRANCE, locale("fr_BE"),
Locale.GERMANY,
Locale.UK
}, false, false,
Ovh.class));
WIZARDS_DICT.put("FAYN", new WizardInfo("FAYN", "Fayn",
R.drawable.ic_wizard_fayn, 30,
new Locale[]{
new Locale("CS", "cz"),
}, false, false,
Fayn.class));
WIZARDS_DICT.put("VIVA", new WizardInfo("VIVA", "Viva VoIP",
R.drawable.ic_wizard_viva, 30,
new Locale[]{
new Locale("EL", "gr"),
}, false, false,
Viva.class));
WIZARDS_DICT.put("SAPO", new WizardInfo("SAPO", "Sapo",
R.drawable.ic_wizard_sapo, 20,
new Locale[] {new Locale("PT", "pt")}, false, false,
Sapo.class));
WIZARDS_DICT.put("BROADVOICE", new WizardInfo("BROADVOICE", "BroadVoice",
R.drawable.ic_wizard_broadvoice, 19,
new Locale[]{Locale.US}, false, false,
BroadVoice.class));
WIZARDS_DICT.put("SIPTEL", new WizardInfo("SIPTEL", "Siptel",
R.drawable.ic_wizard_siptel, 10,
new Locale[] {new Locale("PT", "pt")}, false, false,
SiptelPt.class));
WIZARDS_DICT.put("OPTIMUS", new WizardInfo("OPTIMUS", "Optimus",
R.drawable.ic_wizard_optimus, 9,
new Locale[] {new Locale("PT", "pt")}, false, false,
Optimus.class));
WIZARDS_DICT.put("IPSHKA", new WizardInfo("IPSHKA", "IPshka",
R.drawable.ic_wizard_ipshka, 10,
new Locale[]{new Locale("UK", "ua")}, false, false,
IPshka.class));
WIZARDS_DICT.put("ZADARMA", new WizardInfo("ZADARMA", "Zadarma",
R.drawable.ic_wizard_zadarma, 10,
new Locale[]{new Locale("UK", "ua"), locale("ru_RU"), locale("cs_CZ"), locale("ro_RO"), locale("hr_HR"), locale("bg_BG"),}, false, false,
Zadarma.class));
WIZARDS_DICT.put("BLUEFACE", new WizardInfo("BLUEFACE", "Blueface",
R.drawable.ic_wizard_blueface, 19,
new Locale[]{ Locale.UK, new Locale("EN", "ie") }, false, false,
Blueface.class));
WIZARDS_DICT.put("IPCOMMS", new WizardInfo("IPCOMMS", "IPComms",
R.drawable.ic_wizard_ipcomms, 19,
new Locale[]{ Locale.US, Locale.CANADA }, false, false,
IPComms.class));
WIZARDS_DICT.put("VOIPTELIE", new WizardInfo("VOIPTELIE", "Voiptel Mobile",
R.drawable.ic_wizard_voiptelie, 20,
new Locale[]{
Locale.UK, Locale.CANADA, Locale.US, locale("en_IE"), locale("en_AU"),
locale("es_ES"), locale("es_CO") }, false, false,
VoipTel.class));
WIZARDS_DICT.put("EASYBELL", new WizardInfo("EASYBELL", "EasyBell",
R.drawable.ic_wizard_easybell, 20,
new Locale[]{ Locale.GERMANY }, false, false,
EasyBell.class));
WIZARDS_DICT.put("NETELIP", new WizardInfo("NETELIP", "NETELIP",
R.drawable.ic_wizard_netelip, 5,
new Locale[]{
new Locale("es"), new Locale("pt"), Locale.FRENCH, Locale.GERMAN, Locale.ENGLISH,
locale("bg_BG"), locale("nl_NL"), Locale.ITALY, Locale.CHINA,
new Locale("sv"), locale("da_DA"), locale("nb_NO"), locale("nn_NO"),
locale("ru_RU"), locale("tr_TR"), locale("el_GR"), locale("hu_HU"),
locale("cs_CZ"), locale("ro_RO"), locale("hr_HR"), locale("uk_UA"),
locale("ja_JP") }, false, false,
Netelip.class));
WIZARDS_DICT.put("TELSOME", new WizardInfo("TELSOME", "Telsome",
R.drawable.ic_wizard_telsome, 19,
new Locale[]{
locale("es_ES")
}, false, false,
Telsome.class));
WIZARDS_DICT.put("INNOTEL", new WizardInfo("INNOTEL", "Innotel",
R.drawable.ic_wizard_innotel, 19,
new Locale[]{
locale("hu_HU")
}, false, false,
Innotel.class));
WIZARDS_DICT.put("EUROTELEFON", new WizardInfo("EUROTELEFON", "EuroTELEFON",
R.drawable.ic_wizard_eurotelefon, 19,
new Locale[]{
new Locale("pl")
}, false, false,
EuroTelefon.class));
WIZARDS_DICT.put("ODORIK", new WizardInfo("ODORIK", "Odorik.cz",
R.drawable.ic_wizard_odorik, 19,
new Locale[]{
locale("cs_CZ"),new Locale("sk"), new Locale("sl"), locale("uk_UA")
}, false, false,
Odorik.class));
WIZARDS_DICT.put("FREEPHONELINECA", new WizardInfo("FREEPHONELINECA", "Freephoneline.ca",
R.drawable.ic_wizard_freephonelineca, 19,
new Locale[]{
Locale.CANADA
}, false, false,
FreephoneLineCa.class));
WIZARDS_DICT.put("SIPNET", new WizardInfo("SIPNET", "Sipnet",
R.drawable.ic_wizard_sipnet, 10,
new Locale[]{
new Locale("RU", "ru"), locale("ru_RU")
}, false, false,
Sipnet.class));
WIZARDS_DICT.put("CELLIP", new WizardInfo("CELLIP", "Cellip",
R.drawable.ic_wizard_cellip, 10,
new Locale[]{
new Locale("sv")
}, false, false,
Cellip.class));
WIZARDS_DICT.put("SBOHEMPEVNALINKO", new WizardInfo("SBOHEMPEVNALINKO", "sbohempevnalinko.cz",
R.drawable.ic_wizard_sbohempevnalinko, 19,
new Locale[]{
locale("cs_CZ")
}, false, false,
Sbohempevnalinko.class));
WIZARDS_DICT.put("GRADWELL", new WizardInfo("GRADWELL", "Gradwell",
R.drawable.ic_wizard_gradwell, 19,
new Locale[]{
Locale.UK
}, false, false,
Gradwell.class));
WIZARDS_DICT.put("BGTEL", new WizardInfo("BGTEL", "BG-Tel",
R.drawable.ic_wizard_bgtel, 10,
new Locale[]{ locale("bg_BG") , Locale.CANADA,
new Locale("EL", "gr"), Locale.US, Locale.GERMANY}, false, false,
BGTel.class));
WIZARDS_DICT.put("BELCENTRALE", new WizardInfo("BELCENTRALE", "Belcentrale",
R.drawable.ic_wizard_belcentrale, 20,
new Locale[]{ locale("nl_BE"), locale("nl_NL"), locale("fr_BE") }, false, false,
BelCentrale.class));
WIZARDS_DICT.put("FREECONET", new WizardInfo("FREECONET", "Freeconet",
R.drawable.ic_wizard_freeconet, 19,
new Locale[]{
new Locale("pl")
}, false, false,
Freeconet.class));
WIZARDS_DICT.put("TLENOFON", new WizardInfo("TLENOFON", "Tlenofon",
R.drawable.ic_wizard_tlenofon, 19,
new Locale[]{
new Locale("pl")
}, false, false,
Tlenofon.class));
WIZARDS_DICT.put("VANBERGSYSTEMS", new WizardInfo("VANBERGSYSTEMS", "Vanbergsystems",
R.drawable.ic_wizard_vanbergsystems, 19,
new Locale[]{
new Locale("pl")
}, false, false,
Vanbergsystems.class));
WIZARDS_DICT.put("SMARTO", new WizardInfo("SMARTO", "Smarto",
R.drawable.ic_wizard_smarto, 19,
new Locale[]{
new Locale("pl")
}, false, false,
Smarto.class));
WIZARDS_DICT.put("INTERPHONE365", new WizardInfo("INTERPHONE365", "INTERPHONE365",
R.drawable.ic_wizard_interphone365, 19,
new Locale[]{
locale("es_AR"), locale("es_ES")
}, false, false,
Interphone365.class));
WIZARDS_DICT.put("BEEZTEL", new WizardInfo("BEEZTEL", "Beeztel",
R.drawable.ic_wizard_beeztel, 19,
new Locale[]{ new Locale("es"), new Locale("en"), new Locale("pt"), new Locale("fr") }, false, false,
Beeztel.class));
WIZARDS_DICT.put("COTAS", new WizardInfo("COTAS", "Cotas Line@net",
R.drawable.ic_wizard_cotas, 19,
new Locale[]{ locale("es_CO") }, false, false,
Cotas.class));
WIZARDS_DICT.put("BALSES", new WizardInfo("BALSES", "Balses",
R.drawable.ic_wizard_balses, 19,
new Locale[]{ locale("tr_TR") }, false, false,
Balses.class));
WIZARDS_DICT.put("ZONPT", new WizardInfo("ZONPT", "Zon Phone",
R.drawable.ic_wizard_zonpt, 19,
new Locale[]{ locale("pt_PT") }, false, false,
ZonPt.class));
WIZARDS_DICT.put("ORBTALK", new WizardInfo("ORBTALK", "Orbtalk",
R.drawable.ic_wizard_orbtalk, 19,
new Locale[]{ Locale.UK, Locale.US }, false, false,
Orbtalk.class));
WIZARDS_DICT.put("HALOOCENTRALA", new WizardInfo("HALOOCENTRALA", "Ha-loo centrala",
R.drawable.ic_wizard_haloo_centrala, 19,
new Locale[]{ new Locale("CS", "cz"), }, false, false,
HalooCentrala.class));
WIZARDS_DICT.put("HALOO", new WizardInfo("HALOO", "Ha-loo",
R.drawable.ic_wizard_haloo, 19,
new Locale[]{ new Locale("CS", "cz"), }, false, false,
Haloo.class));
WIZARDS_DICT.put("VOIPBEL", new WizardInfo("VOIPBEL", "VoIPBel",
R.drawable.ic_wizard_voipbel, 19,
new Locale[]{ locale("nl_BE"), locale("nl_NL"), locale("fr_BE") }, false, false,
VoipBel.class));
WIZARDS_DICT.put("GLOBTELECOM", new WizardInfo("GLOBTELECOM", "Globtelecom",
R.drawable.ic_wizard_globtelecom, 10,
new Locale[]{locale("ru_RU"),}, false, false,
Globtelecom.class));
WIZARDS_DICT.put("CONGSTARTEL", new WizardInfo("CONGSTARTEL", "Congstar Telekom",
R.drawable.ic_wizard_congstar, 10,
new Locale[]{Locale.GERMANY}, false, false,
CongstarTelekom.class));
WIZARDS_DICT.put("CONGSTARTEL", new WizardInfo("CONGSTARTEL", "Congstar QSC",
R.drawable.ic_wizard_congstar, 10,
new Locale[]{Locale.GERMANY}, false, false,
CongstarQSC.class));
}else {
WizardInfo info = CustomDistribution.getCustomDistributionWizard();
WIZARDS_DICT.put(info.id, info);
}
initDone = true;
}
| private static void initWizards() {
WIZARDS_DICT = new HashMap<String, WizardInfo>();
WIZARDS_DICT.put("BASIC", new WizardInfo("BASIC", "Basic",
R.drawable.ic_wizard_basic, 50,
new Locale[] {}, true, false,
Basic.class));
WIZARDS_DICT.put("ADVANCED", new WizardInfo("ADVANCED", "Advanced",
R.drawable.ic_wizard_advanced, 10,
new Locale[] {}, true, false,
Advanced.class));
WIZARDS_DICT.put(WizardUtils.EXPERT_WIZARD_TAG, new WizardInfo(WizardUtils.EXPERT_WIZARD_TAG, "Expert",
R.drawable.ic_wizard_expert, 1,
new Locale[] {}, true, false,
Expert.class));
WIZARDS_DICT.put(WizardUtils.LOCAL_WIZARD_TAG, new WizardInfo(WizardUtils.LOCAL_WIZARD_TAG, "Local",
R.drawable.ic_wizard_expert, 1,
new Locale[] {}, true, false,
Local.class));
if(CustomDistribution.distributionWantsOtherProviders()) {
WIZARDS_DICT.put("EKIGA", new WizardInfo("EKIGA", "Ekiga",
R.drawable.ic_wizard_ekiga, 50,
new Locale[]{}, false, true,
Ekiga.class));
WIZARDS_DICT.put("SIP2SIP", new WizardInfo("SIP2SIP", "Sip2Sip",
R.drawable.ic_wizard_sip2sip, 10,
new Locale[]{}, false, true,
Sip2Sip.class));
WIZARDS_DICT.put("IPTEL", new WizardInfo("IPTEL", "IpTel",
R.drawable.ic_wizard_iptel, 30,
new Locale[]{}, false, true,
IpTel.class));
WIZARDS_DICT.put("SIPSORCERY", new WizardInfo("SIPSORCERY", "SIPSorcery",
R.drawable.ic_wizard_sipsorcery, 35,
new Locale[]{}, false, true,
SipSorcery.class));
WIZARDS_DICT.put("PBXES", new WizardInfo("PBXES", "Pbxes.org",
R.drawable.ic_wizard_pbxes, 20,
new Locale[]{}, false, true,
Pbxes.class));
WIZARDS_DICT.put("ECS", new WizardInfo("ECS", "Alcatel-Lucent OmniPCX Office",
R.drawable.ic_wizard_ale, 5,
new Locale[]{}, false, true,
OXO810.class));
WIZARDS_DICT.put("ITTELENET", new WizardInfo("ITTELENET", "ITTelenet",
R.drawable.ic_wizard_ittelenet, 10,
new Locale[]{}, false, true,
ITTelenet.class));
WIZARDS_DICT.put("DELTATHREE", new WizardInfo("DELTATHREE", "deltathree",
R.drawable.ic_wizard_deltathree, 35,
new Locale[]{ }, false, true,
DeltaThree.class));
WIZARDS_DICT.put("CAMUNDANET", new WizardInfo("CAMUNDANET", "CamundaNet",
R.drawable.ic_wizard_camundanet, 15,
new Locale[]{}, false, true,
CamundaNet.class));
WIZARDS_DICT.put("BETAMAX", new WizardInfo("BETAMAX", "Betamax clone",
R.drawable.ic_wizard_basic, 30,
new Locale[]{}, false, true,
Betamax.class));
WIZARDS_DICT.put("SIPCEL", new WizardInfo("SIPCEL", "SipCel Telecom",
R.drawable.ic_wizard_sipcel, 14,
new Locale[]{}, false, true,
SipCel.class));
WIZARDS_DICT.put("LOCALPHONE", new WizardInfo("LOCALPHONE", "Localphone",
R.drawable.ic_wizard_localphone, 10,
new Locale[]{ }, false, true,
Localphone.class));
WIZARDS_DICT.put("BROADSOFT", new WizardInfo("BROADSOFT", "Broadsoft",
R.drawable.ic_wizard_broadsoft, 9,
new Locale[]{ }, false, true,
Broadsoft.class));
WIZARDS_DICT.put("DVCNG", new WizardInfo("DVCNG", "DVC'NG",
R.drawable.ic_wizard_dvcng, 16,
new Locale[]{ }, false, true,
DvcNg.class));
WIZARDS_DICT.put("PFINGO", new WizardInfo("PFINGO", "Pfingo",
R.drawable.ic_wizard_pfingo, 19,
new Locale[]{ }, false, true,
Pfingo.class));
WIZARDS_DICT.put("FASTVOIP", new WizardInfo("FASTVOIP", "FastVoip",
R.drawable.ic_wizard_fastvoip, 20,
new Locale[]{ }, false, true,
FastVoip.class));
WIZARDS_DICT.put("SIPWISE", new WizardInfo("SIPWISE", "sipwise",
R.drawable.ic_wizard_sipwise, 34,
new Locale[]{ }, false, true,
SipWise.class));
WIZARDS_DICT.put("VOIPMS", new WizardInfo("VOIPMS", "VoIP.ms",
R.drawable.ic_wizard_voipms, 18,
new Locale[]{ }, false, true,
VoipMS.class));
WIZARDS_DICT.put("SONETEL", new WizardInfo("SONETEL", "Sonetel",
R.drawable.ic_wizard_sonetel, 17,
new Locale[]{ }, false, true,
Sonetel.class));
WIZARDS_DICT.put("RAPIDVOX", new WizardInfo("RAPIDVOX", "Rapidvox",
R.drawable.ic_wizard_rapidvox, 19,
new Locale[]{ }, false, true,
Rapidvox.class));
WIZARDS_DICT.put("TANSTAGI", new WizardInfo("TANSTAGI", "tanstagi",
R.drawable.ic_wizard_tanstagi, 35,
new Locale[]{ }, false, true,
Tanstagi.class));
WIZARDS_DICT.put("NYMGO", new WizardInfo("NYMGO", "Nymgo",
R.drawable.ic_wizard_nymgo, 18,
new Locale[]{ }, false, true,
Nymgo.class));
WIZARDS_DICT.put("SIPKOM", new WizardInfo("SIPKOM", "sipkom",
R.drawable.ic_wizard_sipkom, 18,
new Locale[]{ }, false, true,
Sipkom.class));
WIZARDS_DICT.put("ABCVOIP", new WizardInfo("ABCVOIP", "ABC-VoIP",
R.drawable.ic_wizard_abcvoip, 18,
new Locale[]{ }, false, true,
AbcVoip.class));
WIZARDS_DICT.put("AMIVOX", new WizardInfo("AMIVOX", "Amivox",
R.drawable.ic_wizard_amivox, 18,
new Locale[]{ }, false, true,
Amivox.class));
WIZARDS_DICT.put("CALLCENTRIC", new WizardInfo("CALLCENTRIC", "Callcentric",
R.drawable.ic_wizard_callcentric, 10,
new Locale[]{Locale.US}, false, false,
Callcentric.class));
WIZARDS_DICT.put("EUTELIA", new WizardInfo("EUTELIA", "Eutelia",
R.drawable.ic_wizard_eutelia, 30,
new Locale[]{Locale.ITALY}, false, false,
Eutelia.class));
WIZARDS_DICT.put("WIMOBILE", new WizardInfo("WIMOBILE", "WiMobile",
R.drawable.ic_wizard_wimobile, 20,
new Locale[]{Locale.ITALY}, false, false,
WiMobile.class));
WIZARDS_DICT.put("FREEPHONIE", new WizardInfo("FREEPHONIE", "Freephonie",
R.drawable.ic_wizard_freephonie, 30,
new Locale[]{Locale.FRANCE}, false, false,
Freephonie.class));
WIZARDS_DICT.put("NEUFTALK", new WizardInfo("NEUFTALK", "NeufTalk",
R.drawable.ic_wizard_neuftalk, 25,
new Locale[]{Locale.FRANCE}, false, false,
NeufTalk.class));
WIZARDS_DICT.put("IPPI", new WizardInfo("IPPI", "ippi",
R.drawable.ic_wizard_ippi, 21,
new Locale[]{ Locale.FRENCH, Locale.CANADA, Locale.US, }, false, false,
Ippi.class));
WIZARDS_DICT.put("KEYYO", new WizardInfo("KEYYO", "Keyyo",
R.drawable.ic_wizard_keyyo, 9,
new Locale[]{Locale.FRANCE}, false, false,
Keyyo.class));
WIZARDS_DICT.put("PHONZO", new WizardInfo("PHONZO", "Phonzo",
R.drawable.ic_wizard_phonzo, 10,
new Locale[]{new Locale("SE")}, false, false,
Phonzo.class));
WIZARDS_DICT.put("PLANETPHONE", new WizardInfo("PLANETPHONE", "PlanetPhone",
R.drawable.ic_wizard_planetphone, 10,
new Locale[]{ locale("bg_BG") }, false, false,
PlanetPhone.class));
WIZARDS_DICT.put("SIPGATE", new WizardInfo("SIPGATE", "Sipgate",
R.drawable.ic_wizard_sipgate, 10,
new Locale[]{Locale.US, Locale.UK, Locale.GERMANY}, false, false,
Sipgate.class));
WIZARDS_DICT.put("PENNYTEL", new WizardInfo("PENNYTEL", "Pennytel",
R.drawable.ic_wizard_pennytel, 10,
new Locale[]{ locale("en_AU") }, false, false,
Pennytel.class));
WIZARDS_DICT.put("ONSIP", new WizardInfo("ONSIP", "OnSIP",
R.drawable.ic_wizard_onsip, 30,
new Locale[]{ Locale.US}, false, false,
OnSip.class));
WIZARDS_DICT.put("BTONE", new WizardInfo("BTONE", "BlueTone",
R.drawable.ic_wizard_btone, 20,
new Locale[]{ Locale.US}, false, false,
BTone.class));
WIZARDS_DICT.put("IINET", new WizardInfo("IINET", "iinet",
R.drawable.ic_wizard_iinet, 5,
new Locale[]{new Locale("EN", "au")}, false, false,
IiNet.class));
WIZARDS_DICT.put("VPHONE", new WizardInfo("VPHONE", "VTel",
R.drawable.ic_wizard_vphone, 5,
new Locale[]{new Locale("EN", "au")}, false, false,
VPhone.class));
WIZARDS_DICT.put("UKRTEL", new WizardInfo("UKRTEL", "UkrTelecom",
R.drawable.ic_wizard_ukrtelecom, 10,
new Locale[]{new Locale("UK", "ua")}, false, false,
UkrTelecom.class));
WIZARDS_DICT.put("IP2MOBILE", new WizardInfo("IP2MOBILE", "ip2Mobile",
R.drawable.ic_wizard_ip2mobile, 10,
new Locale[]{new Locale("DK", "dk")}, false, false,
Ip2Mobile.class));
WIZARDS_DICT.put("SPEAKEZI", new WizardInfo("SPEAKEZI", "Speakezi Telecoms",
R.drawable.ic_wizard_speakezi, 30,
new Locale[] {new Locale("EN", "za"), new Locale("AF", "za")}, false, false,
Speakezi.class));
WIZARDS_DICT.put("POZITEL", new WizardInfo("POZITEL", "Pozitel",
R.drawable.ic_wizard_pozitel, 30,
new Locale[] {new Locale("TR", "tr")}, false, false,
Pozitel.class));
WIZARDS_DICT.put("MONDOTALK", new WizardInfo("MONDOTALK", "Mondotalk",
R.drawable.ic_wizard_mondotalk, 20,
new Locale[] {new Locale("EN", "au"), new Locale("EN", "us"), new Locale("EN", "nz")}, false, false,
Mondotalk.class));
WIZARDS_DICT.put("A1", new WizardInfo("A1", "A1",
R.drawable.ic_wizard_a1, 20,
new Locale[] {new Locale("DE", "at")}, false, false,
A1.class));
WIZARDS_DICT.put("SCARLET", new WizardInfo("SCARLET", "scarlet.be",
R.drawable.ic_wizard_scarlet, 10,
new Locale[]{
locale("fr_BE"), locale("nl_BE"), locale("nl_NL")
}, false, false, Scarlet.class));
WIZARDS_DICT.put("VONO", new WizardInfo("VONO", "vono",
R.drawable.ic_wizard_vono, 10,
new Locale[] {new Locale("PT", "br")}, false, false,
Vono.class));
WIZARDS_DICT.put("OVH", new WizardInfo("OVH", "Ovh",
R.drawable.ic_wizard_ovh, 20,
new Locale[]{
Locale.FRANCE, locale("fr_BE"),
Locale.GERMANY,
Locale.UK
}, false, false,
Ovh.class));
WIZARDS_DICT.put("FAYN", new WizardInfo("FAYN", "Fayn",
R.drawable.ic_wizard_fayn, 30,
new Locale[]{
new Locale("CS", "cz"),
}, false, false,
Fayn.class));
WIZARDS_DICT.put("VIVA", new WizardInfo("VIVA", "Viva VoIP",
R.drawable.ic_wizard_viva, 30,
new Locale[]{
new Locale("EL", "gr"),
}, false, false,
Viva.class));
WIZARDS_DICT.put("SAPO", new WizardInfo("SAPO", "Sapo",
R.drawable.ic_wizard_sapo, 20,
new Locale[] {new Locale("PT", "pt")}, false, false,
Sapo.class));
WIZARDS_DICT.put("BROADVOICE", new WizardInfo("BROADVOICE", "BroadVoice",
R.drawable.ic_wizard_broadvoice, 19,
new Locale[]{Locale.US}, false, false,
BroadVoice.class));
WIZARDS_DICT.put("SIPTEL", new WizardInfo("SIPTEL", "Siptel",
R.drawable.ic_wizard_siptel, 10,
new Locale[] {new Locale("PT", "pt")}, false, false,
SiptelPt.class));
WIZARDS_DICT.put("OPTIMUS", new WizardInfo("OPTIMUS", "Optimus",
R.drawable.ic_wizard_optimus, 9,
new Locale[] {new Locale("PT", "pt")}, false, false,
Optimus.class));
WIZARDS_DICT.put("IPSHKA", new WizardInfo("IPSHKA", "IPshka",
R.drawable.ic_wizard_ipshka, 10,
new Locale[]{new Locale("UK", "ua")}, false, false,
IPshka.class));
WIZARDS_DICT.put("ZADARMA", new WizardInfo("ZADARMA", "Zadarma",
R.drawable.ic_wizard_zadarma, 10,
new Locale[]{new Locale("UK", "ua"), locale("ru_RU"), locale("cs_CZ"), locale("ro_RO"), locale("hr_HR"), locale("bg_BG"),}, false, false,
Zadarma.class));
WIZARDS_DICT.put("BLUEFACE", new WizardInfo("BLUEFACE", "Blueface",
R.drawable.ic_wizard_blueface, 19,
new Locale[]{ Locale.UK, new Locale("EN", "ie") }, false, false,
Blueface.class));
WIZARDS_DICT.put("IPCOMMS", new WizardInfo("IPCOMMS", "IPComms",
R.drawable.ic_wizard_ipcomms, 19,
new Locale[]{ Locale.US, Locale.CANADA }, false, false,
IPComms.class));
WIZARDS_DICT.put("VOIPTELIE", new WizardInfo("VOIPTELIE", "Voiptel Mobile",
R.drawable.ic_wizard_voiptelie, 20,
new Locale[]{
Locale.UK, Locale.CANADA, Locale.US, locale("en_IE"), locale("en_AU"),
locale("es_ES"), locale("es_CO") }, false, false,
VoipTel.class));
WIZARDS_DICT.put("EASYBELL", new WizardInfo("EASYBELL", "EasyBell",
R.drawable.ic_wizard_easybell, 20,
new Locale[]{ Locale.GERMANY }, false, false,
EasyBell.class));
WIZARDS_DICT.put("NETELIP", new WizardInfo("NETELIP", "NETELIP",
R.drawable.ic_wizard_netelip, 5,
new Locale[]{
new Locale("es"), new Locale("pt"), Locale.FRENCH, Locale.GERMAN, Locale.ENGLISH,
locale("bg_BG"), locale("nl_NL"), Locale.ITALY, Locale.CHINA,
new Locale("sv"), locale("da_DA"), locale("nb_NO"), locale("nn_NO"),
locale("ru_RU"), locale("tr_TR"), locale("el_GR"), locale("hu_HU"),
locale("cs_CZ"), locale("ro_RO"), locale("hr_HR"), locale("uk_UA"),
locale("ja_JP") }, false, false,
Netelip.class));
WIZARDS_DICT.put("TELSOME", new WizardInfo("TELSOME", "Telsome",
R.drawable.ic_wizard_telsome, 19,
new Locale[]{
locale("es_ES")
}, false, false,
Telsome.class));
WIZARDS_DICT.put("INNOTEL", new WizardInfo("INNOTEL", "Innotel",
R.drawable.ic_wizard_innotel, 19,
new Locale[]{
locale("hu_HU")
}, false, false,
Innotel.class));
WIZARDS_DICT.put("EUROTELEFON", new WizardInfo("EUROTELEFON", "EuroTELEFON",
R.drawable.ic_wizard_eurotelefon, 19,
new Locale[]{
new Locale("pl")
}, false, false,
EuroTelefon.class));
WIZARDS_DICT.put("ODORIK", new WizardInfo("ODORIK", "Odorik.cz",
R.drawable.ic_wizard_odorik, 19,
new Locale[]{
locale("cs_CZ"),new Locale("sk"), new Locale("sl"), locale("uk_UA")
}, false, false,
Odorik.class));
WIZARDS_DICT.put("FREEPHONELINECA", new WizardInfo("FREEPHONELINECA", "Freephoneline.ca",
R.drawable.ic_wizard_freephonelineca, 19,
new Locale[]{
Locale.CANADA
}, false, false,
FreephoneLineCa.class));
WIZARDS_DICT.put("SIPNET", new WizardInfo("SIPNET", "Sipnet",
R.drawable.ic_wizard_sipnet, 10,
new Locale[]{
new Locale("RU", "ru"), locale("ru_RU")
}, false, false,
Sipnet.class));
WIZARDS_DICT.put("CELLIP", new WizardInfo("CELLIP", "Cellip",
R.drawable.ic_wizard_cellip, 10,
new Locale[]{
new Locale("sv")
}, false, false,
Cellip.class));
WIZARDS_DICT.put("SBOHEMPEVNALINKO", new WizardInfo("SBOHEMPEVNALINKO", "sbohempevnalinko.cz",
R.drawable.ic_wizard_sbohempevnalinko, 19,
new Locale[]{
locale("cs_CZ")
}, false, false,
Sbohempevnalinko.class));
WIZARDS_DICT.put("GRADWELL", new WizardInfo("GRADWELL", "Gradwell",
R.drawable.ic_wizard_gradwell, 19,
new Locale[]{
Locale.UK
}, false, false,
Gradwell.class));
WIZARDS_DICT.put("BGTEL", new WizardInfo("BGTEL", "BG-Tel",
R.drawable.ic_wizard_bgtel, 10,
new Locale[]{ locale("bg_BG") , Locale.CANADA,
new Locale("EL", "gr"), Locale.US, Locale.GERMANY}, false, false,
BGTel.class));
WIZARDS_DICT.put("BELCENTRALE", new WizardInfo("BELCENTRALE", "Belcentrale",
R.drawable.ic_wizard_belcentrale, 20,
new Locale[]{ locale("nl_BE"), locale("nl_NL"), locale("fr_BE") }, false, false,
BelCentrale.class));
WIZARDS_DICT.put("FREECONET", new WizardInfo("FREECONET", "Freeconet",
R.drawable.ic_wizard_freeconet, 19,
new Locale[]{
new Locale("pl")
}, false, false,
Freeconet.class));
WIZARDS_DICT.put("TLENOFON", new WizardInfo("TLENOFON", "Tlenofon",
R.drawable.ic_wizard_tlenofon, 19,
new Locale[]{
new Locale("pl")
}, false, false,
Tlenofon.class));
WIZARDS_DICT.put("VANBERGSYSTEMS", new WizardInfo("VANBERGSYSTEMS", "Vanbergsystems",
R.drawable.ic_wizard_vanbergsystems, 19,
new Locale[]{
new Locale("pl")
}, false, false,
Vanbergsystems.class));
WIZARDS_DICT.put("SMARTO", new WizardInfo("SMARTO", "Smarto",
R.drawable.ic_wizard_smarto, 19,
new Locale[]{
new Locale("pl")
}, false, false,
Smarto.class));
WIZARDS_DICT.put("INTERPHONE365", new WizardInfo("INTERPHONE365", "INTERPHONE365",
R.drawable.ic_wizard_interphone365, 19,
new Locale[]{
locale("es_AR"), locale("es_ES")
}, false, false,
Interphone365.class));
WIZARDS_DICT.put("BEEZTEL", new WizardInfo("BEEZTEL", "Beeztel",
R.drawable.ic_wizard_beeztel, 19,
new Locale[]{ new Locale("es"), new Locale("en"), new Locale("pt"), new Locale("fr") }, false, false,
Beeztel.class));
WIZARDS_DICT.put("COTAS", new WizardInfo("COTAS", "Cotas Line@net",
R.drawable.ic_wizard_cotas, 19,
new Locale[]{ locale("es_CO") }, false, false,
Cotas.class));
WIZARDS_DICT.put("BALSES", new WizardInfo("BALSES", "Balses",
R.drawable.ic_wizard_balses, 19,
new Locale[]{ locale("tr_TR") }, false, false,
Balses.class));
WIZARDS_DICT.put("ZONPT", new WizardInfo("ZONPT", "Zon Phone",
R.drawable.ic_wizard_zonpt, 19,
new Locale[]{ locale("pt_PT") }, false, false,
ZonPt.class));
WIZARDS_DICT.put("ORBTALK", new WizardInfo("ORBTALK", "Orbtalk",
R.drawable.ic_wizard_orbtalk, 19,
new Locale[]{ Locale.UK, Locale.US }, false, false,
Orbtalk.class));
WIZARDS_DICT.put("HALOOCENTRALA", new WizardInfo("HALOOCENTRALA", "Ha-loo centrala",
R.drawable.ic_wizard_haloo_centrala, 19,
new Locale[]{ new Locale("CS", "cz"), }, false, false,
HalooCentrala.class));
WIZARDS_DICT.put("HALOO", new WizardInfo("HALOO", "Ha-loo",
R.drawable.ic_wizard_haloo, 19,
new Locale[]{ new Locale("CS", "cz"), }, false, false,
Haloo.class));
WIZARDS_DICT.put("VOIPBEL", new WizardInfo("VOIPBEL", "VoIPBel",
R.drawable.ic_wizard_voipbel, 19,
new Locale[]{ locale("nl_BE"), locale("nl_NL"), locale("fr_BE") }, false, false,
VoipBel.class));
WIZARDS_DICT.put("GLOBTELECOM", new WizardInfo("GLOBTELECOM", "Globtelecom",
R.drawable.ic_wizard_globtelecom, 10,
new Locale[]{locale("ru_RU"),}, false, false,
Globtelecom.class));
WIZARDS_DICT.put("CONGSTARTEL", new WizardInfo("CONGSTARTEL", "Congstar Telekom",
R.drawable.ic_wizard_congstar, 10,
new Locale[]{Locale.GERMANY}, false, false,
CongstarTelekom.class));
WIZARDS_DICT.put("CONGSTARQSC", new WizardInfo("CONGSTARQSC", "Congstar QSC",
R.drawable.ic_wizard_congstar, 10,
new Locale[]{Locale.GERMANY}, false, false,
CongstarQSC.class));
}else {
WizardInfo info = CustomDistribution.getCustomDistributionWizard();
WIZARDS_DICT.put(info.id, info);
}
initDone = true;
}
|
public static JavaArchive createDeployment() {
final JavaArchive archive = ShrinkWrap.create(JavaArchive.class)
.addPackages(
true,
"junit",
"org.junit",
"org.hamcrest",
Arquillian.class.getPackage().getName())
.addPackages(true, GenericDao.class.getPackage())
.addPackages(true, PersistentEntity.class.getPackage())
.addAsManifestResource("test-persistence.xml", "persistence.xml")
.addAsManifestResource("arquillian-ds.xml")
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
System.out.println(archive.toString());
System.out.println(archive.getContent());
return archive;
}
| public static JavaArchive createDeployment() {
final JavaArchive archive = ShrinkWrap.create(JavaArchive.class)
.addPackages(
true,
"junit",
"org.junit",
"org.hamcrest",
Arquillian.class.getPackage().getName())
.addPackages(true, GenericDao.class.getPackage())
.addPackages(true, PersistentEntity.class.getPackage())
.addAsManifestResource("test-persistence.xml", "persistence.xml")
.addAsResource("arquillian-ds.xml")
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
System.out.println(archive.toString());
System.out.println(archive.getContent());
return archive;
}
|
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_main_web);
new RestaurantInfoTask().execute("http://18.238.2.68/cuisinestream/phonedata.cgi?user=jes&location=42.358506+-71.060142&radius=2000");
LinearLayout layout = (LinearLayout)findViewById(R.id.layout);
Resources res = getResources();
ImageView banner = (ImageView)findViewById(R.id.bannerSpace);
banner.setImageDrawable(res.getDrawable(R.drawable.csbanner));
seekbar = (SeekBar)findViewById(R.id.distanceSlide);
txt = (TextView)findViewById(R.id.radius);
txt.setText("Set search radius: 100 ft");
seekbar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
@Override
public void onProgressChanged(SeekBar seekBar, int prog,
boolean fromUser) {
String st="you fucked up";
if (prog<=2) {st = "100 ft";}
else if (prog>2 && prog<=4) {st = "200 ft";}
else if (prog>4 && prog<=6) {st = "350 ft";}
else if (prog>6 && prog<=8) {st = "500 ft";}
else if (prog>8 && prog<=10) {st = ".1 mile";}
else if (prog>10 && prog<=15) {st = ".25 mile";}
else if (prog>15 && prog<=20) {st = ".5 mile";}
else if (prog>15 && prog<=25) {st = ".75 mile";}
else if (prog>25 && prog<=30) {st = "1 mile";}
else if (prog>30 && prog<=40) {st = "1.5 miles";}
else if (prog>40 && prog<=50) {st = "2 miles";}
else if (prog>50 && prog<=60) {st = "2.5 miles";}
else if (prog>60 && prog<=72) {st = "3 miles";}
else if (prog>72 && prog<=85) {st = "4 miles";}
else {st = "5 miles";}
txt.setText("Set search radius: "+st);
}
});
ScrollView nearbyRestaurants = (ScrollView)findViewById(R.id.nearbyRestaurants);
LinearLayout restaurantsFrame = new LinearLayout(this);
restaurantsFrame.setOrientation(1);
View parent = (View) restaurantsFrame.getParent();
Log.d("find error", "resFrame parent: "+parent);
nearbyRestaurants.addView(restaurantsFrame);
layout.addView(nearbyRestaurants);
final int PREVIEW_HEIGHT = 200;
LinearLayout.LayoutParams hp = new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, PREVIEW_HEIGHT);
LinearLayout[] imgFramesList = new LinearLayout[testData.length];
for (int i=0; i<testData.length; i++) {
HorizontalScrollView restaurant = new HorizontalScrollView(this);
restaurant.setLayoutParams(hp);
restaurant.setClickable(true);
restaurant.setOnClickListener(new Button.OnClickListener() {
@Override
public void onClick(View v) {
Intent toPage = new Intent(MainWebActivity.this, GalleryActivity.class);
toPage.putExtra("tester", "message");
startActivity(toPage);
}
});
restaurantsFrame.addView(restaurant);
imgFramesList[i] = new LinearLayout(this);
restaurant.addView(imgFramesList[i]);
}
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(200, 200);
for (int i=0; i<testData[0].length; i++) {
ImageView fillin = new ImageView(this);
fillin.setLayoutParams(lp);
imgFramesList[0].addView(fillin);
new BitmapWorkerTask(fillin).execute(testData[0][i]);
}
for (int i=0; i<testData[1].length; i++) {
ImageView fillin = new ImageView(this);
fillin.setLayoutParams(lp);
imgFramesList[1].addView(fillin);
new BitmapWorkerTask(fillin).execute(testData[1][i]);
}
final int maxMemory = (int)(Runtime.getRuntime().maxMemory() / 1024);
final int cacheSize = maxMemory / 8;
mMemoryCache = new LruCache<String, Bitmap>(cacheSize) {
@Override
protected int sizeOf(String key, Bitmap bitmap) {
return bitmap.getByteCount() / 1024;
}
};
}
| protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_main_web);
new RestaurantInfoTask().execute("http://18.238.2.68/cuisinestream/phonedata.cgi?user=jes&location=42.358506+-71.060142&radius=2000");
LinearLayout layout = (LinearLayout)findViewById(R.id.layout);
Resources res = getResources();
ImageView banner = (ImageView)findViewById(R.id.bannerSpace);
banner.setImageDrawable(res.getDrawable(R.drawable.csbanner));
seekbar = (SeekBar)findViewById(R.id.distanceSlide);
txt = (TextView)findViewById(R.id.radius);
txt.setText("Set search radius: 100 ft");
seekbar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
@Override
public void onProgressChanged(SeekBar seekBar, int prog,
boolean fromUser) {
String st="you fucked up";
if (prog<=2) {st = "100 ft";}
else if (prog>2 && prog<=4) {st = "200 ft";}
else if (prog>4 && prog<=6) {st = "350 ft";}
else if (prog>6 && prog<=8) {st = "500 ft";}
else if (prog>8 && prog<=10) {st = ".1 mile";}
else if (prog>10 && prog<=15) {st = ".25 mile";}
else if (prog>15 && prog<=20) {st = ".5 mile";}
else if (prog>15 && prog<=25) {st = ".75 mile";}
else if (prog>25 && prog<=30) {st = "1 mile";}
else if (prog>30 && prog<=40) {st = "1.5 miles";}
else if (prog>40 && prog<=50) {st = "2 miles";}
else if (prog>50 && prog<=60) {st = "2.5 miles";}
else if (prog>60 && prog<=72) {st = "3 miles";}
else if (prog>72 && prog<=85) {st = "4 miles";}
else {st = "5 miles";}
txt.setText("Set search radius: "+st);
}
});
ScrollView nearbyRestaurants = (ScrollView)findViewById(R.id.nearbyRestaurants);
LinearLayout restaurantsFrame = new LinearLayout(this);
restaurantsFrame.setOrientation(1);
View parent = (View) restaurantsFrame.getParent();
Log.d("find error", "resFrame parent: "+parent);
nearbyRestaurants.addView(restaurantsFrame);
final int PREVIEW_HEIGHT = 200;
LinearLayout.LayoutParams hp = new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, PREVIEW_HEIGHT);
LinearLayout[] imgFramesList = new LinearLayout[testData.length];
for (int i=0; i<testData.length; i++) {
HorizontalScrollView restaurant = new HorizontalScrollView(this);
restaurant.setLayoutParams(hp);
restaurant.setClickable(true);
restaurant.setOnClickListener(new Button.OnClickListener() {
@Override
public void onClick(View v) {
Intent toPage = new Intent(MainWebActivity.this, GalleryActivity.class);
toPage.putExtra("tester", "message");
startActivity(toPage);
}
});
restaurantsFrame.addView(restaurant);
imgFramesList[i] = new LinearLayout(this);
restaurant.addView(imgFramesList[i]);
}
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(200, 200);
for (int i=0; i<testData[0].length; i++) {
ImageView fillin = new ImageView(this);
fillin.setLayoutParams(lp);
imgFramesList[0].addView(fillin);
new BitmapWorkerTask(fillin).execute(testData[0][i]);
}
for (int i=0; i<testData[1].length; i++) {
ImageView fillin = new ImageView(this);
fillin.setLayoutParams(lp);
imgFramesList[1].addView(fillin);
new BitmapWorkerTask(fillin).execute(testData[1][i]);
}
final int maxMemory = (int)(Runtime.getRuntime().maxMemory() / 1024);
final int cacheSize = maxMemory / 8;
mMemoryCache = new LruCache<String, Bitmap>(cacheSize) {
@Override
protected int sizeOf(String key, Bitmap bitmap) {
return bitmap.getByteCount() / 1024;
}
};
}
|
public String formatBinary(byte[] bytes) {
StringBuffer sb = new StringBuffer();
sb.append("decode('");
appendBytesInHex(sb, bytes);
sb.append("', 'hex')");
return sb.toString();
}
| public String formatBinary(byte[] bytes) {
StringBuffer sb = new StringBuffer();
sb.append("E'\\\\x");
appendBytesInHex(sb, bytes);
sb.append("'");
return sb.toString();
}
|
public SubmitJob(byte[] pktdata)
{
super(pktdata);
taskName = new AtomicReference<String>();
uniqueId = new AtomicReference<String>();
epochString = new AtomicReference<String>();
int pOff = 0;
pOff = parseString(pOff, taskName);
pOff = parseString(pOff, uniqueId);
if (this.type == PacketType.SUBMIT_JOB_EPOCH)
{
pOff = parseString(pOff, epochString);
}
if (this.type == PacketType.SUBMIT_JOB_HIGH_BG ||
this.type == PacketType.SUBMIT_JOB_LOW_BG ||
this.type == PacketType.SUBMIT_JOB_BG ||
this.type == PacketType.SUBMIT_JOB_EPOCH)
{
this.background = true;
}
data = Arrays.copyOfRange(pktdata, pOff, pktdata.length);
}
| public SubmitJob(byte[] pktdata)
{
super(pktdata);
taskName = new AtomicReference<String>();
uniqueId = new AtomicReference<String>();
epochString = new AtomicReference<String>();
int pOff = 0;
pOff = parseString(pOff, taskName);
pOff = parseString(pOff, uniqueId);
if (this.type == PacketType.SUBMIT_JOB_EPOCH)
{
pOff = parseString(pOff, epochString);
}
if (this.type == PacketType.SUBMIT_JOB_HIGH_BG ||
this.type == PacketType.SUBMIT_JOB_LOW_BG ||
this.type == PacketType.SUBMIT_JOB_BG ||
this.type == PacketType.SUBMIT_JOB_EPOCH)
{
this.background = true;
}
data = Arrays.copyOfRange(rawdata, pOff, rawdata.length);
}
|
public void run() throws Exception {
super.run();
logger.info("Starting download in TASK " + fileURL);
HttpMethod method = getGetMethod(fileURL);
if (makeRedirectedRequest(method)) {
String contentAsString = getContentAsString();
checkProblems();
checkNameAndSize(contentAsString);
Matcher matcher = getMatcherAgainstContent("\"location.href\\s=\\s'(.+)';\"");
if (!matcher.find()) {
throw new PluginImplementationException("Cannot find link on first page");
}
method = getMethodBuilder().setReferer(fileURL).setAction(matcher.group(1)).toGetMethod();
if (!makeRedirectedRequest(method)) {
throw new ServiceConnectionProblemException();
}
method = getMethodBuilder().setReferer("").setAction(PlugUtils.getStringBetween(getContentAsString(), "<font size=\"+1\"><a href=", ">")).toHttpMethod();
if (!makeRedirectedRequest(method)) {
throw new ServiceConnectionProblemException();
}
method = getMethodBuilder().setReferer("").setActionFromTextBetween("<frame id=\"f_top\" name = \"f_top\" src=\"", "\"").setBaseURL("http://ints.ifolder.ru/").toHttpMethod();
if (!makeRedirectedRequest(method)) {
throw new ServiceConnectionProblemException();
}
int delay = PlugUtils.getWaitTimeBetween(getContentAsString(), "var delay = ", ";", TimeUnit.SECONDS);
downloadTask.sleep(delay);
method = new GetMethodNoStatus("http://ints.ifolder.ru" + method.getPath() + "?" + method.getQueryString());
if (!makeRedirectedRequest(method)) {
throw new ServiceConnectionProblemException();
}
do {
CaptchaSupport captchaSupport = getCaptchaSupport();
String s = getMethodBuilder().setActionFromImgSrcWhereTagContains("src=\"/random/").getAction();
s = "http://ints.ifolder.ru" + s;
logger.info("Captcha URL " + s);
String interstitials_session = PlugUtils.getStringBetween(getContentAsString(), "if(tag){tag.value = \"", "\"");
String captchaR = captchaSupport.getCaptcha(s);
if (captchaR == null) {
throw new CaptchaEntryInputMismatchException();
}
method = getMethodBuilder().setReferer("").setActionFromFormByName("form1", true).setParameter("confirmed_number", captchaR).setParameter("interstitials_session", interstitials_session).setBaseURL("http://ints.ifolder.ru/ints/frame/").toHttpMethod();
if (!makeRedirectedRequest(method)) {
throw new ServiceConnectionProblemException();
}
} while (getContentAsString().contains("name=\"confirmed_number\""));
downloadTask.sleep(5);
final HttpMethod method6 = getMethodBuilder().setReferer("").setActionFromAHrefWhereATagContains("download").toHttpMethod();
if (!tryDownloadAndSaveFile(method6)) {
logger.warning(getContentAsString());
throw new PluginImplementationException();
}
} else {
checkProblems();
throw new ServiceConnectionProblemException();
}
}
| public void run() throws Exception {
super.run();
logger.info("Starting download in TASK " + fileURL);
HttpMethod method = getGetMethod(fileURL);
if (makeRedirectedRequest(method)) {
String contentAsString = getContentAsString();
checkProblems();
checkNameAndSize(contentAsString);
Matcher matcher = getMatcherAgainstContent("\"location.href\\s*=\\s*'(.+)';\"");
if (!matcher.find()) {
matcher = getMatcherAgainstContent("<a\\s*href\\s*=\\s*\"(.+/ints/.+)\"");
if (!matcher.find()) {
throw new PluginImplementationException("Cannot find link on first page");
}
}
method = getMethodBuilder().setReferer(fileURL).setAction(matcher.group(1)).toGetMethod();
if (!makeRedirectedRequest(method)) {
throw new ServiceConnectionProblemException();
}
method = getMethodBuilder().setReferer("").setAction(PlugUtils.getStringBetween(getContentAsString(), "<font size=\"+1\"><a href=", ">")).toHttpMethod();
if (!makeRedirectedRequest(method)) {
throw new ServiceConnectionProblemException();
}
method = getMethodBuilder().setReferer("").setActionFromTextBetween("<frame id=\"f_top\" name = \"f_top\" src=\"", "\"").setBaseURL("http://ints.ifolder.ru/").toHttpMethod();
if (!makeRedirectedRequest(method)) {
throw new ServiceConnectionProblemException();
}
int delay = PlugUtils.getWaitTimeBetween(getContentAsString(), "var delay = ", ";", TimeUnit.SECONDS);
downloadTask.sleep(delay);
method = new GetMethodNoStatus("http://ints.ifolder.ru" + method.getPath() + "?" + method.getQueryString());
if (!makeRedirectedRequest(method)) {
throw new ServiceConnectionProblemException();
}
do {
CaptchaSupport captchaSupport = getCaptchaSupport();
String s = getMethodBuilder().setActionFromImgSrcWhereTagContains("src=\"/random/").getAction();
s = "http://ints.ifolder.ru" + s;
logger.info("Captcha URL " + s);
String interstitials_session = PlugUtils.getStringBetween(getContentAsString(), "if(tag){tag.value = \"", "\"");
String captchaR = captchaSupport.getCaptcha(s);
if (captchaR == null) {
throw new CaptchaEntryInputMismatchException();
}
method = getMethodBuilder().setReferer("").setActionFromFormByName("form1", true).setParameter("confirmed_number", captchaR).setParameter("interstitials_session", interstitials_session).setBaseURL("http://ints.ifolder.ru/ints/frame/").toHttpMethod();
if (!makeRedirectedRequest(method)) {
throw new ServiceConnectionProblemException();
}
} while (getContentAsString().contains("name=\"confirmed_number\""));
downloadTask.sleep(5);
final HttpMethod method6 = getMethodBuilder().setReferer("").setActionFromAHrefWhereATagContains("download").toHttpMethod();
if (!tryDownloadAndSaveFile(method6)) {
logger.warning(getContentAsString());
throw new PluginImplementationException();
}
} else {
checkProblems();
throw new ServiceConnectionProblemException();
}
}
|
public Url notifyChildClosed(final WebProcess subProcess) {
if (subProcess.getClass().equals(PaylineProcess.class)) {
final PaylineProcess subPro = (PaylineProcess) subProcess;
if (subPro.isSuccessful()) {
return new AccountPageUrl();
}
unlock();
return new AccountPageUrl();
}
return null;
}
| public Url notifyChildClosed(final WebProcess subProcess) {
if (subProcess.getClass().equals(PaylineProcess.class)) {
final PaylineProcess subPro = (PaylineProcess) subProcess;
if (subPro.isSuccessful()) {
return new AccountPageUrl();
}
unlock();
return new AccountChargingPageUrl(this);
}
return null;
}
|
public void testExecute() throws Exception {
final File libDir = new File(tempDir, "lib");
if (!libDir.exists() && !libDir.mkdirs()) {
throw new IOException("Failed to create directory " + libDir);
}
final Integrator i = new Integrator();
i.setDitaDir(tempDir);
i.setProperties(new File(tempDir, "integrator.properties"));
i.execute();
assertEquals(getProperties(new File(expDir, "lib" + File.separator + Integrator.class.getPackage().getName() + File.separator + Constants.GEN_CONF_PROPERTIES)),
getProperties(new File(tempDir, "lib" + File.separator + Integrator.class.getPackage().getName() + File.separator + Constants.GEN_CONF_PROPERTIES)));
TestUtils.resetXMLUnit();
XMLUnit.setNormalizeWhitespace(true);
XMLUnit.setIgnoreWhitespace(true);
XMLUnit.setIgnoreDiffBetweenTextAndCDATA(true);
assertXMLEqual(new InputSource(new File(expDir, "build.xml").toURI().toString()),
new InputSource(new File(tempDir, "build.xml").toURI().toString()));
assertXMLEqual(new InputSource(new File(expDir, "catalog.xml").toURI().toString()),
new InputSource(new File(tempDir, "catalog.xml").toURI().toString()));
assertXMLEqual(new InputSource(new File(expDir, "xsl" + File.separator + "shell.xsl").toURI().toString()),
new InputSource(new File(tempDir, "xsl" + File.separator + "shell.xsl").toURI().toString()));
assertXMLEqual(new InputSource(new File(expDir, "xsl" + File.separator + "common" + File.separator + "allstrings.xml").toURI().toString()),
new InputSource(new File(tempDir, "xsl" + File.separator + "common" + File.separator + "allstrings.xml").toURI().toString()));
assertXMLEqual(new InputSource(new File(expDir, "plugins" + File.separator + "dummy" + File.separator + "xsl" + File.separator + "shell.xsl").toURI().toString()),
new InputSource(new File(tempDir, "plugins" + File.separator + "dummy" + File.separator + "xsl" + File.separator + "shell.xsl").toURI().toString()));
}
| public void testExecute() throws Exception {
final File libDir = new File(tempDir, "lib");
if (!libDir.exists() && !libDir.mkdirs()) {
throw new IOException("Failed to create directory " + libDir);
}
final Integrator i = new Integrator();
i.setDitaDir(tempDir);
i.setProperties(new File(tempDir, "integrator.properties"));
i.execute();
final Properties expProperties = getProperties(new File(expDir, "lib" + File.separator + Integrator.class.getPackage().getName() + File.separator + Constants.GEN_CONF_PROPERTIES));
expProperties.setProperty("dita.plugin.base.dir", new File(tempDir, "plugins" + File.separator + "base").getAbsolutePath());
expProperties.setProperty("dita.plugin.dummy.dir", new File(tempDir, "plugins" + File.separator + "dummy").getAbsolutePath());
assertEquals(expProperties,
getProperties(new File(tempDir, "lib" + File.separator + Integrator.class.getPackage().getName() + File.separator + Constants.GEN_CONF_PROPERTIES)));
TestUtils.resetXMLUnit();
XMLUnit.setNormalizeWhitespace(true);
XMLUnit.setIgnoreWhitespace(true);
XMLUnit.setIgnoreDiffBetweenTextAndCDATA(true);
assertXMLEqual(new InputSource(new File(expDir, "build.xml").toURI().toString()),
new InputSource(new File(tempDir, "build.xml").toURI().toString()));
assertXMLEqual(new InputSource(new File(expDir, "catalog.xml").toURI().toString()),
new InputSource(new File(tempDir, "catalog.xml").toURI().toString()));
assertXMLEqual(new InputSource(new File(expDir, "xsl" + File.separator + "shell.xsl").toURI().toString()),
new InputSource(new File(tempDir, "xsl" + File.separator + "shell.xsl").toURI().toString()));
assertXMLEqual(new InputSource(new File(expDir, "xsl" + File.separator + "common" + File.separator + "allstrings.xml").toURI().toString()),
new InputSource(new File(tempDir, "xsl" + File.separator + "common" + File.separator + "allstrings.xml").toURI().toString()));
assertXMLEqual(new InputSource(new File(expDir, "plugins" + File.separator + "dummy" + File.separator + "xsl" + File.separator + "shell.xsl").toURI().toString()),
new InputSource(new File(tempDir, "plugins" + File.separator + "dummy" + File.separator + "xsl" + File.separator + "shell.xsl").toURI().toString()));
}
|
public static List<AssetId> getAssetRelationTreeParents(ICS ics, Log log, AssetId child, String expectedParentType,
String associationName) {
FTValList vl = new FTValList();
vl.setValString("ftcmd", "findnode");
vl.setValString("treename", "AssetRelationTree");
vl.setValString("where", "oid");
vl.setValString("oid", Long.toString(child.getId()));
if (ics.TreeManager(vl)) {
int errno = ics.GetErrno();
if (errno < 0) {
switch (errno) {
case -111:
log.trace("Node not found in AssetRelationTree for asset " + child);
return Collections.emptyList();
default: {
throw new CSRuntimeException("Failed to look up asset " + child + " in AssetRelationTree.",
errno);
}
}
}
IList art = ics.GetList("AssetRelationTree");
ics.RegisterList("AssetRelationTree", null);
List<AssetId> parents = new ArrayList<AssetId>();
if (art == null || !art.hasData() || art.numRows() == 0) {
if (log != null && log.isTraceEnabled()) {
log.trace("Failed to locate " + child + " in AssetRelationTree.");
}
} else {
List<String> childNodeIds = new ArrayList<String>();
for (IList row : new IterableIListWrapper(art)) {
if (child.getType().equals(getStringValue(row, "otype"))) {
String nid = getStringValue(row, "nid");
String ncode = getStringValue(row, "ncode");
if (log != null && log.isTraceEnabled()) {
log.trace("Found " + child + " in AssetRelationTree. Node ID: " + nid + ", ncode: "
+ ncode + ", expecting ncode: " + associationName);
}
if (associationName.equals(ncode)) {
childNodeIds.add(getStringValue(row, "nid"));
}
}
}
for (String nid : childNodeIds) {
vl.clear();
vl.setValString("ftcmd", "getparent");
vl.setValString("treename", "AssetRelationTree");
vl.setValString("node", nid);
if (ics.TreeManager(vl) && ics.GetErrno() >= 0) {
art = ics.GetList("AssetRelationTree");
ics.RegisterList("AssetRelationTree", null);
AssetId parent = new AssetIdImpl(getStringValue(art, "otype"), Long.valueOf(getStringValue(art,
"oid")));
if (log != null && log.isTraceEnabled()) {
log.trace(child + " in AssetRelationTree has a parent " + parent);
}
if (expectedParentType == null) {
parents.add(parent);
} else {
if (expectedParentType.equals(parent.getType())) {
parents.add(parent);
} else {
if (log != null && log.isDebugEnabled()) {
log.debug("Parent " + parent + " is not of the expected type ("
+ expectedParentType
+ ") so it is being excluded from the return list for child: " + child);
}
}
}
} else {
throw new CSRuntimeException("Failed to look up parent of article " + child
+ " in AssetRelationTree. TreeManager call failed unexpectedly", ics.GetErrno());
}
}
}
return parents;
} else {
throw new CSRuntimeException("Failed to look up article " + child
+ " in AssetRelationTree. TreeManager call failed unexpectedly", ics.GetErrno());
}
}
| public static List<AssetId> getAssetRelationTreeParents(ICS ics, Log log, AssetId child, String expectedParentType,
String associationName) {
FTValList vl = new FTValList();
vl.setValString("ftcmd", "findnode");
vl.setValString("treename", "AssetRelationTree");
vl.setValString("where", "oid");
vl.setValString("oid", Long.toString(child.getId()));
if (ics.TreeManager(vl)) {
int errno = ics.GetErrno();
if (errno < 0) {
switch (errno) {
case -111:
if (log != null && log.isTraceEnabled()) {
log.trace("Node not found in AssetRelationTree for asset " + child);
}
return Collections.emptyList();
default: {
throw new CSRuntimeException("Failed to look up asset " + child + " in AssetRelationTree.",
errno);
}
}
}
IList art = ics.GetList("AssetRelationTree");
ics.RegisterList("AssetRelationTree", null);
List<AssetId> parents = new ArrayList<AssetId>();
if (art == null || !art.hasData() || art.numRows() == 0) {
if (log != null && log.isTraceEnabled()) {
log.trace("Failed to locate " + child + " in AssetRelationTree.");
}
} else {
List<String> childNodeIds = new ArrayList<String>();
for (IList row : new IterableIListWrapper(art)) {
if (child.getType().equals(getStringValue(row, "otype"))) {
String nid = getStringValue(row, "nid");
String ncode = getStringValue(row, "ncode");
if (log != null && log.isTraceEnabled()) {
log.trace("Found " + child + " in AssetRelationTree. Node ID: " + nid + ", ncode: "
+ ncode + ", expecting ncode: " + associationName);
}
if (associationName.equals(ncode)) {
childNodeIds.add(getStringValue(row, "nid"));
}
}
}
for (String nid : childNodeIds) {
vl.clear();
vl.setValString("ftcmd", "getparent");
vl.setValString("treename", "AssetRelationTree");
vl.setValString("node", nid);
if (ics.TreeManager(vl) && ics.GetErrno() >= 0) {
art = ics.GetList("AssetRelationTree");
ics.RegisterList("AssetRelationTree", null);
AssetId parent = new AssetIdImpl(getStringValue(art, "otype"), Long.valueOf(getStringValue(art,
"oid")));
if (log != null && log.isTraceEnabled()) {
log.trace(child + " in AssetRelationTree has a parent " + parent);
}
if (expectedParentType == null) {
parents.add(parent);
} else {
if (expectedParentType.equals(parent.getType())) {
parents.add(parent);
} else {
if (log != null && log.isDebugEnabled()) {
log.debug("Parent " + parent + " is not of the expected type ("
+ expectedParentType
+ ") so it is being excluded from the return list for child: " + child);
}
}
}
} else {
throw new CSRuntimeException("Failed to look up parent of article " + child
+ " in AssetRelationTree. TreeManager call failed unexpectedly", ics.GetErrno());
}
}
}
return parents;
} else {
throw new CSRuntimeException("Failed to look up article " + child
+ " in AssetRelationTree. TreeManager call failed unexpectedly", ics.GetErrno());
}
}
|
public static Map<ISOKey, AdminLevelSet> parseDublinCoreCoverageString(
final String dcCoverageString) {
final Map<ISOKey, AdminLevelSet> retValue = new HashMap<ISOKey, AdminLevelSet>();
if (dcCoverageString != null && dcCoverageString != "") {
final StringTokenizer st = new StringTokenizer(dcCoverageString,
":/");
while (st.hasMoreElements()) {
final String isoKeyToken = st.nextToken();
final ISOKey isoKey = new ISOKey(isoKeyToken);
final String adminSetToken = st.nextToken();
final AdminLevelSet adminLevelSet = new AdminLevelSet(
adminSetToken);
retValue.put(isoKey, adminLevelSet);
}
}
return retValue;
}
| public static Map<ISOKey, AdminLevelSet> parseDublinCoreCoverageString(
final String dcCoverageString) {
final Map<ISOKey, AdminLevelSet> retValue = new HashMap<ISOKey, AdminLevelSet>();
if (dcCoverageString != null && !"".equals(dcCoverageString)) {
final StringTokenizer st = new StringTokenizer(dcCoverageString,
":/");
while (st.hasMoreElements()) {
final String isoKeyToken = st.nextToken();
final ISOKey isoKey = new ISOKey(isoKeyToken);
final String adminSetToken = st.nextToken();
final AdminLevelSet adminLevelSet = new AdminLevelSet(
adminSetToken);
retValue.put(isoKey, adminLevelSet);
}
}
return retValue;
}
|
public void upload(loci.visbio.data.Dataset data,
String server, String username, String password)
{
try {
OMEWriter writer = new OMEWriter();
OMEXMLMetadataStore store = new OMEXMLMetadataStore();
store.setRoot(data.getOMENode());
writer.setMetadataStore(store);
String id = server + "?user=" + username + "&password=" + password;
writer.setId(id);
int numFiles = data.getFilenames().length;
int numImages = data.getImagesPerSource();
for (int i=0; i<numFiles; i++) {
for (int j=0; j<numImages; j++) {
int[] coords = FormatTools.getZCTCoords(
store.getDimensionOrder(null),
store.getSizeZ(null).intValue(),
store.getSizeC(null).intValue(),
store.getSizeT(null).intValue(),
numImages*numFiles, numImages*i + j);
writer.saveImage(
data.getImage(new int[] {coords[0], coords[1], coords[2], j}),
i == numFiles - 1 && j == numImages - 1);
}
}
writer.close();
}
catch (Exception exc) {
notifyListeners(new StatusEvent(1, 1,
"Error uploading (see error console for details)"));
exc.printStackTrace();
}
}
| public void upload(loci.visbio.data.Dataset data,
String server, String username, String password)
{
try {
OMEWriter writer = new OMEWriter();
OMEXMLMetadataStore store = new OMEXMLMetadataStore();
store.setRoot(data.getOMENode());
writer.setMetadata(store);
String id = server + "?user=" + username + "&password=" + password;
writer.setId(id);
int numFiles = data.getFilenames().length;
int numImages = data.getImagesPerSource();
for (int i=0; i<numFiles; i++) {
for (int j=0; j<numImages; j++) {
int[] coords = FormatTools.getZCTCoords(
store.getDimensionOrder(null),
store.getSizeZ(null).intValue(),
store.getSizeC(null).intValue(),
store.getSizeT(null).intValue(),
numImages*numFiles, numImages*i + j);
writer.saveImage(
data.getImage(new int[] {coords[0], coords[1], coords[2], j}),
i == numFiles - 1 && j == numImages - 1);
}
}
writer.close();
}
catch (Exception exc) {
notifyListeners(new StatusEvent(1, 1,
"Error uploading (see error console for details)"));
exc.printStackTrace();
}
}
|
public void workSessions() {
Iterator<G_Player> player1Iter = S_Server.getInstance()
.getWorldModule().getPlayerManager().getPlayerListIterator();
while (player1Iter.hasNext()) {
G_Player player1 = player1Iter.next();
if (statusUpdateTime.getTimeElapsedSeconds() >= 10) {
S_Client client = S_Server.getInstance().getNetworkModule()
.getClient(player1);
if (client == null) {
continue;
}
statusUpdateTime.Stop();
statusUpdateTime.Reset();
player1.updateStatus(0,
player1.getCurrHp() + (int) (player1.getMaxHp() * 0.1),
player1.getMaxHp());
player1.updateStatus(1,
player1.getCurrMana()
+ (int) (player1.getMaxMana() * 0.08),
player1.getMaxMana());
player1.updateStatus(2,
player1.getCurrStm()
+ (int) (player1.getMaxStm() * 0.08),
player1.getMaxStm());
player1.updateStatus(3,
player1.getCurrElect()
+ (int) (player1.getMaxElect() * 0.08),
player1.getMaxElect());
}
if (!statusUpdateTime.isRunning()) {
statusUpdateTime.Start();
}
Iterator<G_Player> player2Iter = world.getPlayerManager()
.getPlayerListIterator();
while (player2Iter.hasNext()) {
G_Player player2 = player2Iter.next();
if (player1 == player2) {
continue;
}
if (player1.getPosition().getMap() != player2.getPosition().getMap()) {
continue;
}
double xcomp = Math.pow(player1.getPosition().getX() - player2.getPosition().getX(),
2);
double ycomp = Math.pow(player1.getPosition().getY() - player2.getPosition().getY(),
2);
double zcomp = Math.pow(player1.getPosition().getZ() - player2.getPosition().getZ(),
2);
double distance = Math.sqrt((xcomp * xcomp) + (ycomp * ycomp) + (zcomp * zcomp));
if (distance <= player1.getSessionRadius()) {
player1.getSession().enter(player2);
}
if (distance > player1.getSessionRadius()) {
player1.getSession().exit(player2);
}
}
Iterator<G_Mob> mobIter = world.getMobManager()
.getMobListIterator();
while (mobIter.hasNext()) {
G_Mob mob = mobIter.next();
if (mob == null) {
continue;
}
if (mob.getPosition().getMap() != player1.getPosition().getMap()) {
continue;
}
int distance = mob.getDistance(player1);
if (distance > player1.getSessionRadius()) {
player1.getSession().exit(mob);
} else {
player1.getSession().enter(mob);
if (distance <= 150 && mob.getAttackType() != -1) {
if (player1.getPosition().getMap()
.getMobArea()
.get((player1.getPosition().getX() / 10 - 300),
(player1.getPosition().getY() / 10)) == true) {
mob.moveToPlayer(player1, distance);
}
}
}
}
Iterator<G_Npc> npcIter = world.getNpcManager()
.getNpcListIterator();
while (npcIter.hasNext()) {
G_Npc npc = npcIter.next();
if (npc == null) {
continue;
}
if (npc.getPosition().getMap() != player1.getPosition().getMap()) {
continue;
}
int distance = npc.getDistance(player1);
if (distance > player1.getSessionRadius()) {
player1.getSession().exit(npc);
} else {
player1.getSession().enter(npc);
}
}
}
}
| public void workSessions() {
Iterator<G_Player> player1Iter = S_Server.getInstance()
.getWorldModule().getPlayerManager().getPlayerListIterator();
while (player1Iter.hasNext()) {
G_Player player1 = player1Iter.next();
if (statusUpdateTime.getTimeElapsedSeconds() >= 10) {
S_Client client = S_Server.getInstance().getNetworkModule()
.getClient(player1);
if (client == null) {
continue;
}
statusUpdateTime.Stop();
statusUpdateTime.Reset();
player1.updateStatus(0,
player1.getCurrHp() + (int) (player1.getMaxHp() * 0.1),
player1.getMaxHp());
player1.updateStatus(1,
player1.getCurrMana()
+ (int) (player1.getMaxMana() * 0.08),
player1.getMaxMana());
player1.updateStatus(2,
player1.getCurrStm()
+ (int) (player1.getMaxStm() * 0.08),
player1.getMaxStm());
player1.updateStatus(3,
player1.getCurrElect()
+ (int) (player1.getMaxElect() * 0.08),
player1.getMaxElect());
}
if (!statusUpdateTime.isRunning()) {
statusUpdateTime.Start();
}
Iterator<G_Player> player2Iter = world.getPlayerManager()
.getPlayerListIterator();
while (player2Iter.hasNext()) {
G_Player player2 = player2Iter.next();
if (player1 == player2) {
continue;
}
if (player1.getPosition().getMap() != player2.getPosition().getMap()) {
continue;
}
double xcomp = Math.pow(player1.getPosition().getX() - player2.getPosition().getX(),
2);
double ycomp = Math.pow(player1.getPosition().getY() - player2.getPosition().getY(),
2);
double zcomp = Math.pow(player1.getPosition().getZ() - player2.getPosition().getZ(),
2);
double distance = Math.sqrt((xcomp * xcomp) + (ycomp * ycomp) + (zcomp * zcomp));
if (distance <= player1.getSessionRadius()) {
player1.getSession().enter(player2);
}
if (distance > player1.getSessionRadius()) {
player1.getSession().exit(player2);
}
}
Iterator<G_Mob> mobIter = world.getMobManager()
.getMobListIterator();
while (mobIter.hasNext()) {
G_Mob mob = mobIter.next();
if (mob == null) {
continue;
}
if (mob.getPosition().getMap() != player1.getPosition().getMap()) {
continue;
}
int distance = mob.getDistance(player1);
if (distance > player1.getSessionRadius()) {
player1.getSession().exit(mob);
} else {
player1.getSession().enter(mob);
}
}
Iterator<G_Npc> npcIter = world.getNpcManager()
.getNpcListIterator();
while (npcIter.hasNext()) {
G_Npc npc = npcIter.next();
if (npc == null) {
continue;
}
if (npc.getPosition().getMap() != player1.getPosition().getMap()) {
continue;
}
int distance = npc.getDistance(player1);
if (distance > player1.getSessionRadius()) {
player1.getSession().exit(npc);
} else {
player1.getSession().enter(npc);
}
}
}
}
|
public Inheritance() {
BChild ch = null;
try {
System.out.println("a: " + ch.a);
} catch (NullPointerException e) {
System.out.println("Cannot getfield on a null object.");
}
BChild child = new BChild();
child.a = 3;
child.b = 5;
System.out.println("Child a: " + child.a);
System.out.println("Parent a through child via getter: " + child.getA());
System.out.println("Child b: " + child.b);
AParent par = child;
par.a = 4;
System.out.println("Parent a: " + par.a);
System.out.println("Parent a through getter: " + par.getA());
System.out.println("Parent b: " + par.b);
BChild child2 = (BChild) par;
System.out.println("Child a: " + child2.a);
System.out.println("Parent a through child via getter: " + child2.getA());
System.out.println("Child b: " + child2.b);
C pathological = new C();
System.out.println(pathological.foo);
System.out.println(((B)pathological).foo);
System.out.println(((A)pathological).foo);
pathological.foo = 1337;
System.out.println(pathological.foo);
System.out.println(((B)pathological).foo);
System.out.println(((A)pathological).foo);
((A)pathological).foo = 42;
System.out.println(pathological.foo);
System.out.println(((B)pathological).foo);
System.out.println(((A)pathological).foo);
}
| public Inheritance() {
String blargh = "I'm Nigel Thornberry!";
BChild ch = null;
try {
System.out.println("a: " + ch.a);
} catch (NullPointerException e) {
System.out.println("Cannot getfield on a null object.");
}
System.out.println(blargh);
BChild child = new BChild();
child.a = 3;
child.b = 5;
System.out.println("Child a: " + child.a);
System.out.println("Parent a through child via getter: " + child.getA());
System.out.println("Child b: " + child.b);
AParent par = child;
par.a = 4;
System.out.println("Parent a: " + par.a);
System.out.println("Parent a through getter: " + par.getA());
System.out.println("Parent b: " + par.b);
BChild child2 = (BChild) par;
System.out.println("Child a: " + child2.a);
System.out.println("Parent a through child via getter: " + child2.getA());
System.out.println("Child b: " + child2.b);
C pathological = new C();
System.out.println(pathological.foo);
System.out.println(((B)pathological).foo);
System.out.println(((A)pathological).foo);
pathological.foo = 1337;
System.out.println(pathological.foo);
System.out.println(((B)pathological).foo);
System.out.println(((A)pathological).foo);
((A)pathological).foo = 42;
System.out.println(pathological.foo);
System.out.println(((B)pathological).foo);
System.out.println(((A)pathological).foo);
}
|
public ImagePlus open(int sample,
int tpMin, int tpMax,
int region,
int angle,
int channel,
int zMin, int zMax,
int fMin, int fMax,
int yMin, int yMax,
int xMin, int xMax,
int xDir,
int yDir,
int zDir,
boolean virtual,
int projectionMethod,
int projectionDir) {
if(projectionMethod == NO_PROJECTION)
return openNotProjected(sample, tpMin, tpMax, region, angle, channel, zMin, zMax, fMin, fMax, yMin, yMax, xMin, xMax, xDir, yDir, zDir, virtual);
Projector projector = null;
switch(projectionMethod) {
case MIN_PROJECTION: projector = new MinimumProjector(); break;
case MAX_PROJECTION: projector = new MaximumProjector(); break;
default: throw new IllegalArgumentException("Unknown projection method: " + projectionMethod);
}
final int D = 5;
final int[] MIN = new int[] { xMin, yMin, fMin, zMin, tpMin };
final int[] MAX = new int[] { xMax, yMax, fMax, zMax, tpMax };
if(projectionMethod == xDir)
throw new IllegalArgumentException("The projection direction cannot be the same as the dimension displayed in x direction");
if(projectionMethod == yDir)
throw new IllegalArgumentException("The projection direction cannot be the same as the dimension displayed in y direction");
if(projectionMethod == zDir)
throw new IllegalArgumentException("The projection direction cannot be the same as the dimension displayed in z direction");
if(MAX[projectionDir] - MIN[projectionDir] + 1 <= 1)
return openNotProjected(sample, tpMin, tpMax, region, angle, channel, zMin, zMax, fMin, fMax, yMin, yMax, xMin, xMax, xDir, yDir, zDir, virtual);
int ws = MAX[xDir] - MIN[xDir] + 1;
int hs = MAX[yDir] - MIN[yDir] + 1;
SPIMStack stack = virtual ? new SPIMVirtualStack(ws, hs) : new SPIMRegularStack(ws, hs);
final int[] position = new int[D];
System.arraycopy(MIN, 0, position, 0, D);
if(xDir == X && yDir == Y) {
for(int z = MIN[zDir]; z <= MAX[zDir]; z++) {
position[zDir] = z;
if(IJ.escapePressed()) {
IJ.resetEscape();
break;
}
projector.reset();
for(int proj = MIN[projectionDir]; proj <= MAX[projectionDir]; proj++) {
position[projectionDir] = proj;
String path = getPath(sample, position[T], region, angle, channel, position[Z], position[F]);
ImageProcessor ip = openRaw(path, w, h, MIN[xDir], MAX[xDir], MIN[yDir], MAX[yDir]);
projector.add(ip);
}
stack.addSlice(projector.getProjection());
IJ.showProgress(z - MIN[zDir], MAX[zDir] - MIN[zDir] + 1);
}
}
else {
int[] ordered = new int[2];
ordered[0] = Math.min(xDir, yDir);
ordered[1] = Math.max(xDir, yDir);
for(int z = MIN[zDir]; z <= MAX[zDir]; z++) {
position[zDir] = z;
if(IJ.escapePressed()) {
IJ.resetEscape();
break;
}
projector.reset();
for(int proj = MIN[projectionDir]; proj <= MAX[projectionDir]; proj++) {
position[projectionDir] = proj;
ImageProcessor ip = new ShortProcessor(MAX[xDir] - MIN[xDir] + 1, MAX[yDir] - MIN[yDir] + 1);
for(int i1 = MIN[ordered[1]]; i1 <= MAX[ordered[1]]; i1++) {
position[ordered[1]] = i1;
String path = getPath(sample, position[T], region, angle, channel, position[Z], position[F]);
ImageProcessor org = openRaw(path, w, h);
for(int i2 = MIN[ordered[0]]; i2 <= MAX[ordered[0]]; i2++) {
position[ordered[0]] = i2;
ip.set(position[xDir] - MIN[xDir], position[yDir] - MIN[yDir], org.get(position[X], position[Y]));
}
}
projector.add(ip);
}
stack.addSlice(projector.getProjection());
System.out.println((z - MIN[zDir]) + " / " + (MAX[zDir] - MIN[zDir] + 1));
IJ.showProgress(z - MIN[zDir], MAX[zDir] - MIN[zDir] + 1);
}
}
IJ.showProgress(1);
double[] pdiffs = new double[] { pw, ph, 1, pd, 1 };
ImagePlus ret = new ImagePlus(experimentName, stack);
ret.getCalibration().pixelWidth = pdiffs[xDir];
ret.getCalibration().pixelWidth = pdiffs[yDir];
ret.getCalibration().pixelWidth = pdiffs[zDir];
return ret;
}
| public ImagePlus open(int sample,
int tpMin, int tpMax,
int region,
int angle,
int channel,
int zMin, int zMax,
int fMin, int fMax,
int yMin, int yMax,
int xMin, int xMax,
int xDir,
int yDir,
int zDir,
boolean virtual,
int projectionMethod,
int projectionDir) {
if(projectionMethod == NO_PROJECTION)
return openNotProjected(sample, tpMin, tpMax, region, angle, channel, zMin, zMax, fMin, fMax, yMin, yMax, xMin, xMax, xDir, yDir, zDir, virtual);
Projector projector = null;
switch(projectionMethod) {
case MIN_PROJECTION: projector = new MinimumProjector(); break;
case MAX_PROJECTION: projector = new MaximumProjector(); break;
default: throw new IllegalArgumentException("Unknown projection method: " + projectionMethod);
}
final int D = 5;
final int[] MIN = new int[] { xMin, yMin, fMin, zMin, tpMin };
final int[] MAX = new int[] { xMax, yMax, fMax, zMax, tpMax };
if(projectionDir == xDir)
throw new IllegalArgumentException("The projection direction cannot be the same as the dimension displayed in x direction");
if(projectionDir == yDir)
throw new IllegalArgumentException("The projection direction cannot be the same as the dimension displayed in y direction");
if(projectionDir == zDir)
throw new IllegalArgumentException("The projection direction cannot be the same as the dimension displayed in z direction");
if(MAX[projectionDir] - MIN[projectionDir] + 1 <= 1)
return openNotProjected(sample, tpMin, tpMax, region, angle, channel, zMin, zMax, fMin, fMax, yMin, yMax, xMin, xMax, xDir, yDir, zDir, virtual);
int ws = MAX[xDir] - MIN[xDir] + 1;
int hs = MAX[yDir] - MIN[yDir] + 1;
SPIMStack stack = virtual ? new SPIMVirtualStack(ws, hs) : new SPIMRegularStack(ws, hs);
final int[] position = new int[D];
System.arraycopy(MIN, 0, position, 0, D);
if(xDir == X && yDir == Y) {
for(int z = MIN[zDir]; z <= MAX[zDir]; z++) {
position[zDir] = z;
if(IJ.escapePressed()) {
IJ.resetEscape();
break;
}
projector.reset();
for(int proj = MIN[projectionDir]; proj <= MAX[projectionDir]; proj++) {
position[projectionDir] = proj;
String path = getPath(sample, position[T], region, angle, channel, position[Z], position[F]);
ImageProcessor ip = openRaw(path, w, h, MIN[xDir], MAX[xDir], MIN[yDir], MAX[yDir]);
projector.add(ip);
}
stack.addSlice(projector.getProjection());
IJ.showProgress(z - MIN[zDir], MAX[zDir] - MIN[zDir] + 1);
}
}
else {
int[] ordered = new int[2];
ordered[0] = Math.min(xDir, yDir);
ordered[1] = Math.max(xDir, yDir);
for(int z = MIN[zDir]; z <= MAX[zDir]; z++) {
position[zDir] = z;
if(IJ.escapePressed()) {
IJ.resetEscape();
break;
}
projector.reset();
for(int proj = MIN[projectionDir]; proj <= MAX[projectionDir]; proj++) {
position[projectionDir] = proj;
ImageProcessor ip = new ShortProcessor(MAX[xDir] - MIN[xDir] + 1, MAX[yDir] - MIN[yDir] + 1);
for(int i1 = MIN[ordered[1]]; i1 <= MAX[ordered[1]]; i1++) {
position[ordered[1]] = i1;
String path = getPath(sample, position[T], region, angle, channel, position[Z], position[F]);
ImageProcessor org = openRaw(path, w, h);
for(int i2 = MIN[ordered[0]]; i2 <= MAX[ordered[0]]; i2++) {
position[ordered[0]] = i2;
ip.set(position[xDir] - MIN[xDir], position[yDir] - MIN[yDir], org.get(position[X], position[Y]));
}
}
projector.add(ip);
}
stack.addSlice(projector.getProjection());
System.out.println((z - MIN[zDir]) + " / " + (MAX[zDir] - MIN[zDir] + 1));
IJ.showProgress(z - MIN[zDir], MAX[zDir] - MIN[zDir] + 1);
}
}
IJ.showProgress(1);
double[] pdiffs = new double[] { pw, ph, 1, pd, 1 };
ImagePlus ret = new ImagePlus(experimentName, stack);
ret.getCalibration().pixelWidth = pdiffs[xDir];
ret.getCalibration().pixelWidth = pdiffs[yDir];
ret.getCalibration().pixelWidth = pdiffs[zDir];
return ret;
}
|
public static ServiceInterface login(GlobusCredential cred,
char[] password, String username, String idp,
LoginParams loginParams) throws LoginException {
DependencyManager.initArcsCommonJavaLibDir();
DependencyManager.checkForBouncyCastleDependency();
Security
.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
java.security.Security.addProvider(new ArcsSecurityProvider());
java.security.Security.setProperty("ssl.TrustManagerFactory.algorithm",
"TrustAllCertificates");
try {
addPluginsToClasspath();
} catch (IOException e2) {
myLogger.warn(e2);
throw new RuntimeException(e2);
}
try {
CertificateFiles.copyCACerts();
} catch (Exception e1) {
myLogger.warn(e1);
}
try {
URL cacertURL = LoginManager.class.getResource("/ipsca.pem");
HttpSecureProtocol protocolSocketFactory = new HttpSecureProtocol();
TrustMaterial trustMaterial = null;
trustMaterial = new TrustMaterial(cacertURL);
protocolSocketFactory.addTrustMaterial(trustMaterial);
protocolSocketFactory.setCheckHostname(false);
Protocol protocol = new Protocol("https",
(ProtocolSocketFactory) protocolSocketFactory, 443);
Protocol.registerProtocol("https", protocol);
} catch (Exception e) {
e.printStackTrace();
}
String serviceInterfaceUrl = loginParams.getServiceInterfaceUrl();
if ("Local".equals(serviceInterfaceUrl)
|| "Dummy".equals(serviceInterfaceUrl)) {
DependencyManager
.checkForVersionedDependency(
"org.vpac.grisu.control.serviceInterfaces.LocalServiceInterface",
1,
1,
"https://code.arcs.org.au/hudson/job/Grisu-SNAPSHOT/org.vpac.grisu$grisu-core/lastSuccessfulBuild/artifact/org.vpac.grisu/grisu-core/0.3-SNAPSHOT/local-backend.jar",
new File(Environment.getGrisuPluginDirectory(),
"local-backend.jar"));
} else if (serviceInterfaceUrl.startsWith("http")) {
DependencyManager
.checkForVersionedDependency(
"org.vpac.grisu.client.control.XFireServiceInterfaceCreator",
1,
1,
"https://code.arcs.org.au/hudson/job/Grisu-connectors-SNAPSHOT-binaries/lastSuccessfulBuild/artifact/frontend-modules/xfire-frontend/target/xfire-frontend.jar",
new File(Environment.getGrisuPluginDirectory(),
"xfire-frontend.jar"));
DependencyManager
.checkForVersionedDependency(
"org.vpac.grisu.frontend.info.clientsidemds.ClientSideGrisuRegistry",
1,
1,
"https://code.arcs.org.au/hudson/job/Grisu-SNAPSHOT-binaries/lastSuccessfulBuild/artifact/frontend/client-side-mds/target/client-side-mds.jar",
new File(Environment.getGrisuPluginDirectory(),
"client-side-mds.jar"));
}
if (StringUtils.isBlank(username)) {
if (StringUtils.isBlank(loginParams.getMyProxyUsername())) {
if (cred != null) {
try {
return LoginHelpers.globusCredentialLogin(loginParams,
cred);
} catch (Exception e) {
throw new LoginException("Could not login: "
+ e.getLocalizedMessage(), e);
}
} else if (password == null || password.length == 0) {
try {
if (loginParams == null) {
return LoginHelpers.defaultLocalProxyLogin();
} else {
return LoginHelpers
.defaultLocalProxyLogin(loginParams);
}
} catch (Exception e) {
throw new LoginException("Could not login: "
+ e.getLocalizedMessage(), e);
}
} else {
try {
return LoginHelpers.localProxyLogin(password,
loginParams);
} catch (ServiceInterfaceException e) {
throw new LoginException("Could not login: "
+ e.getLocalizedMessage(), e);
}
}
} else {
try {
return LoginHelpers.myProxyLogin(loginParams);
} catch (ServiceInterfaceException e) {
throw new LoginException("Could not login: "
+ e.getLocalizedMessage(), e);
}
}
} else {
try {
DependencyManager.checkForArcsGsiDependency(1, 1, true);
GSSCredential slcsproxy = slcsMyProxyInit(username, password,
idp);
return LoginHelpers.gssCredentialLogin(loginParams, slcsproxy);
} catch (Exception e) {
e.printStackTrace();
throw new LoginException("Could not do slcs login: "
+ e.getLocalizedMessage(), e);
}
}
}
| public static ServiceInterface login(GlobusCredential cred,
char[] password, String username, String idp,
LoginParams loginParams) throws LoginException {
DependencyManager.initArcsCommonJavaLibDir();
DependencyManager.checkForBouncyCastleDependency();
java.security.Security.addProvider(new ArcsSecurityProvider());
java.security.Security.setProperty("ssl.TrustManagerFactory.algorithm",
"TrustAllCertificates");
try {
addPluginsToClasspath();
} catch (IOException e2) {
myLogger.warn(e2);
throw new RuntimeException(e2);
}
try {
CertificateFiles.copyCACerts();
} catch (Exception e1) {
myLogger.warn(e1);
}
try {
URL cacertURL = LoginManager.class.getResource("/ipsca.pem");
HttpSecureProtocol protocolSocketFactory = new HttpSecureProtocol();
TrustMaterial trustMaterial = null;
trustMaterial = new TrustMaterial(cacertURL);
protocolSocketFactory.addTrustMaterial(trustMaterial);
protocolSocketFactory.setCheckHostname(false);
Protocol protocol = new Protocol("https",
(ProtocolSocketFactory) protocolSocketFactory, 443);
Protocol.registerProtocol("https", protocol);
} catch (Exception e) {
e.printStackTrace();
}
String serviceInterfaceUrl = loginParams.getServiceInterfaceUrl();
if ("Local".equals(serviceInterfaceUrl)
|| "Dummy".equals(serviceInterfaceUrl)) {
DependencyManager
.checkForVersionedDependency(
"org.vpac.grisu.control.serviceInterfaces.LocalServiceInterface",
1,
1,
"https://code.arcs.org.au/hudson/job/Grisu-SNAPSHOT/org.vpac.grisu$grisu-core/lastSuccessfulBuild/artifact/org.vpac.grisu/grisu-core/0.3-SNAPSHOT/local-backend.jar",
new File(Environment.getGrisuPluginDirectory(),
"local-backend.jar"));
} else if (serviceInterfaceUrl.startsWith("http")) {
DependencyManager
.checkForVersionedDependency(
"org.vpac.grisu.client.control.XFireServiceInterfaceCreator",
1,
1,
"https://code.arcs.org.au/hudson/job/Grisu-connectors-SNAPSHOT-binaries/lastSuccessfulBuild/artifact/frontend-modules/xfire-frontend/target/xfire-frontend.jar",
new File(Environment.getGrisuPluginDirectory(),
"xfire-frontend.jar"));
DependencyManager
.checkForVersionedDependency(
"org.vpac.grisu.frontend.info.clientsidemds.ClientSideGrisuRegistry",
1,
1,
"https://code.arcs.org.au/hudson/job/Grisu-SNAPSHOT-binaries/lastSuccessfulBuild/artifact/frontend/client-side-mds/target/client-side-mds.jar",
new File(Environment.getGrisuPluginDirectory(),
"client-side-mds.jar"));
}
if (StringUtils.isBlank(username)) {
if (StringUtils.isBlank(loginParams.getMyProxyUsername())) {
if (cred != null) {
try {
return LoginHelpers.globusCredentialLogin(loginParams,
cred);
} catch (Exception e) {
throw new LoginException("Could not login: "
+ e.getLocalizedMessage(), e);
}
} else if (password == null || password.length == 0) {
try {
if (loginParams == null) {
return LoginHelpers.defaultLocalProxyLogin();
} else {
return LoginHelpers
.defaultLocalProxyLogin(loginParams);
}
} catch (Exception e) {
throw new LoginException("Could not login: "
+ e.getLocalizedMessage(), e);
}
} else {
try {
return LoginHelpers.localProxyLogin(password,
loginParams);
} catch (ServiceInterfaceException e) {
throw new LoginException("Could not login: "
+ e.getLocalizedMessage(), e);
}
}
} else {
try {
return LoginHelpers.myProxyLogin(loginParams);
} catch (ServiceInterfaceException e) {
throw new LoginException("Could not login: "
+ e.getLocalizedMessage(), e);
}
}
} else {
try {
DependencyManager.checkForArcsGsiDependency(1, 1, true);
GSSCredential slcsproxy = slcsMyProxyInit(username, password,
idp);
return LoginHelpers.gssCredentialLogin(loginParams, slcsproxy);
} catch (Exception e) {
e.printStackTrace();
throw new LoginException("Could not do slcs login: "
+ e.getLocalizedMessage(), e);
}
}
}
|
private void generateDoLoadMethod(PrintWriter out) {
out.println("\tprotected void doLoad(java.io.InputStream inputStream, java.util.Map<?,?> options) throws java.io.IOException {");
out.println("\t\tjava.lang.String encoding = null;");
out.println("\t\tjava.io.InputStream actualInputStream = inputStream;");
out.println("\t\tjava.lang.Object inputStreamPreProcessorProvider = options.get(" + IOptions.class.getName() + ".INPUT_STREAM_PREPROCESSOR_PROVIDER);");
out.println("\t\tif (inputStreamPreProcessorProvider != null) {");
out.println("\t\t\tif (inputStreamPreProcessorProvider instanceof " + IInputStreamProcessorProvider.class.getName() + ") {");
out.println("\t\t\t\t" + IInputStreamProcessorProvider.class.getName() + " provider = (" + IInputStreamProcessorProvider.class.getName() + ") inputStreamPreProcessorProvider;");
out.println("\t\t\t\t" + InputStreamProcessor.class.getName() + " processor = provider.getInputStreamProcessor(inputStream);");
out.println("\t\t\t\tactualInputStream = processor;");
out.println("\t\t\t\tencoding = processor.getOutputEncoding();");
out.println("\t\t\t}");
out.println("\t\t}");
out.println();
out.println("\t\t" + ITextParser.class.getName() + " parser;");
out.println("\t\tif (encoding == null) {");
out.println("\t\t\tparser = new " + csClassName + "Parser(new " + CommonTokenStream.class.getName() + "(new " + csClassName + "Lexer(new " + ANTLRInputStream.class.getName()+ "(actualInputStream))));");
out.println("\t\t} else {");
out.println("\t\t\tparser = new " + csClassName + "Parser(new " + CommonTokenStream.class.getName() + "(new " + csClassName + "Lexer(new " + ANTLRInputStream.class.getName()+ "(actualInputStream, encoding))));");
out.println("\t\t}");
out.println("\t\tparser.setResource(this);");
out.println("\t\tparser.setOptions(options);");
out.println("\t\t" + EObject.class.getName() + " root = parser.parse();");
out.println("\t\twhile (root != null) {");
out.println("\t\t\tgetContents().add(root);");
out.println("\t\t\troot = null;");
out.println("\t\t}\n");
out.println("\t\tgetReferenceResolverSwitch().setOptions(options);");
out.println("\t}");
out.println();
}
| private void generateDoLoadMethod(PrintWriter out) {
out.println("\tprotected void doLoad(java.io.InputStream inputStream, java.util.Map<?,?> options) throws java.io.IOException {");
out.println("\t\tjava.lang.String encoding = null;");
out.println("\t\tjava.io.InputStream actualInputStream = inputStream;");
out.println("\t\tjava.lang.Object inputStreamPreProcessorProvider = null;");
out.println("\t\tif(options!=null)");
out.println("\t\t\tinputStreamPreProcessorProvider = options.get(" + IOptions.class.getName() + ".INPUT_STREAM_PREPROCESSOR_PROVIDER);");
out.println("\t\tif (inputStreamPreProcessorProvider != null) {");
out.println("\t\t\tif (inputStreamPreProcessorProvider instanceof " + IInputStreamProcessorProvider.class.getName() + ") {");
out.println("\t\t\t\t" + IInputStreamProcessorProvider.class.getName() + " provider = (" + IInputStreamProcessorProvider.class.getName() + ") inputStreamPreProcessorProvider;");
out.println("\t\t\t\t" + InputStreamProcessor.class.getName() + " processor = provider.getInputStreamProcessor(inputStream);");
out.println("\t\t\t\tactualInputStream = processor;");
out.println("\t\t\t\tencoding = processor.getOutputEncoding();");
out.println("\t\t\t}");
out.println("\t\t}");
out.println();
out.println("\t\t" + ITextParser.class.getName() + " parser;");
out.println("\t\tif (encoding == null) {");
out.println("\t\t\tparser = new " + csClassName + "Parser(new " + CommonTokenStream.class.getName() + "(new " + csClassName + "Lexer(new " + ANTLRInputStream.class.getName()+ "(actualInputStream))));");
out.println("\t\t} else {");
out.println("\t\t\tparser = new " + csClassName + "Parser(new " + CommonTokenStream.class.getName() + "(new " + csClassName + "Lexer(new " + ANTLRInputStream.class.getName()+ "(actualInputStream, encoding))));");
out.println("\t\t}");
out.println("\t\tparser.setResource(this);");
out.println("\t\tparser.setOptions(options);");
out.println("\t\t" + EObject.class.getName() + " root = parser.parse();");
out.println("\t\twhile (root != null) {");
out.println("\t\t\tgetContents().add(root);");
out.println("\t\t\troot = null;");
out.println("\t\t}\n");
out.println("\t\tgetReferenceResolverSwitch().setOptions(options);");
out.println("\t}");
out.println();
}
|
public void testEquals() {
ThermometerPlot p1 = new ThermometerPlot();
ThermometerPlot p2 = new ThermometerPlot();
assertTrue(p1.equals(p2));
assertTrue(p2.equals(p1));
p1.setPadding(new RectangleInsets(1.0, 2.0, 3.0, 4.0));
assertFalse(p1.equals(p2));
p2.setPadding(new RectangleInsets(1.0, 2.0, 3.0, 4.0));
assertTrue(p2.equals(p1));
BasicStroke s = new BasicStroke(1.23f);
p1.setThermometerStroke(s);
assertFalse(p1.equals(p2));
p2.setThermometerStroke(s);
assertTrue(p2.equals(p1));
p1.setThermometerPaint(new GradientPaint(1.0f, 2.0f, Color.blue,
3.0f, 4.0f, Color.red));
assertFalse(p1.equals(p2));
p2.setThermometerPaint(new GradientPaint(1.0f, 2.0f, Color.blue,
3.0f, 4.0f, Color.red));
assertTrue(p2.equals(p1));
p1.setUnits(ThermometerPlot.UNITS_KELVIN);
assertFalse(p1.equals(p2));
p2.setUnits(ThermometerPlot.UNITS_KELVIN);
assertTrue(p2.equals(p1));
p1.setValueLocation(ThermometerPlot.LEFT);
assertFalse(p1.equals(p2));
p2.setValueLocation(ThermometerPlot.LEFT);
assertTrue(p2.equals(p1));
p1.setAxisLocation(ThermometerPlot.RIGHT);
assertFalse(p1.equals(p2));
p2.setAxisLocation(ThermometerPlot.RIGHT);
assertTrue(p2.equals(p1));
p1.setValueFont(new Font("Serif", Font.PLAIN, 9));
assertFalse(p1.equals(p2));
p2.setValueFont(new Font("Serif", Font.PLAIN, 9));
assertTrue(p2.equals(p1));
p1.setValuePaint(new GradientPaint(4.0f, 5.0f, Color.red,
6.0f, 7.0f, Color.white));
assertFalse(p1.equals(p2));
p2.setValuePaint(new GradientPaint(4.0f, 5.0f, Color.red,
6.0f, 7.0f, Color.white));
assertTrue(p2.equals(p1));
p1.setValueFormat(new DecimalFormat("0.0000"));
assertFalse(p1.equals(p2));
p2.setValueFormat(new DecimalFormat("0.0000"));
assertTrue(p2.equals(p1));
p1.setMercuryPaint(new GradientPaint(9.0f, 8.0f, Color.red,
7.0f, 6.0f, Color.blue));
assertFalse(p1.equals(p2));
p2.setMercuryPaint(new GradientPaint(9.0f, 8.0f, Color.red,
7.0f, 6.0f, Color.blue));
assertTrue(p2.equals(p1));
p1.setSubrange(1, 1.0, 2.0);
assertFalse(p1.equals(p2));
p2.setSubrange(1, 1.0, 2.0);
assertTrue(p2.equals(p1));
p1.setSubrangePaint(1, new GradientPaint(1.0f, 2.0f, Color.red,
3.0f, 4.0f, Color.yellow));
assertFalse(p1.equals(p2));
p2.setSubrangePaint(1, new GradientPaint(1.0f, 2.0f, Color.red,
3.0f, 4.0f, Color.yellow));
assertTrue(p2.equals(p1));
p1.setBulbRadius(9);
assertFalse(p1.equals(p2));
p2.setBulbRadius(9);
assertTrue(p2.equals(p1));
p1.setColumnRadius(8);
assertFalse(p1.equals(p2));
p2.setColumnRadius(8);
assertTrue(p2.equals(p1));
p1.setGapRadius(7);
assertFalse(p1.equals(p2));
p2.setGapRadius(7);
assertTrue(p2.equals(p1));
}
| public void testEquals() {
ThermometerPlot p1 = new ThermometerPlot();
ThermometerPlot p2 = new ThermometerPlot();
assertTrue(p1.equals(p2));
assertTrue(p2.equals(p1));
p1.setPadding(new RectangleInsets(1.0, 2.0, 3.0, 4.0));
assertFalse(p1.equals(p2));
p2.setPadding(new RectangleInsets(1.0, 2.0, 3.0, 4.0));
assertTrue(p2.equals(p1));
BasicStroke s = new BasicStroke(1.23f);
p1.setThermometerStroke(s);
assertFalse(p1.equals(p2));
p2.setThermometerStroke(s);
assertTrue(p2.equals(p1));
p1.setThermometerPaint(new GradientPaint(1.0f, 2.0f, Color.blue,
3.0f, 4.0f, Color.red));
assertFalse(p1.equals(p2));
p2.setThermometerPaint(new GradientPaint(1.0f, 2.0f, Color.blue,
3.0f, 4.0f, Color.red));
assertTrue(p2.equals(p1));
p1.setUnits(ThermometerPlot.UNITS_KELVIN);
assertFalse(p1.equals(p2));
p2.setUnits(ThermometerPlot.UNITS_KELVIN);
assertTrue(p2.equals(p1));
p1.setValueLocation(ThermometerPlot.LEFT);
assertFalse(p1.equals(p2));
p2.setValueLocation(ThermometerPlot.LEFT);
assertTrue(p2.equals(p1));
p1.setAxisLocation(ThermometerPlot.RIGHT);
assertFalse(p1.equals(p2));
p2.setAxisLocation(ThermometerPlot.RIGHT);
assertTrue(p2.equals(p1));
p1.setValueFont(new Font("Serif", Font.PLAIN, 9));
assertFalse(p1.equals(p2));
p2.setValueFont(new Font("Serif", Font.PLAIN, 9));
assertTrue(p2.equals(p1));
p1.setValuePaint(new GradientPaint(4.0f, 5.0f, Color.red,
6.0f, 7.0f, Color.white));
assertFalse(p1.equals(p2));
p2.setValuePaint(new GradientPaint(4.0f, 5.0f, Color.red,
6.0f, 7.0f, Color.white));
assertTrue(p2.equals(p1));
p1.setValueFormat(new DecimalFormat("0.0000"));
assertFalse(p1.equals(p2));
p2.setValueFormat(new DecimalFormat("0.0000"));
assertTrue(p2.equals(p1));
p1.setMercuryPaint(new GradientPaint(9.0f, 8.0f, Color.red,
7.0f, 6.0f, Color.blue));
assertFalse(p1.equals(p2));
p2.setMercuryPaint(new GradientPaint(9.0f, 8.0f, Color.red,
7.0f, 6.0f, Color.blue));
assertTrue(p2.equals(p1));
p1.setSubrange(1, 1.0, 2.0);
assertFalse(p1.equals(p2));
p2.setSubrange(1, 1.0, 2.0);
assertTrue(p2.equals(p1));
p1.setSubrangePaint(1, new GradientPaint(1.0f, 2.0f, Color.red,
3.0f, 4.0f, Color.yellow));
assertFalse(p1.equals(p2));
p2.setSubrangePaint(1, new GradientPaint(1.0f, 2.0f, Color.red,
3.0f, 4.0f, Color.yellow));
assertTrue(p2.equals(p1));
p1.setBulbRadius(9);
assertFalse(p1.equals(p2));
p2.setBulbRadius(9);
assertTrue(p2.equals(p1));
p1.setColumnRadius(8);
assertFalse(p1.equals(p2));
p2.setColumnRadius(8);
assertTrue(p2.equals(p1));
p1.setGap(7);
assertFalse(p1.equals(p2));
p2.setGap(7);
assertTrue(p2.equals(p1));
}
|
private void reload() {
initTypes();
_props = GlobalContext.getGlobalContext().getPluginsConfig().getPropertiesForPlugin("archive.conf");
_cycleTime = 60000 * Long.parseLong(PropertyHelper.getProperty(_props,"cycletime", "30"));
if (_runHandler != null) {
_runHandler.cancel();
}
_runHandler = new TimerTask() {
public void run() {
int count = 1;
String type;
while ((type = PropertyHelper.getProperty(_props, count + ".type",null)) != null) {
ArchiveType archiveType = getArchiveType(count,type);
if (archiveType != null) {
new ArchiveHandler(archiveType).start();
}
count++;
}
}
};
GlobalContext.getGlobalContext().getTimer().schedule(_runHandler, _cycleTime, _cycleTime);
}
| private void reload() {
initTypes();
_props = GlobalContext.getGlobalContext().getPluginsConfig().getPropertiesForPlugin("archive.conf");
_cycleTime = 60000 * Long.parseLong(PropertyHelper.getProperty(_props,"cycletime", "30"));
if (_runHandler != null) {
_runHandler.cancel();
GlobalContext.getGlobalContext().getTimer().purge();
}
_runHandler = new TimerTask() {
public void run() {
int count = 1;
String type;
while ((type = PropertyHelper.getProperty(_props, count + ".type",null)) != null) {
ArchiveType archiveType = getArchiveType(count,type);
if (archiveType != null) {
new ArchiveHandler(archiveType).start();
}
count++;
}
}
};
GlobalContext.getGlobalContext().getTimer().schedule(_runHandler, _cycleTime, _cycleTime);
}
|
private void setNeighbours() {
setNeighbours(Country.ALASKA, Country.NORTHWESTTERRITORY);
setNeighbours(Country.ALASKA, Country.KAMCHATKA);
setNeighbours(Country.ALASKA, Country.ALBERTA);
setNeighbours(Country.NORTHWESTTERRITORY, Country.GREENLAND);
setNeighbours(Country.NORTHWESTTERRITORY, Country.ALBERTA);
setNeighbours(Country.NORTHWESTTERRITORY, Country.ONTARIO);
setNeighbours(Country.GREENLAND, Country.ONTARIO);
setNeighbours(Country.GREENLAND, Country.EASTERNCANADA);
setNeighbours(Country.GREENLAND, Country.ICELAND);
setNeighbours(Country.ALBERTA, Country.ONTARIO);
setNeighbours(Country.ALBERTA, Country.WESTERNUNITEDSTATES);
setNeighbours(Country.EASTERNCANADA, Country.EASTERNUNITEDSTATES);
setNeighbours(Country.WESTERNUNITEDSTATES, Country.EASTERNUNITEDSTATES);
setNeighbours(Country.WESTERNUNITEDSTATES, Country.CENTRALAMERICA);
setNeighbours(Country.CENTRALAMERICA, Country.VENEZUELA);
setNeighbours(Country.VENEZUELA, Country.PERU);
setNeighbours(Country.VENEZUELA, Country.BRAZIL);
setNeighbours(Country.PERU, Country.BRAZIL);
setNeighbours(Country.PERU, Country.ARGENTINA);
setNeighbours(Country.BRAZIL, Country.ARGENTINA);
setNeighbours(Country.BRAZIL, Country.NORTHAFRICA);
setNeighbours(Country.ICELAND, Country.SCANDINAVIA);
setNeighbours(Country.ICELAND, Country.GREATBRITAIN);
setNeighbours(Country.SCANDINAVIA, Country.RUSSIA);
setNeighbours(Country.SCANDINAVIA, Country.GREATBRITAIN);
setNeighbours(Country.SCANDINAVIA, Country.NORTHERNEUROPE);
setNeighbours(Country.GREATBRITAIN, Country.NORTHERNEUROPE);
setNeighbours(Country.GREATBRITAIN, Country.WESTERNEUROPE);
setNeighbours(Country.NORTHERNEUROPE, Country.SOUTHERNEUROPE);
setNeighbours(Country.NORTHERNEUROPE, Country.RUSSIA);
setNeighbours(Country.WESTERNEUROPE, Country.SOUTHERNEUROPE);
setNeighbours(Country.WESTERNEUROPE, Country.NORTHAFRICA);
setNeighbours(Country.SOUTHERNEUROPE, Country.MIDDLEEAST);
setNeighbours(Country.SOUTHERNEUROPE, Country.NORTHAFRICA);
setNeighbours(Country.NORTHAFRICA, Country.EGYPT);
setNeighbours(Country.NORTHAFRICA, Country.EASTAFRICA);
setNeighbours(Country.NORTHAFRICA, Country.CENTRALAFRICA);
setNeighbours(Country.EGYPT, Country.MIDDLEEAST);
setNeighbours(Country.EGYPT, Country.EASTAFRICA);
setNeighbours(Country.EASTAFRICA, Country.CENTRALAFRICA);
setNeighbours(Country.EASTAFRICA, Country.MADAGASCAR);
setNeighbours(Country.CENTRALAFRICA, Country.SOUTHAFRICA);
setNeighbours(Country.SOUTHAFRICA, Country.MADAGASCAR);
setNeighbours(Country.RUSSIA, Country.URAL);
setNeighbours(Country.RUSSIA, Country.AFGHANISTAN);
setNeighbours(Country.RUSSIA, Country.MIDDLEEAST);
setNeighbours(Country.URAL, Country.SIBERIA);
setNeighbours(Country.URAL, Country.AFGHANISTAN);
setNeighbours(Country.URAL, Country.CHINA);
setNeighbours(Country.SIBERIA, Country.YAKUTSK);
setNeighbours(Country.SIBERIA, Country.IRKUTSK);
setNeighbours(Country.SIBERIA, Country.MONGOLIA);
setNeighbours(Country.SIBERIA, Country.CHINA);
setNeighbours(Country.YAKUTSK, Country.KAMCHATKA);
setNeighbours(Country.YAKUTSK, Country.IRKUTSK);
setNeighbours(Country.KAMCHATKA, Country.JAPAN);
setNeighbours(Country.IRKUTSK, Country.KAMCHATKA);
setNeighbours(Country.IRKUTSK, Country.MONGOLIA);
setNeighbours(Country.MONGOLIA, Country.JAPAN);
setNeighbours(Country.MONGOLIA, Country.CHINA);
setNeighbours(Country.AFGHANISTAN, Country.CHINA);
setNeighbours(Country.AFGHANISTAN, Country.INDIA);
setNeighbours(Country.AFGHANISTAN, Country.MIDDLEEAST);
setNeighbours(Country.CHINA, Country.INDIA);
setNeighbours(Country.CHINA, Country.SIAM);
setNeighbours(Country.MIDDLEEAST, Country.INDIA);
setNeighbours(Country.INDIA, Country.SIAM);
setNeighbours(Country.SIAM, Country.INDONESIA);
setNeighbours(Country.INDONESIA, Country.NEWGUINEA);
setNeighbours(Country.INDONESIA, Country.WESTERNAUSTRALIA);
setNeighbours(Country.INDONESIA, Country.EASTERNAUSTRALIA);
setNeighbours(Country.NEWGUINEA, Country.EASTERNAUSTRALIA);
setNeighbours(Country.WESTERNAUSTRALIA, Country.EASTERNAUSTRALIA);
}
| private void setNeighbours() {
setNeighbours(Country.ALASKA, Country.NORTHWESTTERRITORY);
setNeighbours(Country.ALASKA, Country.KAMCHATKA);
setNeighbours(Country.ALASKA, Country.ALBERTA);
setNeighbours(Country.NORTHWESTTERRITORY, Country.GREENLAND);
setNeighbours(Country.NORTHWESTTERRITORY, Country.ALBERTA);
setNeighbours(Country.NORTHWESTTERRITORY, Country.ONTARIO);
setNeighbours(Country.GREENLAND, Country.ONTARIO);
setNeighbours(Country.GREENLAND, Country.EASTERNCANADA);
setNeighbours(Country.GREENLAND, Country.ICELAND);
setNeighbours(Country.ALBERTA, Country.ONTARIO);
setNeighbours(Country.ALBERTA, Country.WESTERNUNITEDSTATES);
setNeighbours(Country.ONTARIO, Country.EASTERNCANADA);
setNeighbours(Country.ONTARIO, Country.WESTERNUNITEDSTATES);
setNeighbours(Country.ONTARIO, Country.EASTERNUNITEDSTATES);
setNeighbours(Country.EASTERNCANADA, Country.EASTERNUNITEDSTATES);
setNeighbours(Country.WESTERNUNITEDSTATES, Country.EASTERNUNITEDSTATES);
setNeighbours(Country.WESTERNUNITEDSTATES, Country.CENTRALAMERICA);
setNeighbours(Country.EASTERNUNITEDSTATES, Country.CENTRALAMERICA);
setNeighbours(Country.CENTRALAMERICA, Country.VENEZUELA);
setNeighbours(Country.VENEZUELA, Country.PERU);
setNeighbours(Country.VENEZUELA, Country.BRAZIL);
setNeighbours(Country.PERU, Country.BRAZIL);
setNeighbours(Country.PERU, Country.ARGENTINA);
setNeighbours(Country.BRAZIL, Country.ARGENTINA);
setNeighbours(Country.BRAZIL, Country.NORTHAFRICA);
setNeighbours(Country.ICELAND, Country.SCANDINAVIA);
setNeighbours(Country.ICELAND, Country.GREATBRITAIN);
setNeighbours(Country.SCANDINAVIA, Country.RUSSIA);
setNeighbours(Country.SCANDINAVIA, Country.GREATBRITAIN);
setNeighbours(Country.SCANDINAVIA, Country.NORTHERNEUROPE);
setNeighbours(Country.GREATBRITAIN, Country.NORTHERNEUROPE);
setNeighbours(Country.GREATBRITAIN, Country.WESTERNEUROPE);
setNeighbours(Country.NORTHERNEUROPE, Country.SOUTHERNEUROPE);
setNeighbours(Country.NORTHERNEUROPE, Country.RUSSIA);
setNeighbours(Country.NORTHERNEUROPE, Country.WESTERNEUROPE);
setNeighbours(Country.WESTERNEUROPE, Country.SOUTHERNEUROPE);
setNeighbours(Country.WESTERNEUROPE, Country.NORTHAFRICA);
setNeighbours(Country.SOUTHERNEUROPE, Country.MIDDLEEAST);
setNeighbours(Country.NORTHAFRICA, Country.EGYPT);
setNeighbours(Country.NORTHAFRICA, Country.EASTAFRICA);
setNeighbours(Country.NORTHAFRICA, Country.CENTRALAFRICA);
setNeighbours(Country.EGYPT, Country.MIDDLEEAST);
setNeighbours(Country.EGYPT, Country.EASTAFRICA);
setNeighbours(Country.EASTAFRICA, Country.CENTRALAFRICA);
setNeighbours(Country.CENTRALAFRICA, Country.SOUTHAFRICA);
setNeighbours(Country.SOUTHAFRICA, Country.MADAGASCAR);
setNeighbours(Country.RUSSIA, Country.URAL);
setNeighbours(Country.RUSSIA, Country.AFGHANISTAN);
setNeighbours(Country.RUSSIA, Country.MIDDLEEAST);
setNeighbours(Country.URAL, Country.SIBERIA);
setNeighbours(Country.URAL, Country.AFGHANISTAN);
setNeighbours(Country.URAL, Country.CHINA);
setNeighbours(Country.SIBERIA, Country.YAKUTSK);
setNeighbours(Country.SIBERIA, Country.IRKUTSK);
setNeighbours(Country.SIBERIA, Country.MONGOLIA);
setNeighbours(Country.SIBERIA, Country.CHINA);
setNeighbours(Country.YAKUTSK, Country.KAMCHATKA);
setNeighbours(Country.YAKUTSK, Country.IRKUTSK);
setNeighbours(Country.KAMCHATKA, Country.JAPAN);
setNeighbours(Country.KAMCHATKA, Country.MONGOLIA);
setNeighbours(Country.IRKUTSK, Country.KAMCHATKA);
setNeighbours(Country.IRKUTSK, Country.MONGOLIA);
setNeighbours(Country.MONGOLIA, Country.JAPAN);
setNeighbours(Country.MONGOLIA, Country.CHINA);
setNeighbours(Country.AFGHANISTAN, Country.CHINA);
setNeighbours(Country.AFGHANISTAN, Country.INDIA);
setNeighbours(Country.AFGHANISTAN, Country.MIDDLEEAST);
setNeighbours(Country.CHINA, Country.INDIA);
setNeighbours(Country.CHINA, Country.SIAM);
setNeighbours(Country.MIDDLEEAST, Country.INDIA);
setNeighbours(Country.INDIA, Country.SIAM);
setNeighbours(Country.SIAM, Country.INDONESIA);
setNeighbours(Country.INDONESIA, Country.NEWGUINEA);
setNeighbours(Country.INDONESIA, Country.WESTERNAUSTRALIA);
setNeighbours(Country.INDONESIA, Country.EASTERNAUSTRALIA);
setNeighbours(Country.NEWGUINEA, Country.EASTERNAUSTRALIA);
setNeighbours(Country.WESTERNAUSTRALIA, Country.EASTERNAUSTRALIA);
}
|
public final Collection<CRResolvableBean> getObjects(
final CRRequest request, final boolean doNavigation) throws CRException {
UseCase uc = MonitorFactory.startUseCase("LuceneRequestProcessor."
+ "getObjects(" + name + ")");
UseCase ucPrepareSearch = MonitorFactory.startUseCase(
"LuceneRequestProcessor.getObjects(" + name
+ ")#prepareSearch");
ArrayList<CRResolvableBean> result = new ArrayList<CRResolvableBean>();
int count = request.getCount();
int start = request.getStart();
if (count <= 0) {
String cstring = (String) this.config.get(SEARCH_COUNT_KEY);
if (cstring != null) {
count = new Integer(cstring);
}
}
if (count <= 0) {
String message = "Default count is lower or equal to 0! This will "
+ "result in an error. Overthink your config (insert rp."
+ "<number>.searchcount=<value> in your properties file)!";
log.error(message);
throw new CRException(new CRError("Error", message));
}
if (start < 0) {
String message = "Bad request: start is lower than 0!";
log.error(message);
throw new CRException(new CRError("Error", message));
}
String scoreAttribute = (String) config.get(SCORE_ATTRIBUTE_KEY);
long s1 = System.currentTimeMillis();
ucPrepareSearch.stop();
UseCase ucSearch = MonitorFactory.startUseCase("LuceneRequestProcessor."
+ "getObjects(" + name + ")#search");
HashMap<String, Object> searchResult = null;
try {
searchResult = this.searcher.search(request.getRequestFilter(),
getSearchedAttributes(), count, start, doNavigation,
request.getSortArray(), request);
} catch (IOException ex) {
log.error("Error while getting search results from index.");
throw new CRException(ex);
}
ucSearch.stop();
UseCase ucProcessSearch = MonitorFactory.startUseCase(
"LuceneRequestProcessor." + "getObjects(" + name
+ ")#processSearch");
long e1 = System.currentTimeMillis();
log.debug("Search in Index took " + (e1 - s1) + "ms");
if (searchResult != null) {
UseCase ucProcessSearchMeta = MonitorFactory.startUseCase(
"LuceneRequestProcessor.getObjects(" + name
+ ")#processSearch.Metaresolvables");
Query parsedQuery =
(Query) searchResult.get(CRSearcher.RESULT_QUERY_KEY);
Object metaKey = request.get(META_RESOLVABLE_KEY);
if (metaKey != null && (Boolean) metaKey) {
CRResolvableBean metaBean = new CRMetaResolvableBean(
searchResult, request, start, count);
result.add(metaBean);
}
ucProcessSearchMeta.stop();
UseCase ucProcessSearchResolvables = MonitorFactory.startUseCase(
"LuceneRequestProcessor.getObjects(" + name
+ ")#processSearch.Resolvables");
LinkedHashMap<Document, Float> docs =
objectToLinkedHashMapDocuments(searchResult.get(
CRSearcher.RESULT_RESULT_KEY));
LuceneIndexLocation idsLocation =
LuceneIndexLocation.getIndexLocation(this.config);
IndexAccessor indexAccessor = idsLocation.getAccessor();
IndexReader reader = null;
try {
reader = indexAccessor.getReader(false);
Object highlightQuery = request.get(HIGHLIGHT_QUERY_KEY);
if (highlightQuery != null) {
Analyzer analyzer = LuceneAnalyzerFactory.createAnalyzer(
(GenericConfiguration) this.config);
QueryParser parser = CRQueryParserFactory
.getConfiguredParser(getSearchedAttributes(),
analyzer, request, config);
try {
parsedQuery = parser.parse((String) highlightQuery);
parsedQuery.rewrite(reader);
} catch (ParseException e) {
log.error(e.getMessage());
e.printStackTrace();
}
}
if (docs != null) {
String idAttribute = (String) this.config.get(ID_ATTRIBUTE_KEY);
for (Entry<Document, Float> e : docs.entrySet()) {
Document doc = e.getKey();
Float score = e.getValue();
CRResolvableBean crBean = new CRResolvableBean(doc.get(idAttribute));
if (getStoredAttributes) {
for (Field f : toFieldList(doc.getFields())) {
if (f.isStored()) {
if (f.isBinary()) {
crBean.set(f.name(), f.getBinaryValue());
} else {
crBean.set(f.name(), f.stringValue());
}
}
}
}
if (scoreAttribute != null && !"".equals(scoreAttribute)) {
crBean.set(scoreAttribute, score);
}
doHighlighting( crBean, doc, parsedQuery, reader);
ext_log.debug("Found " + crBean.getContentid() + " with score "
+ score.toString());
result.add(crBean);
}
}
} catch (IOException ioException) {
log.error("Cannot get Index reader for highlighting");
} finally {
indexAccessor.release(reader, false);
}
ucProcessSearchResolvables.stop();
}
ucProcessSearch.stop();
uc.stop();
return result;
}
| public final Collection<CRResolvableBean> getObjects(
final CRRequest request, final boolean doNavigation) throws CRException {
UseCase uc = MonitorFactory.startUseCase("LuceneRequestProcessor."
+ "getObjects(" + name + ")");
UseCase ucPrepareSearch = MonitorFactory.startUseCase(
"LuceneRequestProcessor.getObjects(" + name
+ ")#prepareSearch");
ArrayList<CRResolvableBean> result = new ArrayList<CRResolvableBean>();
int count = request.getCount();
int start = request.getStart();
if (count <= 0) {
String cstring = (String) this.config.get(SEARCH_COUNT_KEY);
if (cstring != null) {
count = new Integer(cstring);
}
}
if (count <= 0) {
String message = "Default count is lower or equal to 0! This will "
+ "result in an error. Overthink your config (insert rp."
+ "<number>.searchcount=<value> in your properties file)!";
log.error(message);
throw new CRException(new CRError("Error", message));
}
if (start < 0) {
String message = "Bad request: start is lower than 0!";
log.error(message);
throw new CRException(new CRError("Error", message));
}
String scoreAttribute = (String) config.get(SCORE_ATTRIBUTE_KEY);
long s1 = System.currentTimeMillis();
ucPrepareSearch.stop();
UseCase ucSearch = MonitorFactory.startUseCase("LuceneRequestProcessor."
+ "getObjects(" + name + ")#search");
HashMap<String, Object> searchResult = null;
try {
searchResult = this.searcher.search(request.getRequestFilter(),
getSearchedAttributes(), count, start, doNavigation,
request.getSortArray(), request);
} catch (IOException ex) {
log.error("Error while getting search results from index.");
throw new CRException(ex);
}
ucSearch.stop();
UseCase ucProcessSearch = MonitorFactory.startUseCase(
"LuceneRequestProcessor." + "getObjects(" + name
+ ")#processSearch");
long e1 = System.currentTimeMillis();
log.debug("Search in Index took " + (e1 - s1) + "ms");
if (searchResult != null) {
UseCase ucProcessSearchMeta = MonitorFactory.startUseCase(
"LuceneRequestProcessor.getObjects(" + name
+ ")#processSearch.Metaresolvables");
Query parsedQuery =
(Query) searchResult.get(CRSearcher.RESULT_QUERY_KEY);
Object metaKey = request.get(META_RESOLVABLE_KEY);
if (metaKey != null && (Boolean) metaKey) {
CRResolvableBean metaBean = new CRMetaResolvableBean(
searchResult, request, start, count);
result.add(metaBean);
}
ucProcessSearchMeta.stop();
UseCase ucProcessSearchResolvables = MonitorFactory.startUseCase(
"LuceneRequestProcessor.getObjects(" + name
+ ")#processSearch.Resolvables");
LinkedHashMap<Document, Float> docs =
objectToLinkedHashMapDocuments(searchResult.get(
CRSearcher.RESULT_RESULT_KEY));
LuceneIndexLocation idsLocation =
LuceneIndexLocation.getIndexLocation(this.config);
IndexAccessor indexAccessor = idsLocation.getAccessor();
IndexReader reader = null;
try {
reader = indexAccessor.getReader(false);
Object highlightQuery = request.get(HIGHLIGHT_QUERY_KEY);
if (highlightQuery != null) {
Analyzer analyzer = LuceneAnalyzerFactory.createAnalyzer(
(GenericConfiguration) this.config);
QueryParser parser = CRQueryParserFactory
.getConfiguredParser(getSearchedAttributes(),
analyzer, request, config);
try {
parsedQuery = parser.parse((String) highlightQuery);
parsedQuery = parsedQuery.rewrite(reader);
} catch (ParseException e) {
log.error(e.getMessage());
e.printStackTrace();
}
}
if (docs != null) {
String idAttribute = (String) this.config.get(ID_ATTRIBUTE_KEY);
for (Entry<Document, Float> e : docs.entrySet()) {
Document doc = e.getKey();
Float score = e.getValue();
CRResolvableBean crBean = new CRResolvableBean(doc.get(idAttribute));
if (getStoredAttributes) {
for (Field f : toFieldList(doc.getFields())) {
if (f.isStored()) {
if (f.isBinary()) {
crBean.set(f.name(), f.getBinaryValue());
} else {
crBean.set(f.name(), f.stringValue());
}
}
}
}
if (scoreAttribute != null && !"".equals(scoreAttribute)) {
crBean.set(scoreAttribute, score);
}
doHighlighting( crBean, doc, parsedQuery, reader);
ext_log.debug("Found " + crBean.getContentid() + " with score "
+ score.toString());
result.add(crBean);
}
}
} catch (IOException ioException) {
log.error("Cannot get Index reader for highlighting");
} finally {
indexAccessor.release(reader, false);
}
ucProcessSearchResolvables.stop();
}
ucProcessSearch.stop();
uc.stop();
return result;
}
|
public void processQueue() throws SQLException {
db.startTransaction();
vms = (ArrayList<VirtualMachine>) db.getVirtualMachineDB().getAll();
db.endTransaction(true);
for (int i = 0; i < vms.size(); i++) {
if (vms.get(i).isAvailable()) {
for (int j = 0; j < jobs.size(); j++) {
if (!jobs.get(j).getBrowser().equalsIgnoreCase("any") && jobs.get(j).getBrowserVersion().equalsIgnoreCase("any")) {
if (vms.get(i).getBrowsers().containsKey(jobs.get(j).getBrowser())) {
Job job = jobs.remove(j);
job.setQueue(vms.get(i).getId());
job.getMessage().setQueueNumber(vms.get(i).getId());
System.out.println(jobs.get(j).getBrowser());
job.getMessage().setBrowserVersion(vms.get(i).getBrowsers().get(jobs.get(j).getBrowser()));
job.setHostIP(vms.get(i).getIP());
sendSocketStream(job);
break;
}
} else if (!jobs.get(j).getBrowser().equalsIgnoreCase("any") && !jobs.get(j).getBrowserVersion().equalsIgnoreCase("any")){
if (vms.get(i).getBrowsers().containsKey(jobs.get(j).getBrowser()) && vms.get(i).getBrowsers().containsValue(jobs.get(j).getBrowserVersion())) {
Job job = jobs.remove(j);
job.setQueue(vms.get(i).getId());
job.getMessage().setQueueNumber(vms.get(i).getId());
job.setHostIP(vms.get(i).getIP());
sendSocketStream(job);
break;
}
}
}
}
}
}
| public void processQueue() throws SQLException {
db.startTransaction();
vms = (ArrayList<VirtualMachine>) db.getVirtualMachineDB().getAll();
db.endTransaction(true);
for (int i = 0; i < vms.size(); i++) {
if (vms.get(i).isAvailable()) {
for (int j = 0; j < jobs.size(); j++) {
if (!jobs.get(j).getBrowser().equalsIgnoreCase("any") && jobs.get(j).getBrowserVersion().equalsIgnoreCase("any")) {
if (vms.get(i).getBrowsers().containsKey(jobs.get(j).getBrowser())) {
Job job = jobs.remove(j);
job.setQueue(vms.get(i).getId());
job.getMessage().setQueueNumber(vms.get(i).getId());
System.out.println(job.getBrowser());
job.getMessage().setBrowserVersion(vms.get(i).getBrowsers().get(job.getBrowser()));
job.setHostIP(vms.get(i).getIP());
sendSocketStream(job);
break;
}
} else if (!jobs.get(j).getBrowser().equalsIgnoreCase("any") && !jobs.get(j).getBrowserVersion().equalsIgnoreCase("any")){
if (vms.get(i).getBrowsers().containsKey(jobs.get(j).getBrowser()) && vms.get(i).getBrowsers().containsValue(jobs.get(j).getBrowserVersion())) {
Job job = jobs.remove(j);
job.setQueue(vms.get(i).getId());
job.getMessage().setQueueNumber(vms.get(i).getId());
job.setHostIP(vms.get(i).getIP());
sendSocketStream(job);
break;
}
}
}
}
}
}
|
public Object post( Context context, Request request, Response response, Object payload )
throws ResourceException
{
PrivilegeResourceRequest resourceRequest = (PrivilegeResourceRequest) payload;
PrivilegeListResourceResponse result = null;
if ( resourceRequest != null )
{
result = new PrivilegeListResourceResponse();
PrivilegeResource resource = resourceRequest.getData();
if ( !TargetPrivilegeDescriptor.TYPE.equals( resource.getType() ) )
{
throw new PlexusResourceException(
Status.CLIENT_ERROR_BAD_REQUEST,
"Configuration error.",
getErrorResponse( "type", "Not allowed privilege type!" ) );
}
List<String> methods = resource.getMethod();
if ( methods == null || methods.size() == 0 )
{
throw new PlexusResourceException(
Status.CLIENT_ERROR_BAD_REQUEST,
"Configuration error.",
getErrorResponse( "method", "No method(s) supplied, must select at least one method." ) );
}
else
{
try
{
for ( String method : methods )
{
Privilege priv = new Privilege();
priv.setName( resource.getName() != null ? resource.getName() + " - (" + method + ")" : null );
priv.setDescription( resource.getDescription() );
priv.setType( TargetPrivilegeDescriptor.TYPE );
priv.addProperty( ApplicationPrivilegeMethodPropertyDescriptor.ID, method );
priv.addProperty( TargetPrivilegeRepositoryTargetPropertyDescriptor.ID, resource
.getRepositoryTargetId() );
priv.addProperty( TargetPrivilegeRepositoryPropertyDescriptor.ID, resource.getRepositoryId() );
priv.addProperty( TargetPrivilegeGroupPropertyDescriptor.ID, resource.getRepositoryGroupId() );
priv = getSecuritySystem().getAuthorizationManager( DEFAULT_SOURCE ).addPrivilege( priv );
result.addData( this.securityToRestModel( priv, request ) );
}
}
catch ( InvalidConfigurationException e )
{
handleInvalidConfigurationException( e );
}
catch ( NoSuchAuthorizationManager e )
{
this.getLogger().warn( "Could not find the default AuthorizationManager", e );
throw new ResourceException( Status.SERVER_ERROR_INTERNAL, e );
}
}
}
return result;
}
| public Object post( Context context, Request request, Response response, Object payload )
throws ResourceException
{
PrivilegeResourceRequest resourceRequest = (PrivilegeResourceRequest) payload;
PrivilegeListResourceResponse result = null;
if ( resourceRequest != null )
{
result = new PrivilegeListResourceResponse();
PrivilegeResource resource = resourceRequest.getData();
if ( !TargetPrivilegeDescriptor.TYPE.equals( resource.getType() ) )
{
throw new PlexusResourceException(
Status.CLIENT_ERROR_BAD_REQUEST,
"Configuration error.",
getErrorResponse( "type", "Not allowed privilege type!" ) );
}
List<String> methods = resource.getMethod();
if ( methods == null || methods.size() == 0 )
{
throw new PlexusResourceException(
Status.CLIENT_ERROR_BAD_REQUEST,
"Configuration error.",
getErrorResponse( "method", "No method(s) supplied, must select at least one method." ) );
}
else
{
try
{
for ( String method : methods )
{
Privilege priv = new Privilege();
priv.setName( resource.getName() != null ? resource.getName() + " - (" + method + ")" : null );
priv.setDescription( resource.getDescription() );
priv.setType( TargetPrivilegeDescriptor.TYPE );
priv.addProperty( ApplicationPrivilegeMethodPropertyDescriptor.ID, method );
priv.addProperty( TargetPrivilegeRepositoryTargetPropertyDescriptor.ID, resource
.getRepositoryTargetId() );
priv.addProperty( TargetPrivilegeRepositoryPropertyDescriptor.ID, resource.getRepositoryId() );
priv.addProperty( TargetPrivilegeGroupPropertyDescriptor.ID, resource.getRepositoryGroupId() );
priv = getSecuritySystem().getAuthorizationManager( DEFAULT_SOURCE ).addPrivilege( priv );
result.addData( this.securityToRestModel( priv, request, true ) );
}
}
catch ( InvalidConfigurationException e )
{
handleInvalidConfigurationException( e );
}
catch ( NoSuchAuthorizationManager e )
{
this.getLogger().warn( "Could not find the default AuthorizationManager", e );
throw new ResourceException( Status.SERVER_ERROR_INTERNAL, e );
}
}
}
return result;
}
|
public Set<String> getAllAvailableNames() {
ServletContext ctx = getServletContext();
if (ctx == null) {
logger.warn("Servlet context not available - cannot get all available names");
return Collections.emptySet();
}
Set<String> names = new HashSet<String>();
Set<String> resources = ctx.getResourcePaths(getRootPath());
for (String resource : resources) {
String filename = StringUtils.removeStart(resource, getRootPath());
if (getSuffix() != null) {
if (resource.endsWith(getSuffix())) {
names.add(stripSuffix(filename));
}
} else {
names.add(filename);
}
}
return names;
}
| public Set<String> getAllAvailableNames() {
ServletContext ctx = getServletContext();
if (ctx == null) {
logger.warn("Servlet context not available - cannot get all available names");
return Collections.emptySet();
}
Set<String> names = new HashSet<String>();
Set<String> resources = ctx.getResourcePaths(getRootPath());
for (String resource : resources) {
String filename = StringUtils.substringAfter(resource, getRootPath());
if (getSuffix() != null) {
if (resource.endsWith(getSuffix())) {
names.add(stripSuffix(filename));
}
} else {
names.add(filename);
}
}
return names;
}
|
public boolean onCommand(CommandSender sender, Command command, String commandLabel, String[] args) {
YamlConfiguration config = (YamlConfiguration) plugin.getConfig();
boolean auth = false;
Player player = null;
String admin = "server";
if (sender instanceof Player){
player = (Player)sender;
if (Permissions.Security.permission(player, "ultraban.lockdown")){
auth = true;
}else{
if (player.isOp()) auth = true;
}
admin = player.getName();
}else{
auth = true;
}
if (!auth){
sender.sendMessage(ChatColor.RED + "You do not have the required permissions.");
return true;
}
boolean lock = config.getBoolean("lockdown", false);
String toggle = args[0];
if (toggle.equalsIgnoreCase("on")){
if(!lock){
lockdownOn();
sender.sendMessage(ChatColor.GRAY + "Lockdown initiated.PlayerLogin disabled.");
UltraBan.log.log(Level.INFO, admin + " initiated lockdown.");
}
if(lock) sender.sendMessage(ChatColor.GRAY + "Lockdown already initiated.PlayerLogin disabled.");
return true;
}
if (toggle.equalsIgnoreCase("off")){
if(lock){
lockdownEnd();
sender.sendMessage(ChatColor.GRAY + "Lockdown ended.PlayerLogin reenabled.");
UltraBan.log.log(Level.INFO, admin + " disabled lockdown.");
}
if(!lock) sender.sendMessage(ChatColor.GRAY + "Lockdown already ended / never initiated.");
return true;
}
if (toggle.equalsIgnoreCase("status")){
if(lock) sender.sendMessage(ChatColor.GRAY + "Lockdown in progress.PlayerLogin disabled.");
if(!lock) sender. sendMessage(ChatColor.GRAY + "Lockdown is not in progress.");
}
return false;
}
| public boolean onCommand(CommandSender sender, Command command, String commandLabel, String[] args) {
YamlConfiguration config = (YamlConfiguration) plugin.getConfig();
boolean auth = false;
Player player = null;
String admin = "server";
if (sender instanceof Player){
player = (Player)sender;
if (Permissions.Security.permission(player, "ultraban.lockdown")){
auth = true;
}else{
if (player.isOp()) auth = true;
}
admin = player.getName();
}else{
auth = true;
}
if (!auth){
sender.sendMessage(ChatColor.RED + "You do not have the required permissions.");
return true;
}
boolean lock = config.getBoolean("lockdown", false);
if (args.length < 1) return false;
String toggle = args[0];
if (toggle.equalsIgnoreCase("on")){
if(!lock){
lockdownOn();
sender.sendMessage(ChatColor.GRAY + "Lockdown initiated.PlayerLogin disabled.");
UltraBan.log.log(Level.INFO, admin + " initiated lockdown.");
}
if(lock) sender.sendMessage(ChatColor.GRAY + "Lockdown already initiated.PlayerLogin disabled.");
return true;
}
if (toggle.equalsIgnoreCase("off")){
if(lock){
lockdownEnd();
sender.sendMessage(ChatColor.GRAY + "Lockdown ended.PlayerLogin reenabled.");
UltraBan.log.log(Level.INFO, admin + " disabled lockdown.");
}
if(!lock) sender.sendMessage(ChatColor.GRAY + "Lockdown already ended / never initiated.");
return true;
}
if (toggle.equalsIgnoreCase("status")){
if(lock) sender.sendMessage(ChatColor.GRAY + "Lockdown in progress.PlayerLogin disabled.");
if(!lock) sender. sendMessage(ChatColor.GRAY + "Lockdown is not in progress.");
}
return false;
}
|
private void initComponents() {
helpDialog = new javax.swing.JDialog();
helpCloseButton = new javax.swing.JButton();
jLabel11 = new javax.swing.JLabel();
jLabel12 = new javax.swing.JLabel();
jLabel13 = new javax.swing.JLabel();
jLabel23 = new javax.swing.JLabel();
jLabel24 = new javax.swing.JLabel();
jLabel25 = new javax.swing.JLabel();
jLabel26 = new javax.swing.JLabel();
JGAAP_TabbedPane = new javax.swing.JTabbedPane();
JGAAP_DocumentsPanel = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
DocumentsPanel_UnknownAuthorsTable = new javax.swing.JTable();
jScrollPane2 = new javax.swing.JScrollPane();
DocumentsPanel_KnownAuthorsTree = new javax.swing.JTree();
DocumentsPanel_AddDocumentsButton = new javax.swing.JButton();
DocumentsPanel_RemoveDocumentsButton = new javax.swing.JButton();
DocumentsPanel_AddAuthorButton = new javax.swing.JButton();
DocumentsPanel_EditAuthorButton = new javax.swing.JButton();
DocumentsPanel_RemoveAuthorButton = new javax.swing.JButton();
DocumentsPanel_NotesButton = new javax.swing.JButton();
jLabel10 = new javax.swing.JLabel();
DocumentsPanel_LanguageComboBox = new javax.swing.JComboBox();
JGAAP_CanonicizerPanel = new javax.swing.JPanel();
CanonicizersPanel_RemoveCanonicizerButton = new javax.swing.JButton();
jLabel27 = new javax.swing.JLabel();
CanonicizersPanel_NotesButton = new javax.swing.JButton();
jScrollPane11 = new javax.swing.JScrollPane();
CanonicizersPanel_DocumentsCanonicizerDescriptionTextBox = new javax.swing.JTextArea();
CanonicizersPanel_AddCanonicizerButton = new javax.swing.JButton();
CanonicizersPanel_AddAllCanonicizersButton = new javax.swing.JButton();
jScrollPane12 = new javax.swing.JScrollPane();
CanonicizersPanel_CanonicizerListBox = new javax.swing.JList();
jScrollPane13 = new javax.swing.JScrollPane();
CanonicizersPanel_SelectedCanonicizerListBox = new javax.swing.JList();
CanonicizersPanel_RemoveAllCanonicizersButton = new javax.swing.JButton();
jLabel31 = new javax.swing.JLabel();
jScrollPane20 = new javax.swing.JScrollPane();
CanonicizersPanel_DocumentsTable = new javax.swing.JTable();
jScrollPane21 = new javax.swing.JScrollPane();
CanonicizersPanel_DocumentsCurrentCanonicizersTextBox = new javax.swing.JTextArea();
CanonicizersPanel_SetToDocumentButton = new javax.swing.JButton();
CanonicizersPanel_SetToDocumentTypeButton = new javax.swing.JButton();
CanonicizersPanel_SetToAllDocuments = new javax.swing.JButton();
jLabel29 = new javax.swing.JLabel();
jLabel30 = new javax.swing.JLabel();
jLabel32 = new javax.swing.JLabel();
jLabel33 = new javax.swing.JLabel();
jLabel34 = new javax.swing.JLabel();
JGAAP_EventSetsPanel = new javax.swing.JPanel();
EventSetsPanel_NotesButton = new javax.swing.JButton();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
jScrollPane9 = new javax.swing.JScrollPane();
EventSetsPanel_EventSetListBox = new javax.swing.JList();
jScrollPane10 = new javax.swing.JScrollPane();
EventSetsPanel_SelectedEventSetListBox = new javax.swing.JList();
EventSetsPanel_ParametersPanel = new javax.swing.JPanel();
jScrollPane6 = new javax.swing.JScrollPane();
EventSetsPanel_EventSetDescriptionTextBox = new javax.swing.JTextArea();
EventSetsPanel_AddEventSetButton = new javax.swing.JButton();
EventSetsPanel_RemoveEventSetButton = new javax.swing.JButton();
EventSetsPanel_AddAllEventSetsButton = new javax.swing.JButton();
EventSetsPanel_RemoveAllEventSetsButton = new javax.swing.JButton();
JGAAP_EventCullingPanel = new javax.swing.JPanel();
jLabel15 = new javax.swing.JLabel();
jLabel16 = new javax.swing.JLabel();
jLabel17 = new javax.swing.JLabel();
EventCullingPanel_NotesButton = new javax.swing.JButton();
jScrollPane14 = new javax.swing.JScrollPane();
EventCullingPanel_SelectedEventCullingListBox = new javax.swing.JList();
EventCullingPanel_AddEventCullingButton = new javax.swing.JButton();
EventCullingPanel_RemoveEventCullingButton = new javax.swing.JButton();
EventCullingPanel_AddAllEventCullingButton = new javax.swing.JButton();
EventCullingPanel_RemoveAllEventCullingButton = new javax.swing.JButton();
EventCullingPanel_ParametersPanel = new javax.swing.JPanel();
jScrollPane15 = new javax.swing.JScrollPane();
EventCullingPanel_EventCullingListBox = new javax.swing.JList();
jScrollPane16 = new javax.swing.JScrollPane();
EventCullingPanel_EventCullingDescriptionTextbox = new javax.swing.JTextArea();
jLabel18 = new javax.swing.JLabel();
JGAAP_AnalysisMethodPanel = new javax.swing.JPanel();
jLabel20 = new javax.swing.JLabel();
jLabel21 = new javax.swing.JLabel();
jLabel22 = new javax.swing.JLabel();
AnalysisMethodPanel_NotesButton = new javax.swing.JButton();
jScrollPane17 = new javax.swing.JScrollPane();
AnalysisMethodPanel_SelectedAnalysisMethodsListBox = new javax.swing.JList();
AnalysisMethodPanel_AddAnalysisMethodButton = new javax.swing.JButton();
AnalysisMethodPanel_RemoveAnalysisMethodsButton = new javax.swing.JButton();
AnalysisMethodPanel_AddAllAnalysisMethodsButton = new javax.swing.JButton();
AnalysisMethodPanel_RemoveAllAnalysisMethodsButton = new javax.swing.JButton();
AnalysisMethodPanel_AMParametersPanel = new javax.swing.JPanel();
jScrollPane18 = new javax.swing.JScrollPane();
AnalysisMethodPanel_AnalysisMethodsListBox = new javax.swing.JList();
jLabel28 = new javax.swing.JLabel();
jScrollPane19 = new javax.swing.JScrollPane();
AnalysisMethodPanel_AnalysisMethodDescriptionTextBox = new javax.swing.JTextArea();
jScrollPane22 = new javax.swing.JScrollPane();
AnalysisMethodPanel_DistanceFunctionsListBox = new javax.swing.JList();
jLabel35 = new javax.swing.JLabel();
jScrollPane23 = new javax.swing.JScrollPane();
AnalysisMethodPanel_DistanceFunctionDescriptionTextBox = new javax.swing.JTextArea();
jLabel36 = new javax.swing.JLabel();
AnalysisMethodPanel_DFParametersPanel = new javax.swing.JPanel();
jLabel37 = new javax.swing.JLabel();
JGAAP_ReviewPanel = new javax.swing.JPanel();
ReviewPanel_ProcessButton = new javax.swing.JButton();
ReviewPanel_DocumentsLabel = new javax.swing.JLabel();
jScrollPane24 = new javax.swing.JScrollPane();
ReviewPanel_DocumentsTable = new javax.swing.JTable();
ReviewPanel_SelectedEventSetLabel = new javax.swing.JLabel();
ReviewPanel_SelectedEventCullingLabel = new javax.swing.JLabel();
ReviewPanel_SelectedAnalysisMethodsLabel = new javax.swing.JLabel();
jScrollPane25 = new javax.swing.JScrollPane();
ReviewPanel_SelectedEventSetListBox = new javax.swing.JList();
jScrollPane26 = new javax.swing.JScrollPane();
ReviewPanel_SelectedEventCullingListBox = new javax.swing.JList();
jScrollPane27 = new javax.swing.JScrollPane();
ReviewPanel_SelectedAnalysisMethodsListBox = new javax.swing.JList();
Next_Button = new javax.swing.JButton();
Review_Button = new javax.swing.JButton();
JGAAP_MenuBar = new javax.swing.JMenuBar();
jMenu1 = new javax.swing.JMenu();
jMenu4 = new javax.swing.JMenu();
BatchSaveMenuItem = new javax.swing.JMenuItem();
BatchLoadMenuItem = new javax.swing.JMenuItem();
jMenu2 = new javax.swing.JMenu();
ProblemAMenuItem = new javax.swing.JMenuItem();
ProblemBMenuItem = new javax.swing.JMenuItem();
ProblemCMenuItem = new javax.swing.JMenuItem();
ProblemDMenuItem = new javax.swing.JMenuItem();
ProblemEMenuItem = new javax.swing.JMenuItem();
ProblemFMenuItem = new javax.swing.JMenuItem();
ProblemGMenuItem = new javax.swing.JMenuItem();
ProblemHMenuItem = new javax.swing.JMenuItem();
ProblemIMenuItem = new javax.swing.JMenuItem();
ProblemJMenuItem = new javax.swing.JMenuItem();
ProblemKMenuItem = new javax.swing.JMenuItem();
ProblemLMenuItem = new javax.swing.JMenuItem();
ProblemMMenuItem = new javax.swing.JMenuItem();
exitMenuItem = new javax.swing.JMenuItem();
helpMenu = new javax.swing.JMenu();
aboutMenuItem = new javax.swing.JMenuItem();
helpDialog.setTitle("About");
helpDialog.setMinimumSize(new java.awt.Dimension(520, 300));
helpDialog.setResizable(false);
helpCloseButton.setText("close");
helpCloseButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
helpCloseButtonActionPerformed(evt);
}
});
jLabel11.setFont(new java.awt.Font("Lucida Grande", 0, 24));
jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel11.setText("JGAAP 5.0");
jLabel12.setText("<html> JGAAP, the Java Graphical Authorship Attribution Program, <br/>is an opensource author attribution / text classification tool <br/>Developed by the EVL lab (Evaluating Variation in Language Labratory) <br/> Released by Patrick Juola under the GPL v3.0");
jLabel13.setText("©2011 EVL lab");
jLabel23.setForeground(new java.awt.Color(0, 0, 255));
jLabel23.setText("http://evllabs.com");
jLabel23.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jLabel23MouseClicked(evt);
}
});
jLabel24.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/jgaap/ui/resources/jgaap_icon.png")));
jLabel25.setForeground(new java.awt.Color(0, 0, 255));
jLabel25.setText("http://jgaap.com");
jLabel25.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jLabel25MouseClicked(evt);
}
});
jLabel26.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/jgaap/ui/resources/EVLlab_icon.png")));
javax.swing.GroupLayout helpDialogLayout = new javax.swing.GroupLayout(helpDialog.getContentPane());
helpDialog.getContentPane().setLayout(helpDialogLayout);
helpDialogLayout.setHorizontalGroup(
helpDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(helpDialogLayout.createSequentialGroup()
.addGroup(helpDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(helpDialogLayout.createSequentialGroup()
.addContainerGap()
.addGroup(helpDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(helpDialogLayout.createSequentialGroup()
.addComponent(jLabel24)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel26))
.addComponent(helpCloseButton, javax.swing.GroupLayout.Alignment.TRAILING)))
.addGroup(helpDialogLayout.createSequentialGroup()
.addGap(199, 199, 199)
.addGroup(helpDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel23)
.addGroup(helpDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel13)
.addComponent(jLabel25))))
.addGroup(helpDialogLayout.createSequentialGroup()
.addGap(58, 58, 58)
.addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 452, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap())
);
helpDialogLayout.setVerticalGroup(
helpDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(helpDialogLayout.createSequentialGroup()
.addGroup(helpDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(helpDialogLayout.createSequentialGroup()
.addGroup(helpDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel24)
.addGroup(helpDialogLayout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel26, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, helpDialogLayout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel11)
.addGap(44, 44, 44)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel23)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel25)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE)
.addGroup(helpDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(helpCloseButton)
.addComponent(jLabel13))
.addContainerGap())
);
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("JGAAP");
JGAAP_TabbedPane.setName("JGAAP_TabbedPane");
jLabel1.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel1.setText("Unknown Authors");
jLabel2.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel2.setText("Known Authors");
DocumentsPanel_UnknownAuthorsTable.setModel(UnknownAuthorDocumentsTable_Model);
DocumentsPanel_UnknownAuthorsTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_LAST_COLUMN);
DocumentsPanel_UnknownAuthorsTable.setColumnSelectionAllowed(true);
DocumentsPanel_UnknownAuthorsTable.getTableHeader().setReorderingAllowed(false);
jScrollPane1.setViewportView(DocumentsPanel_UnknownAuthorsTable);
DocumentsPanel_UnknownAuthorsTable.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
DocumentsPanel_KnownAuthorsTree.setModel(KnownAuthorsTree_Model);
DocumentsPanel_KnownAuthorsTree.setShowsRootHandles(true);
jScrollPane2.setViewportView(DocumentsPanel_KnownAuthorsTree);
DocumentsPanel_AddDocumentsButton.setText("Add Document");
DocumentsPanel_AddDocumentsButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
DocumentsPanel_AddDocumentsButtonActionPerformed(evt);
}
});
DocumentsPanel_RemoveDocumentsButton.setText("Remove Document");
DocumentsPanel_RemoveDocumentsButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
DocumentsPanel_RemoveDocumentsButtonActionPerformed(evt);
}
});
DocumentsPanel_AddAuthorButton.setLabel("Add Author");
DocumentsPanel_AddAuthorButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
DocumentsPanel_AddAuthorButtonActionPerformed(evt);
}
});
DocumentsPanel_EditAuthorButton.setLabel("Edit Author");
DocumentsPanel_EditAuthorButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
DocumentsPanel_EditAuthorButtonActionPerformed(evt);
}
});
DocumentsPanel_RemoveAuthorButton.setLabel("Remove Author");
DocumentsPanel_RemoveAuthorButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
DocumentsPanel_RemoveAuthorButtonActionPerformed(evt);
}
});
DocumentsPanel_NotesButton.setLabel("Notes");
DocumentsPanel_NotesButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
DocumentsPanel_NotesButtonActionPerformed(evt);
}
});
jLabel10.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel10.setText("Language");
DocumentsPanel_LanguageComboBox.setModel(LanguageComboBox_Model);
DocumentsPanel_LanguageComboBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
DocumentsPanel_LanguageComboBoxActionPerformed(evt);
}
});
javax.swing.GroupLayout JGAAP_DocumentsPanelLayout = new javax.swing.GroupLayout(JGAAP_DocumentsPanel);
JGAAP_DocumentsPanel.setLayout(JGAAP_DocumentsPanelLayout);
JGAAP_DocumentsPanelLayout.setHorizontalGroup(
JGAAP_DocumentsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, JGAAP_DocumentsPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(JGAAP_DocumentsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 824, Short.MAX_VALUE)
.addGroup(JGAAP_DocumentsPanelLayout.createSequentialGroup()
.addGroup(JGAAP_DocumentsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel10)
.addComponent(DocumentsPanel_LanguageComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 656, Short.MAX_VALUE)
.addComponent(DocumentsPanel_NotesButton))
.addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 824, Short.MAX_VALUE)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, JGAAP_DocumentsPanelLayout.createSequentialGroup()
.addGroup(JGAAP_DocumentsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel1)
.addGroup(JGAAP_DocumentsPanelLayout.createSequentialGroup()
.addComponent(DocumentsPanel_AddDocumentsButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(DocumentsPanel_RemoveDocumentsButton))
.addComponent(jLabel2))
.addGap(512, 512, 512))
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, JGAAP_DocumentsPanelLayout.createSequentialGroup()
.addComponent(DocumentsPanel_AddAuthorButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(DocumentsPanel_EditAuthorButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(DocumentsPanel_RemoveAuthorButton)))
.addContainerGap())
);
JGAAP_DocumentsPanelLayout.setVerticalGroup(
JGAAP_DocumentsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_DocumentsPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(JGAAP_DocumentsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(DocumentsPanel_NotesButton)
.addGroup(JGAAP_DocumentsPanelLayout.createSequentialGroup()
.addComponent(jLabel10)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(DocumentsPanel_LanguageComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_DocumentsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(DocumentsPanel_RemoveDocumentsButton)
.addComponent(DocumentsPanel_AddDocumentsButton))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 191, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_DocumentsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(DocumentsPanel_RemoveAuthorButton)
.addComponent(DocumentsPanel_EditAuthorButton)
.addComponent(DocumentsPanel_AddAuthorButton))
.addContainerGap())
);
JGAAP_TabbedPane.addTab("Documents", JGAAP_DocumentsPanel);
CanonicizersPanel_RemoveCanonicizerButton.setText("\u2190");
CanonicizersPanel_RemoveCanonicizerButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CanonicizersPanel_RemoveCanonicizerButtonActionPerformed(evt);
}
});
jLabel27.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel27.setText("Documents");
CanonicizersPanel_NotesButton.setLabel("Notes");
CanonicizersPanel_NotesButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CanonicizersPanel_NotesButtonActionPerformed(evt);
}
});
CanonicizersPanel_DocumentsCanonicizerDescriptionTextBox.setColumns(20);
CanonicizersPanel_DocumentsCanonicizerDescriptionTextBox.setLineWrap(true);
CanonicizersPanel_DocumentsCanonicizerDescriptionTextBox.setRows(5);
CanonicizersPanel_DocumentsCanonicizerDescriptionTextBox.setWrapStyleWord(true);
jScrollPane11.setViewportView(CanonicizersPanel_DocumentsCanonicizerDescriptionTextBox);
CanonicizersPanel_AddCanonicizerButton.setText("\u2192");
CanonicizersPanel_AddCanonicizerButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CanonicizersPanel_AddCanonicizerButtonActionPerformed(evt);
}
});
CanonicizersPanel_AddAllCanonicizersButton.setText("All");
CanonicizersPanel_AddAllCanonicizersButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CanonicizersPanel_AddAllCanonicizersButtonActionPerformed(evt);
}
});
CanonicizersPanel_CanonicizerListBox.setModel(CanonicizerListBox_Model);
CanonicizersPanel_CanonicizerListBox.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
CanonicizersPanel_CanonicizerListBox.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
CanonicizersPanel_CanonicizerListBoxMouseClicked(evt);
}
});
CanonicizersPanel_CanonicizerListBox.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
CanonicizersPanel_CanonicizerListBoxMouseMoved(evt);
}
});
jScrollPane12.setViewportView(CanonicizersPanel_CanonicizerListBox);
CanonicizersPanel_SelectedCanonicizerListBox.setModel(SelectedCanonicizerListBox_Model);
CanonicizersPanel_SelectedCanonicizerListBox.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
CanonicizersPanel_SelectedCanonicizerListBox.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
CanonicizersPanel_SelectedCanonicizerListBoxMouseClicked(evt);
}
});
CanonicizersPanel_SelectedCanonicizerListBox.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
CanonicizersPanel_SelectedCanonicizerListBoxMouseMoved(evt);
}
});
jScrollPane13.setViewportView(CanonicizersPanel_SelectedCanonicizerListBox);
CanonicizersPanel_RemoveAllCanonicizersButton.setText("Clear");
CanonicizersPanel_RemoveAllCanonicizersButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CanonicizersPanel_RemoveAllCanonicizersButtonActionPerformed(evt);
}
});
jLabel31.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel31.setText("Document's Current Canonicizers");
CanonicizersPanel_DocumentsTable.setModel(DocumentsTable_Model);
jScrollPane20.setViewportView(CanonicizersPanel_DocumentsTable);
CanonicizersPanel_DocumentsCurrentCanonicizersTextBox.setColumns(20);
CanonicizersPanel_DocumentsCurrentCanonicizersTextBox.setLineWrap(true);
CanonicizersPanel_DocumentsCurrentCanonicizersTextBox.setRows(5);
CanonicizersPanel_DocumentsCurrentCanonicizersTextBox.setWrapStyleWord(true);
jScrollPane21.setViewportView(CanonicizersPanel_DocumentsCurrentCanonicizersTextBox);
CanonicizersPanel_SetToDocumentButton.setText("Set to Doc");
CanonicizersPanel_SetToDocumentButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CanonicizersPanel_SetToDocumentButtonActionPerformed(evt);
}
});
CanonicizersPanel_SetToDocumentTypeButton.setText("Set to Doc Type");
CanonicizersPanel_SetToDocumentTypeButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CanonicizersPanel_SetToDocumentTypeButtonActionPerformed(evt);
}
});
CanonicizersPanel_SetToAllDocuments.setText("Set to All Docs");
CanonicizersPanel_SetToAllDocuments.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CanonicizersPanel_SetToAllDocumentsActionPerformed(evt);
}
});
jLabel29.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel29.setText("Selected");
jLabel30.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel30.setText("Canonicizers");
jLabel32.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel32.setText("Canonicizer Description");
jLabel33.setText("Note: These buttons are used to add");
jLabel34.setText("selected canonicizers to documents.");
javax.swing.GroupLayout JGAAP_CanonicizerPanelLayout = new javax.swing.GroupLayout(JGAAP_CanonicizerPanel);
JGAAP_CanonicizerPanel.setLayout(JGAAP_CanonicizerPanelLayout);
JGAAP_CanonicizerPanelLayout.setHorizontalGroup(
JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_CanonicizerPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_CanonicizerPanelLayout.createSequentialGroup()
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_CanonicizerPanelLayout.createSequentialGroup()
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel30)
.addComponent(jScrollPane12, javax.swing.GroupLayout.DEFAULT_SIZE, 155, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(CanonicizersPanel_AddCanonicizerButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(CanonicizersPanel_RemoveCanonicizerButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(CanonicizersPanel_AddAllCanonicizersButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(CanonicizersPanel_RemoveAllCanonicizersButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
.addComponent(jLabel33)
.addComponent(jLabel34))
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(CanonicizersPanel_SetToDocumentTypeButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE)
.addComponent(jLabel29)
.addComponent(CanonicizersPanel_SetToDocumentButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE)
.addComponent(jScrollPane13, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE)
.addComponent(CanonicizersPanel_SetToAllDocuments, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane20, javax.swing.GroupLayout.DEFAULT_SIZE, 437, Short.MAX_VALUE)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, JGAAP_CanonicizerPanelLayout.createSequentialGroup()
.addComponent(jLabel27)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 255, Short.MAX_VALUE)
.addComponent(CanonicizersPanel_NotesButton))))
.addGroup(JGAAP_CanonicizerPanelLayout.createSequentialGroup()
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(jScrollPane21, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel31, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel32)
.addComponent(jScrollPane11, javax.swing.GroupLayout.DEFAULT_SIZE, 463, Short.MAX_VALUE))))
.addContainerGap())
);
JGAAP_CanonicizerPanelLayout.setVerticalGroup(
JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, JGAAP_CanonicizerPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel27)
.addComponent(jLabel30)
.addComponent(jLabel29))
.addGroup(JGAAP_CanonicizerPanelLayout.createSequentialGroup()
.addGap(5, 5, 5)
.addComponent(CanonicizersPanel_NotesButton)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane20, javax.swing.GroupLayout.DEFAULT_SIZE, 304, Short.MAX_VALUE)
.addGroup(JGAAP_CanonicizerPanelLayout.createSequentialGroup()
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_CanonicizerPanelLayout.createSequentialGroup()
.addComponent(CanonicizersPanel_AddCanonicizerButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(CanonicizersPanel_RemoveCanonicizerButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(CanonicizersPanel_AddAllCanonicizersButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(CanonicizersPanel_RemoveAllCanonicizersButton))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, JGAAP_CanonicizerPanelLayout.createSequentialGroup()
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jScrollPane13, javax.swing.GroupLayout.DEFAULT_SIZE, 217, Short.MAX_VALUE)
.addComponent(jScrollPane12, javax.swing.GroupLayout.DEFAULT_SIZE, 217, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(CanonicizersPanel_SetToDocumentButton)))
.addGap(6, 6, 6)
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(JGAAP_CanonicizerPanelLayout.createSequentialGroup()
.addComponent(jLabel33)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel34)
.addGap(18, 18, 18))
.addGroup(JGAAP_CanonicizerPanelLayout.createSequentialGroup()
.addComponent(CanonicizersPanel_SetToDocumentTypeButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(CanonicizersPanel_SetToAllDocuments)))))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel31)
.addComponent(jLabel32))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jScrollPane21, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
);
JGAAP_TabbedPane.addTab("Canonicizers", JGAAP_CanonicizerPanel);
EventSetsPanel_NotesButton.setLabel("Notes");
EventSetsPanel_NotesButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
EventSetsPanel_NotesButtonActionPerformed(evt);
}
});
jLabel6.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel6.setText("Event Drivers");
jLabel7.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel7.setText("Parameters");
jLabel8.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel8.setText("Event Driver Description");
jLabel9.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel9.setText("Selected");
EventSetsPanel_EventSetListBox.setModel(EventSetsListBox_Model);
EventSetsPanel_EventSetListBox.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
EventSetsPanel_EventSetListBox.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
EventSetsPanel_EventSetListBoxMouseClicked(evt);
}
});
EventSetsPanel_EventSetListBox.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
EventSetsPanel_EventSetListBoxMouseMoved(evt);
}
});
jScrollPane9.setViewportView(EventSetsPanel_EventSetListBox);
EventSetsPanel_SelectedEventSetListBox.setModel(SelectedEventSetsListBox_Model);
EventSetsPanel_SelectedEventSetListBox.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
EventSetsPanel_SelectedEventSetListBox.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
EventSetsPanel_SelectedEventSetListBoxMouseClicked(evt);
}
});
EventSetsPanel_SelectedEventSetListBox.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
EventSetsPanel_SelectedEventSetListBoxMouseMoved(evt);
}
});
jScrollPane10.setViewportView(EventSetsPanel_SelectedEventSetListBox);
EventSetsPanel_ParametersPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
javax.swing.GroupLayout EventSetsPanel_ParametersPanelLayout = new javax.swing.GroupLayout(EventSetsPanel_ParametersPanel);
EventSetsPanel_ParametersPanel.setLayout(EventSetsPanel_ParametersPanelLayout);
EventSetsPanel_ParametersPanelLayout.setHorizontalGroup(
EventSetsPanel_ParametersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 344, Short.MAX_VALUE)
);
EventSetsPanel_ParametersPanelLayout.setVerticalGroup(
EventSetsPanel_ParametersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 300, Short.MAX_VALUE)
);
EventSetsPanel_EventSetDescriptionTextBox.setColumns(20);
EventSetsPanel_EventSetDescriptionTextBox.setLineWrap(true);
EventSetsPanel_EventSetDescriptionTextBox.setRows(5);
EventSetsPanel_EventSetDescriptionTextBox.setWrapStyleWord(true);
jScrollPane6.setViewportView(EventSetsPanel_EventSetDescriptionTextBox);
EventSetsPanel_AddEventSetButton.setText("\u2192");
EventSetsPanel_AddEventSetButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
EventSetsPanel_AddEventSetButtonActionPerformed(evt);
}
});
EventSetsPanel_RemoveEventSetButton.setText("\u2190");
EventSetsPanel_RemoveEventSetButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
EventSetsPanel_RemoveEventSetButtonActionPerformed(evt);
}
});
EventSetsPanel_AddAllEventSetsButton.setText("All");
EventSetsPanel_AddAllEventSetsButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
EventSetsPanel_AddAllEventSetsButtonActionPerformed(evt);
}
});
EventSetsPanel_RemoveAllEventSetsButton.setText("Clear");
EventSetsPanel_RemoveAllEventSetsButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
EventSetsPanel_RemoveAllEventSetsButtonActionPerformed(evt);
}
});
javax.swing.GroupLayout JGAAP_EventSetsPanelLayout = new javax.swing.GroupLayout(JGAAP_EventSetsPanel);
JGAAP_EventSetsPanel.setLayout(JGAAP_EventSetsPanelLayout);
JGAAP_EventSetsPanelLayout.setHorizontalGroup(
JGAAP_EventSetsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, JGAAP_EventSetsPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(JGAAP_EventSetsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jScrollPane6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 824, Short.MAX_VALUE)
.addComponent(jLabel8, javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_EventSetsPanelLayout.createSequentialGroup()
.addGroup(JGAAP_EventSetsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel6))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_EventSetsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(EventSetsPanel_RemoveEventSetButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(EventSetsPanel_AddAllEventSetsButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(EventSetsPanel_AddEventSetButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(EventSetsPanel_RemoveAllEventSetsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_EventSetsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel9)
.addComponent(jScrollPane10, javax.swing.GroupLayout.PREFERRED_SIZE, 216, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_EventSetsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_EventSetsPanelLayout.createSequentialGroup()
.addComponent(jLabel7)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 163, Short.MAX_VALUE)
.addComponent(EventSetsPanel_NotesButton))
.addComponent(EventSetsPanel_ParametersPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
.addContainerGap())
);
JGAAP_EventSetsPanelLayout.setVerticalGroup(
JGAAP_EventSetsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_EventSetsPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(JGAAP_EventSetsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_EventSetsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel6)
.addComponent(jLabel9))
.addGroup(JGAAP_EventSetsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(EventSetsPanel_NotesButton)
.addComponent(jLabel7)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_EventSetsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(EventSetsPanel_ParametersPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jScrollPane10, javax.swing.GroupLayout.DEFAULT_SIZE, 304, Short.MAX_VALUE)
.addComponent(jScrollPane9, javax.swing.GroupLayout.DEFAULT_SIZE, 304, Short.MAX_VALUE)
.addGroup(JGAAP_EventSetsPanelLayout.createSequentialGroup()
.addComponent(EventSetsPanel_AddEventSetButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(EventSetsPanel_RemoveEventSetButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(EventSetsPanel_AddAllEventSetsButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(EventSetsPanel_RemoveAllEventSetsButton)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel8)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
JGAAP_TabbedPane.addTab("Event Drivers", JGAAP_EventSetsPanel);
jLabel15.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel15.setText("Event Culling");
jLabel16.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel16.setText("Parameters");
jLabel17.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel17.setText("Selected");
EventCullingPanel_NotesButton.setLabel("Notes");
EventCullingPanel_NotesButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
EventCullingPanel_NotesButtonActionPerformed(evt);
}
});
EventCullingPanel_SelectedEventCullingListBox.setModel(SelectedEventCullingListBox_Model);
EventCullingPanel_SelectedEventCullingListBox.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
EventCullingPanel_SelectedEventCullingListBox.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
EventCullingPanel_SelectedEventCullingListBoxMouseClicked(evt);
}
});
EventCullingPanel_SelectedEventCullingListBox.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
EventCullingPanel_SelectedEventCullingListBoxMouseMoved(evt);
}
});
jScrollPane14.setViewportView(EventCullingPanel_SelectedEventCullingListBox);
EventCullingPanel_AddEventCullingButton.setText("\u2192");
EventCullingPanel_AddEventCullingButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
EventCullingPanel_AddEventCullingButtonActionPerformed(evt);
}
});
EventCullingPanel_RemoveEventCullingButton.setText("\u2190");
EventCullingPanel_RemoveEventCullingButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
EventCullingPanel_RemoveEventCullingButtonActionPerformed(evt);
}
});
EventCullingPanel_AddAllEventCullingButton.setText("All");
EventCullingPanel_AddAllEventCullingButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
EventCullingPanel_AddAllEventCullingButtonActionPerformed(evt);
}
});
EventCullingPanel_RemoveAllEventCullingButton.setText("Clear");
EventCullingPanel_RemoveAllEventCullingButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
EventCullingPanel_RemoveAllEventCullingButtonActionPerformed(evt);
}
});
EventCullingPanel_ParametersPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
javax.swing.GroupLayout EventCullingPanel_ParametersPanelLayout = new javax.swing.GroupLayout(EventCullingPanel_ParametersPanel);
EventCullingPanel_ParametersPanel.setLayout(EventCullingPanel_ParametersPanelLayout);
EventCullingPanel_ParametersPanelLayout.setHorizontalGroup(
EventCullingPanel_ParametersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 343, Short.MAX_VALUE)
);
EventCullingPanel_ParametersPanelLayout.setVerticalGroup(
EventCullingPanel_ParametersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 300, Short.MAX_VALUE)
);
EventCullingPanel_EventCullingListBox.setModel(EventCullingListBox_Model);
EventCullingPanel_EventCullingListBox.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
EventCullingPanel_EventCullingListBox.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
EventCullingPanel_EventCullingListBoxMouseClicked(evt);
}
});
EventCullingPanel_EventCullingListBox.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
EventCullingPanel_EventCullingListBoxMouseMoved(evt);
}
});
jScrollPane15.setViewportView(EventCullingPanel_EventCullingListBox);
EventCullingPanel_EventCullingDescriptionTextbox.setColumns(20);
EventCullingPanel_EventCullingDescriptionTextbox.setLineWrap(true);
EventCullingPanel_EventCullingDescriptionTextbox.setRows(5);
EventCullingPanel_EventCullingDescriptionTextbox.setWrapStyleWord(true);
jScrollPane16.setViewportView(EventCullingPanel_EventCullingDescriptionTextbox);
jLabel18.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel18.setText("Event Culling Description");
javax.swing.GroupLayout JGAAP_EventCullingPanelLayout = new javax.swing.GroupLayout(JGAAP_EventCullingPanel);
JGAAP_EventCullingPanel.setLayout(JGAAP_EventCullingPanelLayout);
JGAAP_EventCullingPanelLayout.setHorizontalGroup(
JGAAP_EventCullingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, JGAAP_EventCullingPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(JGAAP_EventCullingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jScrollPane16, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 824, Short.MAX_VALUE)
.addComponent(jLabel18, javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_EventCullingPanelLayout.createSequentialGroup()
.addGroup(JGAAP_EventCullingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane15, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel15))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_EventCullingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(EventCullingPanel_RemoveEventCullingButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(EventCullingPanel_AddAllEventCullingButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(EventCullingPanel_AddEventCullingButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(EventCullingPanel_RemoveAllEventCullingButton, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_EventCullingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel17)
.addComponent(jScrollPane14, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_EventCullingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(JGAAP_EventCullingPanelLayout.createSequentialGroup()
.addComponent(jLabel16)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 162, Short.MAX_VALUE)
.addComponent(EventCullingPanel_NotesButton))
.addComponent(EventCullingPanel_ParametersPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
.addContainerGap())
);
JGAAP_EventCullingPanelLayout.setVerticalGroup(
JGAAP_EventCullingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_EventCullingPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(JGAAP_EventCullingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_EventCullingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel15)
.addComponent(jLabel17)
.addComponent(jLabel16))
.addComponent(EventCullingPanel_NotesButton))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_EventCullingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane14, javax.swing.GroupLayout.DEFAULT_SIZE, 304, Short.MAX_VALUE)
.addComponent(EventCullingPanel_ParametersPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jScrollPane15, javax.swing.GroupLayout.DEFAULT_SIZE, 304, Short.MAX_VALUE)
.addGroup(JGAAP_EventCullingPanelLayout.createSequentialGroup()
.addComponent(EventCullingPanel_AddEventCullingButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(EventCullingPanel_RemoveEventCullingButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(EventCullingPanel_AddAllEventCullingButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(EventCullingPanel_RemoveAllEventCullingButton)
.addGap(107, 107, 107)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel18)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane16, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
JGAAP_TabbedPane.addTab("Event Culling", JGAAP_EventCullingPanel);
jLabel20.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel20.setText("Analysis Methods");
jLabel21.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel21.setText("AM Parameters");
jLabel22.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel22.setText("Selected");
AnalysisMethodPanel_NotesButton.setLabel("Notes");
AnalysisMethodPanel_NotesButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
AnalysisMethodPanel_NotesButtonActionPerformed(evt);
}
});
AnalysisMethodPanel_SelectedAnalysisMethodsListBox.setModel(SelectedAnalysisMethodListBox_Model);
AnalysisMethodPanel_SelectedAnalysisMethodsListBox.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
AnalysisMethodPanel_SelectedAnalysisMethodsListBox.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
AnalysisMethodPanel_SelectedAnalysisMethodsListBoxMouseClicked(evt);
}
});
AnalysisMethodPanel_SelectedAnalysisMethodsListBox.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
AnalysisMethodPanel_SelectedAnalysisMethodsListBoxMouseMoved(evt);
}
});
jScrollPane17.setViewportView(AnalysisMethodPanel_SelectedAnalysisMethodsListBox);
AnalysisMethodPanel_AddAnalysisMethodButton.setText("\u2192");
AnalysisMethodPanel_AddAnalysisMethodButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
AnalysisMethodPanel_AddAnalysisMethodButtonActionPerformed(evt);
}
});
AnalysisMethodPanel_RemoveAnalysisMethodsButton.setText("\u2190");
AnalysisMethodPanel_RemoveAnalysisMethodsButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
AnalysisMethodPanel_RemoveAnalysisMethodsButtonActionPerformed(evt);
}
});
AnalysisMethodPanel_AddAllAnalysisMethodsButton.setText("All");
AnalysisMethodPanel_AddAllAnalysisMethodsButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
AnalysisMethodPanel_AddAllAnalysisMethodsButtonActionPerformed(evt);
}
});
AnalysisMethodPanel_RemoveAllAnalysisMethodsButton.setText("Clear");
AnalysisMethodPanel_RemoveAllAnalysisMethodsButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
AnalysisMethodPanel_RemoveAllAnalysisMethodsButtonActionPerformed(evt);
}
});
AnalysisMethodPanel_AMParametersPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
javax.swing.GroupLayout AnalysisMethodPanel_AMParametersPanelLayout = new javax.swing.GroupLayout(AnalysisMethodPanel_AMParametersPanel);
AnalysisMethodPanel_AMParametersPanel.setLayout(AnalysisMethodPanel_AMParametersPanelLayout);
AnalysisMethodPanel_AMParametersPanelLayout.setHorizontalGroup(
AnalysisMethodPanel_AMParametersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 355, Short.MAX_VALUE)
);
AnalysisMethodPanel_AMParametersPanelLayout.setVerticalGroup(
AnalysisMethodPanel_AMParametersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 125, Short.MAX_VALUE)
);
AnalysisMethodPanel_AnalysisMethodsListBox.setModel(AnalysisMethodListBox_Model);
AnalysisMethodPanel_AnalysisMethodsListBox.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
AnalysisMethodPanel_AnalysisMethodsListBox.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
AnalysisMethodPanel_AnalysisMethodsListBoxMouseClicked(evt);
}
});
AnalysisMethodPanel_AnalysisMethodsListBox.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
AnalysisMethodPanel_AnalysisMethodsListBoxMouseMoved(evt);
}
});
jScrollPane18.setViewportView(AnalysisMethodPanel_AnalysisMethodsListBox);
jLabel28.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel28.setText("Distance Function Description");
AnalysisMethodPanel_AnalysisMethodDescriptionTextBox.setColumns(20);
AnalysisMethodPanel_AnalysisMethodDescriptionTextBox.setLineWrap(true);
AnalysisMethodPanel_AnalysisMethodDescriptionTextBox.setRows(5);
AnalysisMethodPanel_AnalysisMethodDescriptionTextBox.setWrapStyleWord(true);
jScrollPane19.setViewportView(AnalysisMethodPanel_AnalysisMethodDescriptionTextBox);
AnalysisMethodPanel_DistanceFunctionsListBox.setModel(DistanceFunctionsListBox_Model);
AnalysisMethodPanel_DistanceFunctionsListBox.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
AnalysisMethodPanel_DistanceFunctionsListBox.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
AnalysisMethodPanel_DistanceFunctionsListBoxMouseClicked(evt);
}
});
AnalysisMethodPanel_DistanceFunctionsListBox.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
AnalysisMethodPanel_DistanceFunctionsListBoxMouseMoved(evt);
}
});
jScrollPane22.setViewportView(AnalysisMethodPanel_DistanceFunctionsListBox);
jLabel35.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel35.setText("Distance Functions");
AnalysisMethodPanel_DistanceFunctionDescriptionTextBox.setColumns(20);
AnalysisMethodPanel_DistanceFunctionDescriptionTextBox.setLineWrap(true);
AnalysisMethodPanel_DistanceFunctionDescriptionTextBox.setRows(5);
AnalysisMethodPanel_DistanceFunctionDescriptionTextBox.setWrapStyleWord(true);
jScrollPane23.setViewportView(AnalysisMethodPanel_DistanceFunctionDescriptionTextBox);
jLabel36.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel36.setText("Analysis Method Description");
AnalysisMethodPanel_DFParametersPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
javax.swing.GroupLayout AnalysisMethodPanel_DFParametersPanelLayout = new javax.swing.GroupLayout(AnalysisMethodPanel_DFParametersPanel);
AnalysisMethodPanel_DFParametersPanel.setLayout(AnalysisMethodPanel_DFParametersPanelLayout);
AnalysisMethodPanel_DFParametersPanelLayout.setHorizontalGroup(
AnalysisMethodPanel_DFParametersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 355, Short.MAX_VALUE)
);
AnalysisMethodPanel_DFParametersPanelLayout.setVerticalGroup(
AnalysisMethodPanel_DFParametersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 128, Short.MAX_VALUE)
);
jLabel37.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel37.setText("DF Parameters");
javax.swing.GroupLayout JGAAP_AnalysisMethodPanelLayout = new javax.swing.GroupLayout(JGAAP_AnalysisMethodPanel);
JGAAP_AnalysisMethodPanel.setLayout(JGAAP_AnalysisMethodPanelLayout);
JGAAP_AnalysisMethodPanelLayout.setHorizontalGroup(
JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, JGAAP_AnalysisMethodPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(JGAAP_AnalysisMethodPanelLayout.createSequentialGroup()
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel35, javax.swing.GroupLayout.DEFAULT_SIZE, 257, Short.MAX_VALUE)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, JGAAP_AnalysisMethodPanelLayout.createSequentialGroup()
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jScrollPane22, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 187, Short.MAX_VALUE)
.addComponent(jScrollPane18, javax.swing.GroupLayout.Alignment.LEADING, 0, 0, Short.MAX_VALUE)
.addComponent(jLabel20, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(AnalysisMethodPanel_RemoveAnalysisMethodsButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(AnalysisMethodPanel_AddAllAnalysisMethodsButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(AnalysisMethodPanel_AddAnalysisMethodButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(AnalysisMethodPanel_RemoveAllAnalysisMethodsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel22)
.addComponent(jScrollPane17, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(AnalysisMethodPanel_DFParametersPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(AnalysisMethodPanel_AMParametersPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(JGAAP_AnalysisMethodPanelLayout.createSequentialGroup()
.addComponent(jLabel21)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 133, Short.MAX_VALUE)
.addComponent(AnalysisMethodPanel_NotesButton))
.addComponent(jLabel37)))
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, JGAAP_AnalysisMethodPanelLayout.createSequentialGroup()
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane19, javax.swing.GroupLayout.PREFERRED_SIZE, 405, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel36))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel28)
.addComponent(jScrollPane23, javax.swing.GroupLayout.DEFAULT_SIZE, 413, Short.MAX_VALUE))))
.addContainerGap())
);
JGAAP_AnalysisMethodPanelLayout.setVerticalGroup(
JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_AnalysisMethodPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel20)
.addComponent(jLabel21)
.addComponent(jLabel22)
.addComponent(AnalysisMethodPanel_NotesButton))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane17, javax.swing.GroupLayout.DEFAULT_SIZE, 301, Short.MAX_VALUE)
.addGroup(JGAAP_AnalysisMethodPanelLayout.createSequentialGroup()
.addComponent(AnalysisMethodPanel_AMParametersPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel37)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(AnalysisMethodPanel_DFParametersPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(JGAAP_AnalysisMethodPanelLayout.createSequentialGroup()
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_AnalysisMethodPanelLayout.createSequentialGroup()
.addComponent(AnalysisMethodPanel_AddAnalysisMethodButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(AnalysisMethodPanel_RemoveAnalysisMethodsButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(AnalysisMethodPanel_AddAllAnalysisMethodsButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(AnalysisMethodPanel_RemoveAllAnalysisMethodsButton))
.addComponent(jScrollPane18, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel35)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane22, javax.swing.GroupLayout.DEFAULT_SIZE, 132, Short.MAX_VALUE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel28)
.addComponent(jLabel36))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jScrollPane19, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jScrollPane23, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
);
JGAAP_TabbedPane.addTab("Analysis Methods", JGAAP_AnalysisMethodPanel);
ReviewPanel_ProcessButton.setLabel("Process");
ReviewPanel_ProcessButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ReviewPanel_ProcessButtonActionPerformed(evt);
}
});
ReviewPanel_DocumentsLabel.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
ReviewPanel_DocumentsLabel.setText("Documents");
ReviewPanel_DocumentsLabel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
ReviewPanel_DocumentsLabelMouseClicked(evt);
}
});
ReviewPanel_DocumentsTable.setModel(DocumentsTable_Model);
ReviewPanel_DocumentsTable.setEnabled(false);
ReviewPanel_DocumentsTable.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
ReviewPanel_DocumentsTableMouseClicked(evt);
}
});
jScrollPane24.setViewportView(ReviewPanel_DocumentsTable);
ReviewPanel_SelectedEventSetLabel.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
ReviewPanel_SelectedEventSetLabel.setText("Event Driver");
ReviewPanel_SelectedEventSetLabel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
ReviewPanel_SelectedEventSetLabelMouseClicked(evt);
}
});
ReviewPanel_SelectedEventCullingLabel.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
ReviewPanel_SelectedEventCullingLabel.setText("Event Culling");
ReviewPanel_SelectedEventCullingLabel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
ReviewPanel_SelectedEventCullingLabelMouseClicked(evt);
}
});
ReviewPanel_SelectedAnalysisMethodsLabel.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
ReviewPanel_SelectedAnalysisMethodsLabel.setText("Analysis Methods");
ReviewPanel_SelectedAnalysisMethodsLabel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
ReviewPanel_SelectedAnalysisMethodsLabelMouseClicked(evt);
}
});
ReviewPanel_SelectedEventSetListBox.setModel(SelectedEventSetsListBox_Model);
ReviewPanel_SelectedEventSetListBox.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
ReviewPanel_SelectedEventSetListBox.setEnabled(false);
ReviewPanel_SelectedEventSetListBox.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
ReviewPanel_SelectedEventSetListBoxMouseClicked(evt);
}
});
jScrollPane25.setViewportView(ReviewPanel_SelectedEventSetListBox);
ReviewPanel_SelectedEventCullingListBox.setModel(SelectedEventCullingListBox_Model);
ReviewPanel_SelectedEventCullingListBox.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
ReviewPanel_SelectedEventCullingListBox.setEnabled(false);
ReviewPanel_SelectedEventCullingListBox.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
ReviewPanel_SelectedEventCullingListBoxMouseClicked(evt);
}
});
jScrollPane26.setViewportView(ReviewPanel_SelectedEventCullingListBox);
ReviewPanel_SelectedAnalysisMethodsListBox.setModel(SelectedAnalysisMethodListBox_Model);
ReviewPanel_SelectedAnalysisMethodsListBox.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
ReviewPanel_SelectedAnalysisMethodsListBox.setEnabled(false);
ReviewPanel_SelectedAnalysisMethodsListBox.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
ReviewPanel_SelectedAnalysisMethodsListBoxMouseClicked(evt);
}
});
jScrollPane27.setViewportView(ReviewPanel_SelectedAnalysisMethodsListBox);
javax.swing.GroupLayout JGAAP_ReviewPanelLayout = new javax.swing.GroupLayout(JGAAP_ReviewPanel);
JGAAP_ReviewPanel.setLayout(JGAAP_ReviewPanelLayout);
JGAAP_ReviewPanelLayout.setHorizontalGroup(
JGAAP_ReviewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, JGAAP_ReviewPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(JGAAP_ReviewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jScrollPane24, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 824, Short.MAX_VALUE)
.addComponent(ReviewPanel_DocumentsLabel, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(ReviewPanel_ProcessButton)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, JGAAP_ReviewPanelLayout.createSequentialGroup()
.addGroup(JGAAP_ReviewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane25, javax.swing.GroupLayout.PREFERRED_SIZE, 273, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(ReviewPanel_SelectedEventSetLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_ReviewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(ReviewPanel_SelectedEventCullingLabel)
.addComponent(jScrollPane26, javax.swing.GroupLayout.PREFERRED_SIZE, 268, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_ReviewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(ReviewPanel_SelectedAnalysisMethodsLabel)
.addComponent(jScrollPane27, javax.swing.GroupLayout.DEFAULT_SIZE, 271, Short.MAX_VALUE))))
.addContainerGap())
);
JGAAP_ReviewPanelLayout.setVerticalGroup(
JGAAP_ReviewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_ReviewPanelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(ReviewPanel_DocumentsLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane24, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_ReviewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(ReviewPanel_SelectedEventSetLabel)
.addComponent(ReviewPanel_SelectedEventCullingLabel)
.addComponent(ReviewPanel_SelectedAnalysisMethodsLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_ReviewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jScrollPane27, javax.swing.GroupLayout.DEFAULT_SIZE, 258, Short.MAX_VALUE)
.addComponent(jScrollPane26, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 258, Short.MAX_VALUE)
.addComponent(jScrollPane25, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 258, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(ReviewPanel_ProcessButton)
.addContainerGap())
);
JGAAP_TabbedPane.addTab("Review & Process", JGAAP_ReviewPanel);
Next_Button.setText("Next \u2192");
Next_Button.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
Next_ButtonActionPerformed(evt);
}
});
Review_Button.setText("Finish & Review");
Review_Button.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
Review_ButtonActionPerformed(evt);
}
});
jMenu1.setText("File");
jMenu4.setText("Batch Documents");
BatchSaveMenuItem.setText("Save Documents");
BatchSaveMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
BatchSaveMenuItemActionPerformed(evt);
}
});
jMenu4.add(BatchSaveMenuItem);
BatchLoadMenuItem.setText("Load Documents");
BatchLoadMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
BatchLoadMenuItemActionPerformed(evt);
}
});
jMenu4.add(BatchLoadMenuItem);
jMenu1.add(jMenu4);
jMenu2.setText("AAAC Problems");
ProblemAMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemBMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_B, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemCMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemDMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_D, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemEMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(KeyEvent.VK_E, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemFMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemGMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_G, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemHMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemIMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_I, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemJMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_J, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemKMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_K, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemLMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_L, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemMMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_M, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemAMenuItem.setText("Problem A");
ProblemAMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemAMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemAMenuItem);
ProblemBMenuItem.setText("Problem B");
ProblemBMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemBMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemBMenuItem);
ProblemCMenuItem.setText("Problem C");
ProblemCMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemCMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemCMenuItem);
ProblemDMenuItem.setText("Problem D");
ProblemDMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemDMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemDMenuItem);
ProblemEMenuItem.setText("Problem E");
ProblemEMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemEMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemEMenuItem);
ProblemFMenuItem.setText("Problem F");
ProblemFMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemFMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemFMenuItem);
ProblemGMenuItem.setText("Problem G");
ProblemGMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemGMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemGMenuItem);
ProblemHMenuItem.setText("Problem H");
ProblemHMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemHMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemHMenuItem);
ProblemIMenuItem.setText("Problem I");
ProblemIMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemIMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemIMenuItem);
ProblemJMenuItem.setText("Problem J");
ProblemJMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemJMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemJMenuItem);
ProblemKMenuItem.setText("Problem K");
ProblemKMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemKMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemKMenuItem);
ProblemLMenuItem.setText("Problem L");
ProblemLMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemLMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemLMenuItem);
ProblemMMenuItem.setText("Problem M");
ProblemMMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemMMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemMMenuItem);
jMenu1.add(jMenu2);
exitMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Q, java.awt.event.InputEvent.CTRL_MASK));
exitMenuItem.setText("Exit");
exitMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
exitMenuItemActionPerformed(evt);
}
});
jMenu1.add(exitMenuItem);
JGAAP_MenuBar.add(jMenu1);
helpMenu.setText("Help");
aboutMenuItem.setText("About..");
aboutMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
aboutMenuItemActionPerformed(evt);
}
});
helpMenu.add(aboutMenuItem);
JGAAP_MenuBar.add(helpMenu);
setJMenuBar(JGAAP_MenuBar);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(JGAAP_TabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 849, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addComponent(Review_Button)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(Next_Button)))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(JGAAP_TabbedPane, javax.swing.GroupLayout.PREFERRED_SIZE, 529, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(Next_Button)
.addComponent(Review_Button))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
pack();
}
| private void initComponents() {
helpDialog = new javax.swing.JDialog();
helpCloseButton = new javax.swing.JButton();
jLabel11 = new javax.swing.JLabel();
jLabel12 = new javax.swing.JLabel();
jLabel13 = new javax.swing.JLabel();
jLabel23 = new javax.swing.JLabel();
jLabel24 = new javax.swing.JLabel();
jLabel25 = new javax.swing.JLabel();
jLabel26 = new javax.swing.JLabel();
JGAAP_TabbedPane = new javax.swing.JTabbedPane();
JGAAP_DocumentsPanel = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
DocumentsPanel_UnknownAuthorsTable = new javax.swing.JTable();
jScrollPane2 = new javax.swing.JScrollPane();
DocumentsPanel_KnownAuthorsTree = new javax.swing.JTree();
DocumentsPanel_AddDocumentsButton = new javax.swing.JButton();
DocumentsPanel_RemoveDocumentsButton = new javax.swing.JButton();
DocumentsPanel_AddAuthorButton = new javax.swing.JButton();
DocumentsPanel_EditAuthorButton = new javax.swing.JButton();
DocumentsPanel_RemoveAuthorButton = new javax.swing.JButton();
DocumentsPanel_NotesButton = new javax.swing.JButton();
jLabel10 = new javax.swing.JLabel();
DocumentsPanel_LanguageComboBox = new javax.swing.JComboBox();
JGAAP_CanonicizerPanel = new javax.swing.JPanel();
CanonicizersPanel_RemoveCanonicizerButton = new javax.swing.JButton();
jLabel27 = new javax.swing.JLabel();
CanonicizersPanel_NotesButton = new javax.swing.JButton();
jScrollPane11 = new javax.swing.JScrollPane();
CanonicizersPanel_DocumentsCanonicizerDescriptionTextBox = new javax.swing.JTextArea();
CanonicizersPanel_AddCanonicizerButton = new javax.swing.JButton();
CanonicizersPanel_AddAllCanonicizersButton = new javax.swing.JButton();
jScrollPane12 = new javax.swing.JScrollPane();
CanonicizersPanel_CanonicizerListBox = new javax.swing.JList();
jScrollPane13 = new javax.swing.JScrollPane();
CanonicizersPanel_SelectedCanonicizerListBox = new javax.swing.JList();
CanonicizersPanel_RemoveAllCanonicizersButton = new javax.swing.JButton();
jLabel31 = new javax.swing.JLabel();
jScrollPane20 = new javax.swing.JScrollPane();
CanonicizersPanel_DocumentsTable = new javax.swing.JTable();
jScrollPane21 = new javax.swing.JScrollPane();
CanonicizersPanel_DocumentsCurrentCanonicizersTextBox = new javax.swing.JTextArea();
CanonicizersPanel_SetToDocumentButton = new javax.swing.JButton();
CanonicizersPanel_SetToDocumentTypeButton = new javax.swing.JButton();
CanonicizersPanel_SetToAllDocuments = new javax.swing.JButton();
jLabel29 = new javax.swing.JLabel();
jLabel30 = new javax.swing.JLabel();
jLabel32 = new javax.swing.JLabel();
jLabel33 = new javax.swing.JLabel();
jLabel34 = new javax.swing.JLabel();
JGAAP_EventSetsPanel = new javax.swing.JPanel();
EventSetsPanel_NotesButton = new javax.swing.JButton();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
jScrollPane9 = new javax.swing.JScrollPane();
EventSetsPanel_EventSetListBox = new javax.swing.JList();
jScrollPane10 = new javax.swing.JScrollPane();
EventSetsPanel_SelectedEventSetListBox = new javax.swing.JList();
EventSetsPanel_ParametersPanel = new javax.swing.JPanel();
jScrollPane6 = new javax.swing.JScrollPane();
EventSetsPanel_EventSetDescriptionTextBox = new javax.swing.JTextArea();
EventSetsPanel_AddEventSetButton = new javax.swing.JButton();
EventSetsPanel_RemoveEventSetButton = new javax.swing.JButton();
EventSetsPanel_AddAllEventSetsButton = new javax.swing.JButton();
EventSetsPanel_RemoveAllEventSetsButton = new javax.swing.JButton();
JGAAP_EventCullingPanel = new javax.swing.JPanel();
jLabel15 = new javax.swing.JLabel();
jLabel16 = new javax.swing.JLabel();
jLabel17 = new javax.swing.JLabel();
EventCullingPanel_NotesButton = new javax.swing.JButton();
jScrollPane14 = new javax.swing.JScrollPane();
EventCullingPanel_SelectedEventCullingListBox = new javax.swing.JList();
EventCullingPanel_AddEventCullingButton = new javax.swing.JButton();
EventCullingPanel_RemoveEventCullingButton = new javax.swing.JButton();
EventCullingPanel_AddAllEventCullingButton = new javax.swing.JButton();
EventCullingPanel_RemoveAllEventCullingButton = new javax.swing.JButton();
EventCullingPanel_ParametersPanel = new javax.swing.JPanel();
jScrollPane15 = new javax.swing.JScrollPane();
EventCullingPanel_EventCullingListBox = new javax.swing.JList();
jScrollPane16 = new javax.swing.JScrollPane();
EventCullingPanel_EventCullingDescriptionTextbox = new javax.swing.JTextArea();
jLabel18 = new javax.swing.JLabel();
JGAAP_AnalysisMethodPanel = new javax.swing.JPanel();
jLabel20 = new javax.swing.JLabel();
jLabel21 = new javax.swing.JLabel();
jLabel22 = new javax.swing.JLabel();
AnalysisMethodPanel_NotesButton = new javax.swing.JButton();
jScrollPane17 = new javax.swing.JScrollPane();
AnalysisMethodPanel_SelectedAnalysisMethodsListBox = new javax.swing.JList();
AnalysisMethodPanel_AddAnalysisMethodButton = new javax.swing.JButton();
AnalysisMethodPanel_RemoveAnalysisMethodsButton = new javax.swing.JButton();
AnalysisMethodPanel_AddAllAnalysisMethodsButton = new javax.swing.JButton();
AnalysisMethodPanel_RemoveAllAnalysisMethodsButton = new javax.swing.JButton();
AnalysisMethodPanel_AMParametersPanel = new javax.swing.JPanel();
jScrollPane18 = new javax.swing.JScrollPane();
AnalysisMethodPanel_AnalysisMethodsListBox = new javax.swing.JList();
jLabel28 = new javax.swing.JLabel();
jScrollPane19 = new javax.swing.JScrollPane();
AnalysisMethodPanel_AnalysisMethodDescriptionTextBox = new javax.swing.JTextArea();
jScrollPane22 = new javax.swing.JScrollPane();
AnalysisMethodPanel_DistanceFunctionsListBox = new javax.swing.JList();
jLabel35 = new javax.swing.JLabel();
jScrollPane23 = new javax.swing.JScrollPane();
AnalysisMethodPanel_DistanceFunctionDescriptionTextBox = new javax.swing.JTextArea();
jLabel36 = new javax.swing.JLabel();
AnalysisMethodPanel_DFParametersPanel = new javax.swing.JPanel();
jLabel37 = new javax.swing.JLabel();
JGAAP_ReviewPanel = new javax.swing.JPanel();
ReviewPanel_ProcessButton = new javax.swing.JButton();
ReviewPanel_DocumentsLabel = new javax.swing.JLabel();
jScrollPane24 = new javax.swing.JScrollPane();
ReviewPanel_DocumentsTable = new javax.swing.JTable();
ReviewPanel_SelectedEventSetLabel = new javax.swing.JLabel();
ReviewPanel_SelectedEventCullingLabel = new javax.swing.JLabel();
ReviewPanel_SelectedAnalysisMethodsLabel = new javax.swing.JLabel();
jScrollPane25 = new javax.swing.JScrollPane();
ReviewPanel_SelectedEventSetListBox = new javax.swing.JList();
jScrollPane26 = new javax.swing.JScrollPane();
ReviewPanel_SelectedEventCullingListBox = new javax.swing.JList();
jScrollPane27 = new javax.swing.JScrollPane();
ReviewPanel_SelectedAnalysisMethodsListBox = new javax.swing.JList();
Next_Button = new javax.swing.JButton();
Review_Button = new javax.swing.JButton();
JGAAP_MenuBar = new javax.swing.JMenuBar();
jMenu1 = new javax.swing.JMenu();
jMenu4 = new javax.swing.JMenu();
BatchSaveMenuItem = new javax.swing.JMenuItem();
BatchLoadMenuItem = new javax.swing.JMenuItem();
jMenu2 = new javax.swing.JMenu();
ProblemAMenuItem = new javax.swing.JMenuItem();
ProblemBMenuItem = new javax.swing.JMenuItem();
ProblemCMenuItem = new javax.swing.JMenuItem();
ProblemDMenuItem = new javax.swing.JMenuItem();
ProblemEMenuItem = new javax.swing.JMenuItem();
ProblemFMenuItem = new javax.swing.JMenuItem();
ProblemGMenuItem = new javax.swing.JMenuItem();
ProblemHMenuItem = new javax.swing.JMenuItem();
ProblemIMenuItem = new javax.swing.JMenuItem();
ProblemJMenuItem = new javax.swing.JMenuItem();
ProblemKMenuItem = new javax.swing.JMenuItem();
ProblemLMenuItem = new javax.swing.JMenuItem();
ProblemMMenuItem = new javax.swing.JMenuItem();
exitMenuItem = new javax.swing.JMenuItem();
helpMenu = new javax.swing.JMenu();
aboutMenuItem = new javax.swing.JMenuItem();
helpDialog.setTitle("About");
helpDialog.setMinimumSize(new java.awt.Dimension(520, 300));
helpDialog.setResizable(false);
helpCloseButton.setText("close");
helpCloseButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
helpCloseButtonActionPerformed(evt);
}
});
jLabel11.setFont(new java.awt.Font("Lucida Grande", 0, 24));
jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel11.setText("JGAAP 5.0");
jLabel12.setText("<html> JGAAP, the Java Graphical Authorship Attribution Program, <br/>is an opensource author attribution / text classification tool <br/>Developed by the EVL lab (Evaluating Variation in Language Labratory) <br/> Released by Patrick Juola under the GPL v3.0");
jLabel13.setText("\u00A92011 EVL lab");
jLabel23.setForeground(new java.awt.Color(0, 0, 255));
jLabel23.setText("http://evllabs.com");
jLabel23.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jLabel23MouseClicked(evt);
}
});
jLabel24.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/jgaap/ui/resources/jgaap_icon.png")));
jLabel25.setForeground(new java.awt.Color(0, 0, 255));
jLabel25.setText("http://jgaap.com");
jLabel25.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jLabel25MouseClicked(evt);
}
});
jLabel26.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/jgaap/ui/resources/EVLlab_icon.png")));
javax.swing.GroupLayout helpDialogLayout = new javax.swing.GroupLayout(helpDialog.getContentPane());
helpDialog.getContentPane().setLayout(helpDialogLayout);
helpDialogLayout.setHorizontalGroup(
helpDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(helpDialogLayout.createSequentialGroup()
.addGroup(helpDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(helpDialogLayout.createSequentialGroup()
.addContainerGap()
.addGroup(helpDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(helpDialogLayout.createSequentialGroup()
.addComponent(jLabel24)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel26))
.addComponent(helpCloseButton, javax.swing.GroupLayout.Alignment.TRAILING)))
.addGroup(helpDialogLayout.createSequentialGroup()
.addGap(199, 199, 199)
.addGroup(helpDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel23)
.addGroup(helpDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel13)
.addComponent(jLabel25))))
.addGroup(helpDialogLayout.createSequentialGroup()
.addGap(58, 58, 58)
.addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 452, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap())
);
helpDialogLayout.setVerticalGroup(
helpDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(helpDialogLayout.createSequentialGroup()
.addGroup(helpDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(helpDialogLayout.createSequentialGroup()
.addGroup(helpDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel24)
.addGroup(helpDialogLayout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel26, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, helpDialogLayout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel11)
.addGap(44, 44, 44)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel23)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel25)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE)
.addGroup(helpDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(helpCloseButton)
.addComponent(jLabel13))
.addContainerGap())
);
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("JGAAP");
JGAAP_TabbedPane.setName("JGAAP_TabbedPane");
jLabel1.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel1.setText("Unknown Authors");
jLabel2.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel2.setText("Known Authors");
DocumentsPanel_UnknownAuthorsTable.setModel(UnknownAuthorDocumentsTable_Model);
DocumentsPanel_UnknownAuthorsTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_LAST_COLUMN);
DocumentsPanel_UnknownAuthorsTable.setColumnSelectionAllowed(true);
DocumentsPanel_UnknownAuthorsTable.getTableHeader().setReorderingAllowed(false);
jScrollPane1.setViewportView(DocumentsPanel_UnknownAuthorsTable);
DocumentsPanel_UnknownAuthorsTable.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
DocumentsPanel_KnownAuthorsTree.setModel(KnownAuthorsTree_Model);
DocumentsPanel_KnownAuthorsTree.setShowsRootHandles(true);
jScrollPane2.setViewportView(DocumentsPanel_KnownAuthorsTree);
DocumentsPanel_AddDocumentsButton.setText("Add Document");
DocumentsPanel_AddDocumentsButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
DocumentsPanel_AddDocumentsButtonActionPerformed(evt);
}
});
DocumentsPanel_RemoveDocumentsButton.setText("Remove Document");
DocumentsPanel_RemoveDocumentsButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
DocumentsPanel_RemoveDocumentsButtonActionPerformed(evt);
}
});
DocumentsPanel_AddAuthorButton.setLabel("Add Author");
DocumentsPanel_AddAuthorButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
DocumentsPanel_AddAuthorButtonActionPerformed(evt);
}
});
DocumentsPanel_EditAuthorButton.setLabel("Edit Author");
DocumentsPanel_EditAuthorButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
DocumentsPanel_EditAuthorButtonActionPerformed(evt);
}
});
DocumentsPanel_RemoveAuthorButton.setLabel("Remove Author");
DocumentsPanel_RemoveAuthorButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
DocumentsPanel_RemoveAuthorButtonActionPerformed(evt);
}
});
DocumentsPanel_NotesButton.setLabel("Notes");
DocumentsPanel_NotesButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
DocumentsPanel_NotesButtonActionPerformed(evt);
}
});
jLabel10.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel10.setText("Language");
DocumentsPanel_LanguageComboBox.setModel(LanguageComboBox_Model);
DocumentsPanel_LanguageComboBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
DocumentsPanel_LanguageComboBoxActionPerformed(evt);
}
});
javax.swing.GroupLayout JGAAP_DocumentsPanelLayout = new javax.swing.GroupLayout(JGAAP_DocumentsPanel);
JGAAP_DocumentsPanel.setLayout(JGAAP_DocumentsPanelLayout);
JGAAP_DocumentsPanelLayout.setHorizontalGroup(
JGAAP_DocumentsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, JGAAP_DocumentsPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(JGAAP_DocumentsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 824, Short.MAX_VALUE)
.addGroup(JGAAP_DocumentsPanelLayout.createSequentialGroup()
.addGroup(JGAAP_DocumentsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel10)
.addComponent(DocumentsPanel_LanguageComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 656, Short.MAX_VALUE)
.addComponent(DocumentsPanel_NotesButton))
.addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 824, Short.MAX_VALUE)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, JGAAP_DocumentsPanelLayout.createSequentialGroup()
.addGroup(JGAAP_DocumentsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel1)
.addGroup(JGAAP_DocumentsPanelLayout.createSequentialGroup()
.addComponent(DocumentsPanel_AddDocumentsButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(DocumentsPanel_RemoveDocumentsButton))
.addComponent(jLabel2))
.addGap(512, 512, 512))
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, JGAAP_DocumentsPanelLayout.createSequentialGroup()
.addComponent(DocumentsPanel_AddAuthorButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(DocumentsPanel_EditAuthorButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(DocumentsPanel_RemoveAuthorButton)))
.addContainerGap())
);
JGAAP_DocumentsPanelLayout.setVerticalGroup(
JGAAP_DocumentsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_DocumentsPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(JGAAP_DocumentsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(DocumentsPanel_NotesButton)
.addGroup(JGAAP_DocumentsPanelLayout.createSequentialGroup()
.addComponent(jLabel10)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(DocumentsPanel_LanguageComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_DocumentsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(DocumentsPanel_RemoveDocumentsButton)
.addComponent(DocumentsPanel_AddDocumentsButton))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 191, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_DocumentsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(DocumentsPanel_RemoveAuthorButton)
.addComponent(DocumentsPanel_EditAuthorButton)
.addComponent(DocumentsPanel_AddAuthorButton))
.addContainerGap())
);
JGAAP_TabbedPane.addTab("Documents", JGAAP_DocumentsPanel);
CanonicizersPanel_RemoveCanonicizerButton.setText("\u2190");
CanonicizersPanel_RemoveCanonicizerButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CanonicizersPanel_RemoveCanonicizerButtonActionPerformed(evt);
}
});
jLabel27.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel27.setText("Documents");
CanonicizersPanel_NotesButton.setLabel("Notes");
CanonicizersPanel_NotesButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CanonicizersPanel_NotesButtonActionPerformed(evt);
}
});
CanonicizersPanel_DocumentsCanonicizerDescriptionTextBox.setColumns(20);
CanonicizersPanel_DocumentsCanonicizerDescriptionTextBox.setLineWrap(true);
CanonicizersPanel_DocumentsCanonicizerDescriptionTextBox.setRows(5);
CanonicizersPanel_DocumentsCanonicizerDescriptionTextBox.setWrapStyleWord(true);
jScrollPane11.setViewportView(CanonicizersPanel_DocumentsCanonicizerDescriptionTextBox);
CanonicizersPanel_AddCanonicizerButton.setText("\u2192");
CanonicizersPanel_AddCanonicizerButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CanonicizersPanel_AddCanonicizerButtonActionPerformed(evt);
}
});
CanonicizersPanel_AddAllCanonicizersButton.setText("All");
CanonicizersPanel_AddAllCanonicizersButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CanonicizersPanel_AddAllCanonicizersButtonActionPerformed(evt);
}
});
CanonicizersPanel_CanonicizerListBox.setModel(CanonicizerListBox_Model);
CanonicizersPanel_CanonicizerListBox.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
CanonicizersPanel_CanonicizerListBox.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
CanonicizersPanel_CanonicizerListBoxMouseClicked(evt);
}
});
CanonicizersPanel_CanonicizerListBox.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
CanonicizersPanel_CanonicizerListBoxMouseMoved(evt);
}
});
jScrollPane12.setViewportView(CanonicizersPanel_CanonicizerListBox);
CanonicizersPanel_SelectedCanonicizerListBox.setModel(SelectedCanonicizerListBox_Model);
CanonicizersPanel_SelectedCanonicizerListBox.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
CanonicizersPanel_SelectedCanonicizerListBox.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
CanonicizersPanel_SelectedCanonicizerListBoxMouseClicked(evt);
}
});
CanonicizersPanel_SelectedCanonicizerListBox.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
CanonicizersPanel_SelectedCanonicizerListBoxMouseMoved(evt);
}
});
jScrollPane13.setViewportView(CanonicizersPanel_SelectedCanonicizerListBox);
CanonicizersPanel_RemoveAllCanonicizersButton.setText("Clear");
CanonicizersPanel_RemoveAllCanonicizersButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CanonicizersPanel_RemoveAllCanonicizersButtonActionPerformed(evt);
}
});
jLabel31.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel31.setText("Document's Current Canonicizers");
CanonicizersPanel_DocumentsTable.setModel(DocumentsTable_Model);
jScrollPane20.setViewportView(CanonicizersPanel_DocumentsTable);
CanonicizersPanel_DocumentsCurrentCanonicizersTextBox.setColumns(20);
CanonicizersPanel_DocumentsCurrentCanonicizersTextBox.setLineWrap(true);
CanonicizersPanel_DocumentsCurrentCanonicizersTextBox.setRows(5);
CanonicizersPanel_DocumentsCurrentCanonicizersTextBox.setWrapStyleWord(true);
jScrollPane21.setViewportView(CanonicizersPanel_DocumentsCurrentCanonicizersTextBox);
CanonicizersPanel_SetToDocumentButton.setText("Set to Doc");
CanonicizersPanel_SetToDocumentButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CanonicizersPanel_SetToDocumentButtonActionPerformed(evt);
}
});
CanonicizersPanel_SetToDocumentTypeButton.setText("Set to Doc Type");
CanonicizersPanel_SetToDocumentTypeButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CanonicizersPanel_SetToDocumentTypeButtonActionPerformed(evt);
}
});
CanonicizersPanel_SetToAllDocuments.setText("Set to All Docs");
CanonicizersPanel_SetToAllDocuments.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CanonicizersPanel_SetToAllDocumentsActionPerformed(evt);
}
});
jLabel29.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel29.setText("Selected");
jLabel30.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel30.setText("Canonicizers");
jLabel32.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel32.setText("Canonicizer Description");
jLabel33.setText("Note: These buttons are used to add");
jLabel34.setText("selected canonicizers to documents.");
javax.swing.GroupLayout JGAAP_CanonicizerPanelLayout = new javax.swing.GroupLayout(JGAAP_CanonicizerPanel);
JGAAP_CanonicizerPanel.setLayout(JGAAP_CanonicizerPanelLayout);
JGAAP_CanonicizerPanelLayout.setHorizontalGroup(
JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_CanonicizerPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_CanonicizerPanelLayout.createSequentialGroup()
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_CanonicizerPanelLayout.createSequentialGroup()
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel30)
.addComponent(jScrollPane12, javax.swing.GroupLayout.DEFAULT_SIZE, 155, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(CanonicizersPanel_AddCanonicizerButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(CanonicizersPanel_RemoveCanonicizerButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(CanonicizersPanel_AddAllCanonicizersButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(CanonicizersPanel_RemoveAllCanonicizersButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
.addComponent(jLabel33)
.addComponent(jLabel34))
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(CanonicizersPanel_SetToDocumentTypeButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE)
.addComponent(jLabel29)
.addComponent(CanonicizersPanel_SetToDocumentButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE)
.addComponent(jScrollPane13, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE)
.addComponent(CanonicizersPanel_SetToAllDocuments, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane20, javax.swing.GroupLayout.DEFAULT_SIZE, 437, Short.MAX_VALUE)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, JGAAP_CanonicizerPanelLayout.createSequentialGroup()
.addComponent(jLabel27)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 255, Short.MAX_VALUE)
.addComponent(CanonicizersPanel_NotesButton))))
.addGroup(JGAAP_CanonicizerPanelLayout.createSequentialGroup()
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(jScrollPane21, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel31, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel32)
.addComponent(jScrollPane11, javax.swing.GroupLayout.DEFAULT_SIZE, 463, Short.MAX_VALUE))))
.addContainerGap())
);
JGAAP_CanonicizerPanelLayout.setVerticalGroup(
JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, JGAAP_CanonicizerPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel27)
.addComponent(jLabel30)
.addComponent(jLabel29))
.addGroup(JGAAP_CanonicizerPanelLayout.createSequentialGroup()
.addGap(5, 5, 5)
.addComponent(CanonicizersPanel_NotesButton)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane20, javax.swing.GroupLayout.DEFAULT_SIZE, 304, Short.MAX_VALUE)
.addGroup(JGAAP_CanonicizerPanelLayout.createSequentialGroup()
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_CanonicizerPanelLayout.createSequentialGroup()
.addComponent(CanonicizersPanel_AddCanonicizerButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(CanonicizersPanel_RemoveCanonicizerButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(CanonicizersPanel_AddAllCanonicizersButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(CanonicizersPanel_RemoveAllCanonicizersButton))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, JGAAP_CanonicizerPanelLayout.createSequentialGroup()
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jScrollPane13, javax.swing.GroupLayout.DEFAULT_SIZE, 217, Short.MAX_VALUE)
.addComponent(jScrollPane12, javax.swing.GroupLayout.DEFAULT_SIZE, 217, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(CanonicizersPanel_SetToDocumentButton)))
.addGap(6, 6, 6)
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(JGAAP_CanonicizerPanelLayout.createSequentialGroup()
.addComponent(jLabel33)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel34)
.addGap(18, 18, 18))
.addGroup(JGAAP_CanonicizerPanelLayout.createSequentialGroup()
.addComponent(CanonicizersPanel_SetToDocumentTypeButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(CanonicizersPanel_SetToAllDocuments)))))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel31)
.addComponent(jLabel32))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_CanonicizerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jScrollPane21, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
);
JGAAP_TabbedPane.addTab("Canonicizers", JGAAP_CanonicizerPanel);
EventSetsPanel_NotesButton.setLabel("Notes");
EventSetsPanel_NotesButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
EventSetsPanel_NotesButtonActionPerformed(evt);
}
});
jLabel6.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel6.setText("Event Drivers");
jLabel7.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel7.setText("Parameters");
jLabel8.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel8.setText("Event Driver Description");
jLabel9.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel9.setText("Selected");
EventSetsPanel_EventSetListBox.setModel(EventSetsListBox_Model);
EventSetsPanel_EventSetListBox.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
EventSetsPanel_EventSetListBox.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
EventSetsPanel_EventSetListBoxMouseClicked(evt);
}
});
EventSetsPanel_EventSetListBox.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
EventSetsPanel_EventSetListBoxMouseMoved(evt);
}
});
jScrollPane9.setViewportView(EventSetsPanel_EventSetListBox);
EventSetsPanel_SelectedEventSetListBox.setModel(SelectedEventSetsListBox_Model);
EventSetsPanel_SelectedEventSetListBox.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
EventSetsPanel_SelectedEventSetListBox.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
EventSetsPanel_SelectedEventSetListBoxMouseClicked(evt);
}
});
EventSetsPanel_SelectedEventSetListBox.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
EventSetsPanel_SelectedEventSetListBoxMouseMoved(evt);
}
});
jScrollPane10.setViewportView(EventSetsPanel_SelectedEventSetListBox);
EventSetsPanel_ParametersPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
javax.swing.GroupLayout EventSetsPanel_ParametersPanelLayout = new javax.swing.GroupLayout(EventSetsPanel_ParametersPanel);
EventSetsPanel_ParametersPanel.setLayout(EventSetsPanel_ParametersPanelLayout);
EventSetsPanel_ParametersPanelLayout.setHorizontalGroup(
EventSetsPanel_ParametersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 344, Short.MAX_VALUE)
);
EventSetsPanel_ParametersPanelLayout.setVerticalGroup(
EventSetsPanel_ParametersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 300, Short.MAX_VALUE)
);
EventSetsPanel_EventSetDescriptionTextBox.setColumns(20);
EventSetsPanel_EventSetDescriptionTextBox.setLineWrap(true);
EventSetsPanel_EventSetDescriptionTextBox.setRows(5);
EventSetsPanel_EventSetDescriptionTextBox.setWrapStyleWord(true);
jScrollPane6.setViewportView(EventSetsPanel_EventSetDescriptionTextBox);
EventSetsPanel_AddEventSetButton.setText("\u2192");
EventSetsPanel_AddEventSetButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
EventSetsPanel_AddEventSetButtonActionPerformed(evt);
}
});
EventSetsPanel_RemoveEventSetButton.setText("\u2190");
EventSetsPanel_RemoveEventSetButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
EventSetsPanel_RemoveEventSetButtonActionPerformed(evt);
}
});
EventSetsPanel_AddAllEventSetsButton.setText("All");
EventSetsPanel_AddAllEventSetsButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
EventSetsPanel_AddAllEventSetsButtonActionPerformed(evt);
}
});
EventSetsPanel_RemoveAllEventSetsButton.setText("Clear");
EventSetsPanel_RemoveAllEventSetsButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
EventSetsPanel_RemoveAllEventSetsButtonActionPerformed(evt);
}
});
javax.swing.GroupLayout JGAAP_EventSetsPanelLayout = new javax.swing.GroupLayout(JGAAP_EventSetsPanel);
JGAAP_EventSetsPanel.setLayout(JGAAP_EventSetsPanelLayout);
JGAAP_EventSetsPanelLayout.setHorizontalGroup(
JGAAP_EventSetsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, JGAAP_EventSetsPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(JGAAP_EventSetsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jScrollPane6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 824, Short.MAX_VALUE)
.addComponent(jLabel8, javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_EventSetsPanelLayout.createSequentialGroup()
.addGroup(JGAAP_EventSetsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel6))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_EventSetsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(EventSetsPanel_RemoveEventSetButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(EventSetsPanel_AddAllEventSetsButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(EventSetsPanel_AddEventSetButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(EventSetsPanel_RemoveAllEventSetsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_EventSetsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel9)
.addComponent(jScrollPane10, javax.swing.GroupLayout.PREFERRED_SIZE, 216, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_EventSetsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_EventSetsPanelLayout.createSequentialGroup()
.addComponent(jLabel7)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 163, Short.MAX_VALUE)
.addComponent(EventSetsPanel_NotesButton))
.addComponent(EventSetsPanel_ParametersPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
.addContainerGap())
);
JGAAP_EventSetsPanelLayout.setVerticalGroup(
JGAAP_EventSetsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_EventSetsPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(JGAAP_EventSetsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_EventSetsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel6)
.addComponent(jLabel9))
.addGroup(JGAAP_EventSetsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(EventSetsPanel_NotesButton)
.addComponent(jLabel7)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_EventSetsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(EventSetsPanel_ParametersPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jScrollPane10, javax.swing.GroupLayout.DEFAULT_SIZE, 304, Short.MAX_VALUE)
.addComponent(jScrollPane9, javax.swing.GroupLayout.DEFAULT_SIZE, 304, Short.MAX_VALUE)
.addGroup(JGAAP_EventSetsPanelLayout.createSequentialGroup()
.addComponent(EventSetsPanel_AddEventSetButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(EventSetsPanel_RemoveEventSetButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(EventSetsPanel_AddAllEventSetsButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(EventSetsPanel_RemoveAllEventSetsButton)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel8)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
JGAAP_TabbedPane.addTab("Event Drivers", JGAAP_EventSetsPanel);
jLabel15.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel15.setText("Event Culling");
jLabel16.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel16.setText("Parameters");
jLabel17.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel17.setText("Selected");
EventCullingPanel_NotesButton.setLabel("Notes");
EventCullingPanel_NotesButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
EventCullingPanel_NotesButtonActionPerformed(evt);
}
});
EventCullingPanel_SelectedEventCullingListBox.setModel(SelectedEventCullingListBox_Model);
EventCullingPanel_SelectedEventCullingListBox.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
EventCullingPanel_SelectedEventCullingListBox.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
EventCullingPanel_SelectedEventCullingListBoxMouseClicked(evt);
}
});
EventCullingPanel_SelectedEventCullingListBox.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
EventCullingPanel_SelectedEventCullingListBoxMouseMoved(evt);
}
});
jScrollPane14.setViewportView(EventCullingPanel_SelectedEventCullingListBox);
EventCullingPanel_AddEventCullingButton.setText("\u2192");
EventCullingPanel_AddEventCullingButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
EventCullingPanel_AddEventCullingButtonActionPerformed(evt);
}
});
EventCullingPanel_RemoveEventCullingButton.setText("\u2190");
EventCullingPanel_RemoveEventCullingButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
EventCullingPanel_RemoveEventCullingButtonActionPerformed(evt);
}
});
EventCullingPanel_AddAllEventCullingButton.setText("All");
EventCullingPanel_AddAllEventCullingButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
EventCullingPanel_AddAllEventCullingButtonActionPerformed(evt);
}
});
EventCullingPanel_RemoveAllEventCullingButton.setText("Clear");
EventCullingPanel_RemoveAllEventCullingButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
EventCullingPanel_RemoveAllEventCullingButtonActionPerformed(evt);
}
});
EventCullingPanel_ParametersPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
javax.swing.GroupLayout EventCullingPanel_ParametersPanelLayout = new javax.swing.GroupLayout(EventCullingPanel_ParametersPanel);
EventCullingPanel_ParametersPanel.setLayout(EventCullingPanel_ParametersPanelLayout);
EventCullingPanel_ParametersPanelLayout.setHorizontalGroup(
EventCullingPanel_ParametersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 343, Short.MAX_VALUE)
);
EventCullingPanel_ParametersPanelLayout.setVerticalGroup(
EventCullingPanel_ParametersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 300, Short.MAX_VALUE)
);
EventCullingPanel_EventCullingListBox.setModel(EventCullingListBox_Model);
EventCullingPanel_EventCullingListBox.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
EventCullingPanel_EventCullingListBox.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
EventCullingPanel_EventCullingListBoxMouseClicked(evt);
}
});
EventCullingPanel_EventCullingListBox.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
EventCullingPanel_EventCullingListBoxMouseMoved(evt);
}
});
jScrollPane15.setViewportView(EventCullingPanel_EventCullingListBox);
EventCullingPanel_EventCullingDescriptionTextbox.setColumns(20);
EventCullingPanel_EventCullingDescriptionTextbox.setLineWrap(true);
EventCullingPanel_EventCullingDescriptionTextbox.setRows(5);
EventCullingPanel_EventCullingDescriptionTextbox.setWrapStyleWord(true);
jScrollPane16.setViewportView(EventCullingPanel_EventCullingDescriptionTextbox);
jLabel18.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel18.setText("Event Culling Description");
javax.swing.GroupLayout JGAAP_EventCullingPanelLayout = new javax.swing.GroupLayout(JGAAP_EventCullingPanel);
JGAAP_EventCullingPanel.setLayout(JGAAP_EventCullingPanelLayout);
JGAAP_EventCullingPanelLayout.setHorizontalGroup(
JGAAP_EventCullingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, JGAAP_EventCullingPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(JGAAP_EventCullingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jScrollPane16, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 824, Short.MAX_VALUE)
.addComponent(jLabel18, javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_EventCullingPanelLayout.createSequentialGroup()
.addGroup(JGAAP_EventCullingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane15, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel15))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_EventCullingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(EventCullingPanel_RemoveEventCullingButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(EventCullingPanel_AddAllEventCullingButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(EventCullingPanel_AddEventCullingButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(EventCullingPanel_RemoveAllEventCullingButton, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_EventCullingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel17)
.addComponent(jScrollPane14, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_EventCullingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(JGAAP_EventCullingPanelLayout.createSequentialGroup()
.addComponent(jLabel16)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 162, Short.MAX_VALUE)
.addComponent(EventCullingPanel_NotesButton))
.addComponent(EventCullingPanel_ParametersPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
.addContainerGap())
);
JGAAP_EventCullingPanelLayout.setVerticalGroup(
JGAAP_EventCullingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_EventCullingPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(JGAAP_EventCullingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_EventCullingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel15)
.addComponent(jLabel17)
.addComponent(jLabel16))
.addComponent(EventCullingPanel_NotesButton))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_EventCullingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane14, javax.swing.GroupLayout.DEFAULT_SIZE, 304, Short.MAX_VALUE)
.addComponent(EventCullingPanel_ParametersPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jScrollPane15, javax.swing.GroupLayout.DEFAULT_SIZE, 304, Short.MAX_VALUE)
.addGroup(JGAAP_EventCullingPanelLayout.createSequentialGroup()
.addComponent(EventCullingPanel_AddEventCullingButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(EventCullingPanel_RemoveEventCullingButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(EventCullingPanel_AddAllEventCullingButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(EventCullingPanel_RemoveAllEventCullingButton)
.addGap(107, 107, 107)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel18)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane16, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
JGAAP_TabbedPane.addTab("Event Culling", JGAAP_EventCullingPanel);
jLabel20.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel20.setText("Analysis Methods");
jLabel21.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel21.setText("AM Parameters");
jLabel22.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel22.setText("Selected");
AnalysisMethodPanel_NotesButton.setLabel("Notes");
AnalysisMethodPanel_NotesButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
AnalysisMethodPanel_NotesButtonActionPerformed(evt);
}
});
AnalysisMethodPanel_SelectedAnalysisMethodsListBox.setModel(SelectedAnalysisMethodListBox_Model);
AnalysisMethodPanel_SelectedAnalysisMethodsListBox.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
AnalysisMethodPanel_SelectedAnalysisMethodsListBox.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
AnalysisMethodPanel_SelectedAnalysisMethodsListBoxMouseClicked(evt);
}
});
AnalysisMethodPanel_SelectedAnalysisMethodsListBox.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
AnalysisMethodPanel_SelectedAnalysisMethodsListBoxMouseMoved(evt);
}
});
jScrollPane17.setViewportView(AnalysisMethodPanel_SelectedAnalysisMethodsListBox);
AnalysisMethodPanel_AddAnalysisMethodButton.setText("\u2192");
AnalysisMethodPanel_AddAnalysisMethodButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
AnalysisMethodPanel_AddAnalysisMethodButtonActionPerformed(evt);
}
});
AnalysisMethodPanel_RemoveAnalysisMethodsButton.setText("\u2190");
AnalysisMethodPanel_RemoveAnalysisMethodsButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
AnalysisMethodPanel_RemoveAnalysisMethodsButtonActionPerformed(evt);
}
});
AnalysisMethodPanel_AddAllAnalysisMethodsButton.setText("All");
AnalysisMethodPanel_AddAllAnalysisMethodsButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
AnalysisMethodPanel_AddAllAnalysisMethodsButtonActionPerformed(evt);
}
});
AnalysisMethodPanel_RemoveAllAnalysisMethodsButton.setText("Clear");
AnalysisMethodPanel_RemoveAllAnalysisMethodsButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
AnalysisMethodPanel_RemoveAllAnalysisMethodsButtonActionPerformed(evt);
}
});
AnalysisMethodPanel_AMParametersPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
javax.swing.GroupLayout AnalysisMethodPanel_AMParametersPanelLayout = new javax.swing.GroupLayout(AnalysisMethodPanel_AMParametersPanel);
AnalysisMethodPanel_AMParametersPanel.setLayout(AnalysisMethodPanel_AMParametersPanelLayout);
AnalysisMethodPanel_AMParametersPanelLayout.setHorizontalGroup(
AnalysisMethodPanel_AMParametersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 355, Short.MAX_VALUE)
);
AnalysisMethodPanel_AMParametersPanelLayout.setVerticalGroup(
AnalysisMethodPanel_AMParametersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 125, Short.MAX_VALUE)
);
AnalysisMethodPanel_AnalysisMethodsListBox.setModel(AnalysisMethodListBox_Model);
AnalysisMethodPanel_AnalysisMethodsListBox.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
AnalysisMethodPanel_AnalysisMethodsListBox.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
AnalysisMethodPanel_AnalysisMethodsListBoxMouseClicked(evt);
}
});
AnalysisMethodPanel_AnalysisMethodsListBox.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
AnalysisMethodPanel_AnalysisMethodsListBoxMouseMoved(evt);
}
});
jScrollPane18.setViewportView(AnalysisMethodPanel_AnalysisMethodsListBox);
jLabel28.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel28.setText("Distance Function Description");
AnalysisMethodPanel_AnalysisMethodDescriptionTextBox.setColumns(20);
AnalysisMethodPanel_AnalysisMethodDescriptionTextBox.setLineWrap(true);
AnalysisMethodPanel_AnalysisMethodDescriptionTextBox.setRows(5);
AnalysisMethodPanel_AnalysisMethodDescriptionTextBox.setWrapStyleWord(true);
jScrollPane19.setViewportView(AnalysisMethodPanel_AnalysisMethodDescriptionTextBox);
AnalysisMethodPanel_DistanceFunctionsListBox.setModel(DistanceFunctionsListBox_Model);
AnalysisMethodPanel_DistanceFunctionsListBox.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
AnalysisMethodPanel_DistanceFunctionsListBox.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
AnalysisMethodPanel_DistanceFunctionsListBoxMouseClicked(evt);
}
});
AnalysisMethodPanel_DistanceFunctionsListBox.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
AnalysisMethodPanel_DistanceFunctionsListBoxMouseMoved(evt);
}
});
jScrollPane22.setViewportView(AnalysisMethodPanel_DistanceFunctionsListBox);
jLabel35.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel35.setText("Distance Functions");
AnalysisMethodPanel_DistanceFunctionDescriptionTextBox.setColumns(20);
AnalysisMethodPanel_DistanceFunctionDescriptionTextBox.setLineWrap(true);
AnalysisMethodPanel_DistanceFunctionDescriptionTextBox.setRows(5);
AnalysisMethodPanel_DistanceFunctionDescriptionTextBox.setWrapStyleWord(true);
jScrollPane23.setViewportView(AnalysisMethodPanel_DistanceFunctionDescriptionTextBox);
jLabel36.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel36.setText("Analysis Method Description");
AnalysisMethodPanel_DFParametersPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
javax.swing.GroupLayout AnalysisMethodPanel_DFParametersPanelLayout = new javax.swing.GroupLayout(AnalysisMethodPanel_DFParametersPanel);
AnalysisMethodPanel_DFParametersPanel.setLayout(AnalysisMethodPanel_DFParametersPanelLayout);
AnalysisMethodPanel_DFParametersPanelLayout.setHorizontalGroup(
AnalysisMethodPanel_DFParametersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 355, Short.MAX_VALUE)
);
AnalysisMethodPanel_DFParametersPanelLayout.setVerticalGroup(
AnalysisMethodPanel_DFParametersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 128, Short.MAX_VALUE)
);
jLabel37.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
jLabel37.setText("DF Parameters");
javax.swing.GroupLayout JGAAP_AnalysisMethodPanelLayout = new javax.swing.GroupLayout(JGAAP_AnalysisMethodPanel);
JGAAP_AnalysisMethodPanel.setLayout(JGAAP_AnalysisMethodPanelLayout);
JGAAP_AnalysisMethodPanelLayout.setHorizontalGroup(
JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, JGAAP_AnalysisMethodPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(JGAAP_AnalysisMethodPanelLayout.createSequentialGroup()
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel35, javax.swing.GroupLayout.DEFAULT_SIZE, 257, Short.MAX_VALUE)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, JGAAP_AnalysisMethodPanelLayout.createSequentialGroup()
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jScrollPane22, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 187, Short.MAX_VALUE)
.addComponent(jScrollPane18, javax.swing.GroupLayout.Alignment.LEADING, 0, 0, Short.MAX_VALUE)
.addComponent(jLabel20, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(AnalysisMethodPanel_RemoveAnalysisMethodsButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(AnalysisMethodPanel_AddAllAnalysisMethodsButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(AnalysisMethodPanel_AddAnalysisMethodButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(AnalysisMethodPanel_RemoveAllAnalysisMethodsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel22)
.addComponent(jScrollPane17, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(AnalysisMethodPanel_DFParametersPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(AnalysisMethodPanel_AMParametersPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(JGAAP_AnalysisMethodPanelLayout.createSequentialGroup()
.addComponent(jLabel21)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 133, Short.MAX_VALUE)
.addComponent(AnalysisMethodPanel_NotesButton))
.addComponent(jLabel37)))
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, JGAAP_AnalysisMethodPanelLayout.createSequentialGroup()
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane19, javax.swing.GroupLayout.PREFERRED_SIZE, 405, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel36))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel28)
.addComponent(jScrollPane23, javax.swing.GroupLayout.DEFAULT_SIZE, 413, Short.MAX_VALUE))))
.addContainerGap())
);
JGAAP_AnalysisMethodPanelLayout.setVerticalGroup(
JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_AnalysisMethodPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel20)
.addComponent(jLabel21)
.addComponent(jLabel22)
.addComponent(AnalysisMethodPanel_NotesButton))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane17, javax.swing.GroupLayout.DEFAULT_SIZE, 301, Short.MAX_VALUE)
.addGroup(JGAAP_AnalysisMethodPanelLayout.createSequentialGroup()
.addComponent(AnalysisMethodPanel_AMParametersPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel37)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(AnalysisMethodPanel_DFParametersPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(JGAAP_AnalysisMethodPanelLayout.createSequentialGroup()
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_AnalysisMethodPanelLayout.createSequentialGroup()
.addComponent(AnalysisMethodPanel_AddAnalysisMethodButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(AnalysisMethodPanel_RemoveAnalysisMethodsButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(AnalysisMethodPanel_AddAllAnalysisMethodsButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(AnalysisMethodPanel_RemoveAllAnalysisMethodsButton))
.addComponent(jScrollPane18, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel35)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane22, javax.swing.GroupLayout.DEFAULT_SIZE, 132, Short.MAX_VALUE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel28)
.addComponent(jLabel36))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_AnalysisMethodPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jScrollPane19, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jScrollPane23, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
);
JGAAP_TabbedPane.addTab("Analysis Methods", JGAAP_AnalysisMethodPanel);
ReviewPanel_ProcessButton.setLabel("Process");
ReviewPanel_ProcessButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ReviewPanel_ProcessButtonActionPerformed(evt);
}
});
ReviewPanel_DocumentsLabel.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
ReviewPanel_DocumentsLabel.setText("Documents");
ReviewPanel_DocumentsLabel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
ReviewPanel_DocumentsLabelMouseClicked(evt);
}
});
ReviewPanel_DocumentsTable.setModel(DocumentsTable_Model);
ReviewPanel_DocumentsTable.setEnabled(false);
ReviewPanel_DocumentsTable.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
ReviewPanel_DocumentsTableMouseClicked(evt);
}
});
jScrollPane24.setViewportView(ReviewPanel_DocumentsTable);
ReviewPanel_SelectedEventSetLabel.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
ReviewPanel_SelectedEventSetLabel.setText("Event Driver");
ReviewPanel_SelectedEventSetLabel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
ReviewPanel_SelectedEventSetLabelMouseClicked(evt);
}
});
ReviewPanel_SelectedEventCullingLabel.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
ReviewPanel_SelectedEventCullingLabel.setText("Event Culling");
ReviewPanel_SelectedEventCullingLabel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
ReviewPanel_SelectedEventCullingLabelMouseClicked(evt);
}
});
ReviewPanel_SelectedAnalysisMethodsLabel.setFont(new java.awt.Font("Microsoft Sans Serif", 0, 24));
ReviewPanel_SelectedAnalysisMethodsLabel.setText("Analysis Methods");
ReviewPanel_SelectedAnalysisMethodsLabel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
ReviewPanel_SelectedAnalysisMethodsLabelMouseClicked(evt);
}
});
ReviewPanel_SelectedEventSetListBox.setModel(SelectedEventSetsListBox_Model);
ReviewPanel_SelectedEventSetListBox.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
ReviewPanel_SelectedEventSetListBox.setEnabled(false);
ReviewPanel_SelectedEventSetListBox.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
ReviewPanel_SelectedEventSetListBoxMouseClicked(evt);
}
});
jScrollPane25.setViewportView(ReviewPanel_SelectedEventSetListBox);
ReviewPanel_SelectedEventCullingListBox.setModel(SelectedEventCullingListBox_Model);
ReviewPanel_SelectedEventCullingListBox.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
ReviewPanel_SelectedEventCullingListBox.setEnabled(false);
ReviewPanel_SelectedEventCullingListBox.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
ReviewPanel_SelectedEventCullingListBoxMouseClicked(evt);
}
});
jScrollPane26.setViewportView(ReviewPanel_SelectedEventCullingListBox);
ReviewPanel_SelectedAnalysisMethodsListBox.setModel(SelectedAnalysisMethodListBox_Model);
ReviewPanel_SelectedAnalysisMethodsListBox.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
ReviewPanel_SelectedAnalysisMethodsListBox.setEnabled(false);
ReviewPanel_SelectedAnalysisMethodsListBox.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
ReviewPanel_SelectedAnalysisMethodsListBoxMouseClicked(evt);
}
});
jScrollPane27.setViewportView(ReviewPanel_SelectedAnalysisMethodsListBox);
javax.swing.GroupLayout JGAAP_ReviewPanelLayout = new javax.swing.GroupLayout(JGAAP_ReviewPanel);
JGAAP_ReviewPanel.setLayout(JGAAP_ReviewPanelLayout);
JGAAP_ReviewPanelLayout.setHorizontalGroup(
JGAAP_ReviewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, JGAAP_ReviewPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(JGAAP_ReviewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jScrollPane24, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 824, Short.MAX_VALUE)
.addComponent(ReviewPanel_DocumentsLabel, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(ReviewPanel_ProcessButton)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, JGAAP_ReviewPanelLayout.createSequentialGroup()
.addGroup(JGAAP_ReviewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane25, javax.swing.GroupLayout.PREFERRED_SIZE, 273, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(ReviewPanel_SelectedEventSetLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_ReviewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(ReviewPanel_SelectedEventCullingLabel)
.addComponent(jScrollPane26, javax.swing.GroupLayout.PREFERRED_SIZE, 268, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_ReviewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(ReviewPanel_SelectedAnalysisMethodsLabel)
.addComponent(jScrollPane27, javax.swing.GroupLayout.DEFAULT_SIZE, 271, Short.MAX_VALUE))))
.addContainerGap())
);
JGAAP_ReviewPanelLayout.setVerticalGroup(
JGAAP_ReviewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(JGAAP_ReviewPanelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(ReviewPanel_DocumentsLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane24, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_ReviewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(ReviewPanel_SelectedEventSetLabel)
.addComponent(ReviewPanel_SelectedEventCullingLabel)
.addComponent(ReviewPanel_SelectedAnalysisMethodsLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(JGAAP_ReviewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jScrollPane27, javax.swing.GroupLayout.DEFAULT_SIZE, 258, Short.MAX_VALUE)
.addComponent(jScrollPane26, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 258, Short.MAX_VALUE)
.addComponent(jScrollPane25, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 258, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(ReviewPanel_ProcessButton)
.addContainerGap())
);
JGAAP_TabbedPane.addTab("Review & Process", JGAAP_ReviewPanel);
Next_Button.setText("Next \u2192");
Next_Button.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
Next_ButtonActionPerformed(evt);
}
});
Review_Button.setText("Finish & Review");
Review_Button.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
Review_ButtonActionPerformed(evt);
}
});
jMenu1.setText("File");
jMenu4.setText("Batch Documents");
BatchSaveMenuItem.setText("Save Documents");
BatchSaveMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
BatchSaveMenuItemActionPerformed(evt);
}
});
jMenu4.add(BatchSaveMenuItem);
BatchLoadMenuItem.setText("Load Documents");
BatchLoadMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
BatchLoadMenuItemActionPerformed(evt);
}
});
jMenu4.add(BatchLoadMenuItem);
jMenu1.add(jMenu4);
jMenu2.setText("AAAC Problems");
ProblemAMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemBMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_B, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemCMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemDMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_D, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemEMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(KeyEvent.VK_E, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemFMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemGMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_G, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemHMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemIMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_I, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemJMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_J, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemKMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_K, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemLMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_L, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemMMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_M, (java.awt.event.InputEvent.CTRL_MASK) | InputEvent.SHIFT_MASK));
ProblemAMenuItem.setText("Problem A");
ProblemAMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemAMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemAMenuItem);
ProblemBMenuItem.setText("Problem B");
ProblemBMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemBMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemBMenuItem);
ProblemCMenuItem.setText("Problem C");
ProblemCMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemCMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemCMenuItem);
ProblemDMenuItem.setText("Problem D");
ProblemDMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemDMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemDMenuItem);
ProblemEMenuItem.setText("Problem E");
ProblemEMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemEMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemEMenuItem);
ProblemFMenuItem.setText("Problem F");
ProblemFMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemFMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemFMenuItem);
ProblemGMenuItem.setText("Problem G");
ProblemGMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemGMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemGMenuItem);
ProblemHMenuItem.setText("Problem H");
ProblemHMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemHMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemHMenuItem);
ProblemIMenuItem.setText("Problem I");
ProblemIMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemIMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemIMenuItem);
ProblemJMenuItem.setText("Problem J");
ProblemJMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemJMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemJMenuItem);
ProblemKMenuItem.setText("Problem K");
ProblemKMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemKMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemKMenuItem);
ProblemLMenuItem.setText("Problem L");
ProblemLMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemLMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemLMenuItem);
ProblemMMenuItem.setText("Problem M");
ProblemMMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ProblemMMenuItemActionPerformed(evt);
}
});
jMenu2.add(ProblemMMenuItem);
jMenu1.add(jMenu2);
exitMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Q, java.awt.event.InputEvent.CTRL_MASK));
exitMenuItem.setText("Exit");
exitMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
exitMenuItemActionPerformed(evt);
}
});
jMenu1.add(exitMenuItem);
JGAAP_MenuBar.add(jMenu1);
helpMenu.setText("Help");
aboutMenuItem.setText("About..");
aboutMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
aboutMenuItemActionPerformed(evt);
}
});
helpMenu.add(aboutMenuItem);
JGAAP_MenuBar.add(helpMenu);
setJMenuBar(JGAAP_MenuBar);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(JGAAP_TabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 849, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addComponent(Review_Button)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(Next_Button)))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(JGAAP_TabbedPane, javax.swing.GroupLayout.PREFERRED_SIZE, 529, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(Next_Button)
.addComponent(Review_Button))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
pack();
}
|
public boolean hitEntity(ItemStack itemstack, EntityLiving entityliving, EntityLiving player) {
if(Math.random() < 0.7)
return false;
if(itemstack.getItem().itemID == MetallurgyMetals.netherSet.getOreInfo("Ignatius").sword.itemID)
{
entityliving.setFire(2);
}
else if(itemstack.getItem().itemID == MetallurgyMetals.netherSet.getOreInfo("Shadow Iron").sword.itemID)
{
entityliving.addPotionEffect(new PotionEffect(weakness, 80, 0));
}
else if(itemstack.getItem().itemID == MetallurgyMetals.netherSet.getOreInfo("Vyroxeres").sword.itemID)
{
entityliving.addPotionEffect(new PotionEffect(poison, 80, 0));
}
else if(itemstack.getItem().itemID == MetallurgyMetals.netherSet.getOreInfo("Ceruclase").sword.itemID)
{
entityliving.addPotionEffect(new PotionEffect(slowness, 80, 0));
}
else if(itemstack.getItem().itemID == MetallurgyMetals.netherSet.getOreInfo("Kalendrite").sword.itemID)
{
player.addPotionEffect(new PotionEffect(regen, 80, 0));
}
else if(itemstack.getItem().itemID == MetallurgyMetals.netherSet.getOreInfo("Vulcanite").sword.itemID)
{
entityliving.setFire(4);
}
else if(itemstack.getItem().itemID == MetallurgyMetals.netherSet.getOreInfo("Sanguinite").sword.itemID)
{
entityliving.addPotionEffect(new PotionEffect(wither, 80, 0));
}
else if(itemstack.getItem().itemID == MetallurgyMetals.netherSet.getOreInfo("Shadow Steel").sword.itemID)
{
entityliving.addPotionEffect(new PotionEffect(weakness, 80, 1));
}
else if(itemstack.getItem().itemID == MetallurgyMetals.netherSet.getOreInfo("Inolashite").sword.itemID)
{
entityliving.addPotionEffect(new PotionEffect(poison, 80, 0));
entityliving.addPotionEffect(new PotionEffect(slowness, 80, 0));
}
else if(itemstack.getItem().itemID == MetallurgyMetals.netherSet.getOreInfo("Amoredrine").sword.itemID)
{
player.heal(4);
}
return false;
}
| public boolean hitEntity(ItemStack itemstack, EntityLiving entityliving, EntityLiving player) {
if(Math.random() < 0.7)
return false;
if(itemstack.getItem().itemID == MetallurgyMetals.netherSet.getOreInfo("Ignatius").sword.itemID)
{
entityliving.setFire(2);
}
else if(itemstack.getItem().itemID == MetallurgyMetals.netherSet.getOreInfo("Shadow Iron").sword.itemID)
{
entityliving.addPotionEffect(new PotionEffect(weakness, 80, 0));
}
else if(itemstack.getItem().itemID == MetallurgyMetals.netherSet.getOreInfo("Vyroxeres").sword.itemID)
{
entityliving.addPotionEffect(new PotionEffect(poison, 80, 0));
}
else if(itemstack.getItem().itemID == MetallurgyMetals.netherSet.getOreInfo("Ceruclase").sword.itemID)
{
entityliving.addPotionEffect(new PotionEffect(slowness, 80, 0));
}
else if(itemstack.getItem().itemID == MetallurgyMetals.netherSet.getOreInfo("Kalendrite").sword.itemID)
{
player.addPotionEffect(new PotionEffect(regen, 80, 0));
}
else if(itemstack.getItem().itemID == MetallurgyMetals.netherSet.getOreInfo("Vulcanite").sword.itemID)
{
entityliving.setFire(4);
}
else if(itemstack.getItem().itemID == MetallurgyMetals.netherSet.getOreInfo("Sanguinite").sword.itemID)
{
entityliving.addPotionEffect(new PotionEffect(wither, 80, 0));
}
else if(itemstack.getItem().itemID == MetallurgyMetals.netherSet.getOreInfo("Shadow Steel").sword.itemID)
{
entityliving.addPotionEffect(new PotionEffect(weakness, 80, 1));
}
else if(itemstack.getItem().itemID == MetallurgyMetals.netherSet.getOreInfo("Inolashite").sword.itemID)
{
entityliving.addPotionEffect(new PotionEffect(poison, 80, 0));
entityliving.addPotionEffect(new PotionEffect(slowness, 80, 0));
}
else if(itemstack.getItem().itemID == MetallurgyMetals.netherSet.getOreInfo("Amordrine").sword.itemID)
{
player.heal(3);
}
return false;
}
|
public Element exec(Element params, ServiceContext context) throws Exception
{
String url = params.getChildText("url");
URL u = new URL(url);
HttpURLConnection conn = (HttpURLConnection)u.openConnection();
BufferedInputStream is = new BufferedInputStream(conn.getInputStream());
Element mapContext = Xml.loadStream(is);
conn.disconnect();
String sreplace = params.getChildText("clear");
boolean breplace = Utils.getBooleanAttrib(sreplace, true);
MapMerger mm = breplace?
new MapMerger():
MapUtil.getMapMerger(context);
WMCViewContext vc = WMCFactory.parseViewContext(mapContext);
WMCWindow win = vc.getGeneral().getWindow();
String imgurl = MapUtil.setContext(mm, vc);
context.getUserSession().setProperty(Constants.SESSION_MAP, mm);
WMCExtension ext = vc.getGeneral().getExtension();
if(ext != null)
{
Element georss = ext.getChild("georss");
if(georss != null)
{
Element feed = (Element)georss.getChildren().get(0);
MarkerSet ms = GeoRSSCodec.parseGeoRSS(feed);
context.getUserSession().setProperty(Constants.SESSION_MARKERSET, ms);
}
}
Element response = new Element("response")
.addContent(new Element("imgUrl").setText(url))
.addContent(new Element("scale").setText(mm.getDistScale()))
.addContent(mm.getBoundingBox().toElement())
.addContent(new Element("width").setText("" + win.getWidth()))
.addContent(new Element("height").setText("" + win.getHeight()));
MarkerSet ms = (MarkerSet)context.getUserSession().getProperty(Constants.SESSION_MARKERSET);
if(ms != null)
response.addContent(ms.select(mm.getBoundingBox()).toElement());
return response;
}
| public Element exec(Element params, ServiceContext context) throws Exception
{
String url = params.getChildText("url");
URL u = new URL(url);
HttpURLConnection conn = (HttpURLConnection)u.openConnection();
BufferedInputStream is = new BufferedInputStream(conn.getInputStream());
Element mapContext = Xml.loadStream(is);
conn.disconnect();
String sreplace = params.getChildText("clear");
boolean breplace = Utils.getBooleanAttrib(sreplace, true);
MapMerger mm = breplace?
new MapMerger():
MapUtil.getMapMerger(context);
WMCViewContext vc = WMCFactory.parseViewContext(mapContext);
WMCWindow win = vc.getGeneral().getWindow();
String imgurl = MapUtil.setContext(mm, vc);
context.getUserSession().setProperty(Constants.SESSION_MAP, mm);
WMCExtension ext = vc.getGeneral().getExtension();
if(ext != null)
{
Element georss = ext.getChild("georss");
if(georss != null)
{
Element feed = (Element)georss.getChildren().get(0);
MarkerSet ms = GeoRSSCodec.parseGeoRSS(feed);
context.getUserSession().setProperty(Constants.SESSION_MARKERSET, ms);
}
}
Element response = new Element("response")
.addContent(new Element("imgUrl").setText(imgurl))
.addContent(new Element("scale").setText(mm.getDistScale()))
.addContent(mm.getBoundingBox().toElement())
.addContent(new Element("width").setText("" + win.getWidth()))
.addContent(new Element("height").setText("" + win.getHeight()));
MarkerSet ms = (MarkerSet)context.getUserSession().getProperty(Constants.SESSION_MARKERSET);
if(ms != null)
response.addContent(ms.select(mm.getBoundingBox()).toElement());
return response;
}
|
public String getFieldDefinition(Value v, String tk, String pk, boolean use_autoinc, boolean add_fieldname, boolean add_cr)
{
StringBuffer retval=new StringBuffer(128);
String fieldname = v.getName();
int length = v.getLength();
int precision = v.getPrecision();
if (add_fieldname) retval.append(fieldname).append(' ');
int type = v.getType();
switch(type)
{
case Value.VALUE_TYPE_DATE : retval.append("TIMESTAMP"); break;
case Value.VALUE_TYPE_BOOLEAN: retval.append("CHAR(1)"); break;
case Value.VALUE_TYPE_NUMBER :
case Value.VALUE_TYPE_INTEGER:
case Value.VALUE_TYPE_BIGNUMBER:
if (fieldname.equalsIgnoreCase(tk) ||
fieldname.equalsIgnoreCase(pk)
)
{
retval.append("BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 0, INCREMENT BY 1 PRIMARY KEY)");
}
else
{
if (length>0)
{
if (precision>0 || length>18)
{
retval.append("NUMERIC(").append(length).append(", ").append(precision).append(')');
}
else
{
if (length>9)
{
retval.append("BIGINT");
}
else
{
if (length<5)
{
retval.append("SMALLINT");
}
else
{
retval.append("INTEGER");
}
}
}
}
else
{
retval.append("DOUBLE PRECISION");
}
}
break;
case Value.VALUE_TYPE_STRING:
if (length>=DatabaseMeta.CLOB_LENGTH)
{
retval.append("TEXT");
}
else
{
retval.append("VARCHAR");
if (length>0)
{
retval.append('(').append(length);
}
else
{
retval.append('(');
}
retval.append(')');
}
break;
default:
retval.append(" UNKNOWN");
break;
}
if (add_cr) retval.append(Const.CR);
return retval.toString();
}
| public String getFieldDefinition(Value v, String tk, String pk, boolean use_autoinc, boolean add_fieldname, boolean add_cr)
{
StringBuffer retval=new StringBuffer(128);
String fieldname = v.getName();
int length = v.getLength();
int precision = v.getPrecision();
if (add_fieldname) retval.append(fieldname).append(' ');
int type = v.getType();
switch(type)
{
case Value.VALUE_TYPE_DATE : retval.append("TIMESTAMP"); break;
case Value.VALUE_TYPE_BOOLEAN: retval.append("CHAR(1)"); break;
case Value.VALUE_TYPE_NUMBER :
case Value.VALUE_TYPE_INTEGER:
case Value.VALUE_TYPE_BIGNUMBER:
if (fieldname.equalsIgnoreCase(tk) ||
fieldname.equalsIgnoreCase(pk)
)
{
retval.append("BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 0, INCREMENT BY 1) PRIMARY KEY");
}
else
{
if (length>0)
{
if (precision>0 || length>18)
{
retval.append("NUMERIC(").append(length).append(", ").append(precision).append(')');
}
else
{
if (length>9)
{
retval.append("BIGINT");
}
else
{
if (length<5)
{
retval.append("SMALLINT");
}
else
{
retval.append("INTEGER");
}
}
}
}
else
{
retval.append("DOUBLE PRECISION");
}
}
break;
case Value.VALUE_TYPE_STRING:
if (length>=DatabaseMeta.CLOB_LENGTH)
{
retval.append("TEXT");
}
else
{
retval.append("VARCHAR");
if (length>0)
{
retval.append('(').append(length);
}
else
{
retval.append('(');
}
retval.append(')');
}
break;
default:
retval.append(" UNKNOWN");
break;
}
if (add_cr) retval.append(Const.CR);
return retval.toString();
}
|
public String parse(String templ, Contact contactCustomer, Contact contactContractor,
Contact conctactController, Plant plant, Place place) {
String template = templ;
template.replace(CUSTOMER,
contactCustomer.getFirstName() + " " + contactCustomer.getLastName());
template.replace(CUSTOMER_STREET,
contactCustomer.getStreet() + " " + contactCustomer.getStreetNo());
template.replace(CUSTOMER_CITY,
contactCustomer.getPostCode() + " " + contactCustomer.getCity());
template.replace(CUSTOMER_OBJECT, place.getPlaceName());
template.replace(OBJECT_STREET, place.getStreet() + " " + place.getStreetNo());
template.replace(OBJECT_NUMBER, place.getPostCode() + " " + place.getCity());
template.replace(CONTRACTOR_NAME, contactContractor.getFirstName() + " "
+ contactContractor.getLastName());
template.replace(CONTRACTOR_STREET,
contactContractor.getStreet() + " " + contactContractor.getStreetNo());
template.replace(CONTRACTOR_CITY,
contactContractor.getPostCode() + " " + contactContractor.getCity());
template.replace(CONTROLLER_NAME, conctactController.getFirstName() + " "
+ conctactController.getLastName());
template.replace(CONTROLLER_STREET, conctactController.getStreet() + " "
+ conctactController.getLastName());
template.replace(CONTROLLER_CITY, conctactController.getPostCode() + " "
+ conctactController.getCity());
template.replace(PLANT, plant.getDescription());
return template;
}
| public String parse(String templ, Contact contactCustomer, Contact contactContractor,
Contact conctactController, Plant plant, Place place) {
String template = templ;
template.replace(CUSTOMER, contactCustomer.getName() + " " + contactCustomer.getName());
template.replace(CUSTOMER_STREET,
contactCustomer.getStreet() + " " + contactCustomer.getStreetNo());
template.replace(CUSTOMER_CITY,
contactCustomer.getPostCode() + " " + contactCustomer.getCity());
template.replace(CUSTOMER_OBJECT, place.getPlaceName());
template.replace(OBJECT_STREET, place.getStreet() + " " + place.getStreetNo());
template.replace(OBJECT_NUMBER, place.getPostCode() + " " + place.getCity());
template.replace(CONTRACTOR_NAME,
contactContractor.getName() + " " + contactContractor.getName());
template.replace(CONTRACTOR_STREET,
contactContractor.getStreet() + " " + contactContractor.getStreetNo());
template.replace(CONTRACTOR_CITY,
contactContractor.getPostCode() + " " + contactContractor.getCity());
template.replace(CONTROLLER_NAME,
conctactController.getName() + " " + conctactController.getName());
template.replace(CONTROLLER_STREET, conctactController.getStreet() + " "
+ conctactController.getName());
template.replace(CONTROLLER_CITY, conctactController.getPostCode() + " "
+ conctactController.getCity());
template.replace(PLANT, plant.getDescription());
return template;
}
|
private Object instantiateFromString(String pkg, String cls, String args) {
String className = pkg + cls;
Object object;
try {
Class<?> clsObj = Class.forName(className);
Constructor<?> ctor = clsObj.getConstructor(String.class);
object = ctor.newInstance(args);
} catch (ClassNotFoundException e) {
throw new SOMError("Cannot find " + className);
} catch (InstantiationException e) {
throw new SOMError("Cannot create " + className);
} catch (IllegalAccessException e) {
throw new SOMError("Cannot create " + className);
} catch (NoSuchMethodException e) {
throw new SOMError("Cannot create " + className);
} catch (InvocationTargetException e) {
throw new SOMError("Cannot create " + className);
}
return object;
}
| private Object instantiateFromString(String pkg, String cls, String args) {
String className = pkg + cls;
Object object;
try {
Class<?> clsObj = Class.forName(className);
Constructor<?> ctor = clsObj.getConstructor(String.class);
object = ctor.newInstance(args);
} catch (ClassNotFoundException e) {
throw new SOMError("Cannot find " + className);
} catch (InstantiationException e) {
throw new SOMError("Cannot create " + className);
} catch (IllegalAccessException e) {
throw new SOMError("Cannot create " + className);
} catch (NoSuchMethodException e) {
throw new SOMError("Cannot create " + className);
} catch (InvocationTargetException e) {
throw new SOMError("Cannot create " + className +
": bad arguments.");
}
return object;
}
|
private static void printTable(double[][] res, String file, String caption, String label) throws Exception {
double[][] res2 = new double[6][];
int max = 0;
for (int gap = 1; gap <= 3; gap++) {
BufferedReader in = ReaderUtil.createInputReader(new File("res", "share_" + file + "_" + gap + ".txt"));
double[] good = new double[100];
double[] bad = new double[100];
double[] both = new double[100];
List<Double>[] percentage = new List[100];
do {
String s = in.readLine();
if (s.contains(",")) {
break;
}
if (s.indexOf(" ") == 0) {
break;
}
long[] data = CalculateRelation.getData(s);
int pos = 2;
int d = 1;
while (pos < data.length) {
max = Math.max(max, d);
if (data[pos] == 0) {
bad[d]++;
} else if (data[pos + 1] <= data[pos]) {
good[d]++;
} else {
both[d]++;
}
if (percentage[d] == null) {
percentage[d] = new ArrayList<Double>();
}
percentage[d].add(data[pos] * 100.0d / (data[pos] + data[pos + 1]));
d++;
pos += 2;
}
} while (true);
double[] ans = new double[max];
for (int i = 1; i <= max; i++) {
double total = 0;
for (double v : percentage[i]) {
total += v;
}
ans[i - 1] = total / percentage[i].size();
}
res[gap - 1] = ans;
res2[2 * gap - 2 ] = new double[max];
res2[2 * gap - 1] = new double[max];
for (int i = 1; i <= max; i++) {
double total = good[i] + bad[i] + both[i];
res2[2 * gap - 2][i - 1] = 100 * good[i] / total;
res2[2 * gap - 1][i - 1] = 100 * bad[i] / total;
}
}
int width = 19;
System.out.println("\\begin{landscape}\n");
for (int start = 1; start <= max; start += width) {
int end = Math.min(start + width - 1, max);
System.out.print("\\begin{table}[ht]\\tiny\n" +
"\\vspace{3mm}\n" +
"{\\centering\n" +
"\\begin{center}\n" +
"\\begin{tabular}{|c|cc|c|");
for (int i = start; i <= end; i++) {
System.out.print("c|");
}
int cols = end - start + 1;
System.out.println("}\n" +
" \\hline\n" +
" \\multicolumn{3}{|c|}{ } & \\multicolumn{ " + cols + "}{|c|}{$k$} \\\\\n" +
" \\cline{4-" + (cols + 3) + " }\n" +
" \\multicolumn{3}{|c|}{ } ");
for (int i = start; i <= end; i++) {
System.out.print(" & " + i);
}
for (int row = 0; row < 6; row++) {
System.out.print("\\\\\n");
if (row % 2 == 0) {
System.out.print("\\hline\n" +
" \\multirow{2}{*}{" + (row / 2 + 1) + "-aa}& \\multirow{2}{*}{spectra (\\%)} ");
} else {
System.out.println(" & ");
}
System.out.println(" & " + (row % 2 == 0 ? "+" : "--"));
for (int i = start; i <= end; i++) {
System.out.print(" & ");
if (res2[row].length > i - 1) {
System.out.print(ValidTags.df.format(res2[row][i-1]));
}
}
}
System.out.println(" \\\\\n" +
" \\hline\n" +
"\\end{tabular}\n" +
"\\end{center}\n" +
"\\par}\n" +
"\\centering\n");
if (end == max) {
System.out.println("\\caption{" + caption + "}\n" +
"\\label{table:all-top-scoring}\n");
}
System.out.println("\\vspace{3mm}\n" +
"\\end{table}");
}
System.out.println("\\end{landscape}");
System.out.println("\n\\begin{figure}\n" +
" \\begin{center}");
System.out.println("\\includegraphics{" + label + "}");
System.out.println("\\end{center}\n" +
"\\caption{" + caption + "}\n" +
" \\label{fig:" + label + "}\n" +
"\\end{figure}\n");
PrintWriter dataFile = ReaderUtil.createOutputFile(new File("plots", label + ".dat"));
PrintWriter gplFile = ReaderUtil.createOutputFile(new File("plots", label + ".gpl"));
gplFile.print("set terminal postscript eps color \"Helvetica\" 20\n" +
"set out \"" + label + ".eps\"\n" +
"set ylabel \"spectra (%)\"\n" +
"set xlabel \"tag length (l)\"\n" +
"plot");
gplFile.println("\"plots/" + label + ".dat\" using 1:2 title 't=1 +' with linespoints,\\");
gplFile.println("\"plots/" + label + ".dat\" using 1:3 title 't=1 -' with linespoints,\\");
gplFile.println("\"plots/" + label + ".dat\" using 1:4 title 't=2 +' with linespoints,\\");
gplFile.println("\"plots/" + label + ".dat\" using 1:5 title 't=2 -' with linespoints,\\");
gplFile.println("\"plots/" + label + ".dat\" using 1:6 title 't=3 +' with linespoints,\\");
gplFile.println("\"plots/" + label + ".dat\" using 1:7 title 't=3 -' with linespoints");
gplFile.close();
for (int i = 1; i <=14; i++) {
dataFile.print(i + " ");
for (int j = 0; j < 6; j++) {
dataFile.print(res2[j].length > i - 1 ? (res2[j][i-1]): " ");
dataFile.print(" ");
}
dataFile.println();
}
dataFile.close();
}
| private static void printTable(double[][] res, String file, String caption, String label) throws Exception {
double[][] res2 = new double[6][];
int max = 0;
for (int gap = 1; gap <= 3; gap++) {
BufferedReader in = ReaderUtil.createInputReader(new File("res", "share_" + file + "_" + gap + ".txt"));
double[] good = new double[100];
double[] bad = new double[100];
double[] both = new double[100];
List<Double>[] percentage = new List[100];
do {
String s = in.readLine();
if (s.contains(",")) {
break;
}
if (s.indexOf(" ") == 0) {
break;
}
long[] data = CalculateRelation.getData(s);
int pos = 2;
int d = 1;
while (pos < data.length) {
max = Math.max(max, d);
if (data[pos] == 0) {
bad[d]++;
} else if (data[pos + 1] <= data[pos]) {
good[d]++;
} else {
both[d]++;
}
if (percentage[d] == null) {
percentage[d] = new ArrayList<Double>();
}
percentage[d].add(data[pos] * 100.0d / (data[pos] + data[pos + 1]));
d++;
pos += 2;
}
} while (true);
double[] ans = new double[max];
for (int i = 1; i <= max; i++) {
double total = 0;
for (double v : percentage[i]) {
total += v;
}
ans[i - 1] = total / percentage[i].size();
}
res[gap - 1] = ans;
res2[2 * gap - 2 ] = new double[max];
res2[2 * gap - 1] = new double[max];
for (int i = 1; i <= max; i++) {
double total = good[i] + bad[i] + both[i];
res2[2 * gap - 2][i - 1] = 100 * good[i] / total;
res2[2 * gap - 1][i - 1] = 100 * bad[i] / total;
}
}
int width = 19;
System.out.println("\\begin{landscape}\n");
for (int start = 1; start <= max; start += width) {
int end = Math.min(start + width - 1, max);
System.out.print("\\begin{table}[ht]\\tiny\n" +
"\\vspace{3mm}\n" +
"{\\centering\n" +
"\\begin{center}\n" +
"\\begin{tabular}{|c|cc|c|");
for (int i = start; i <= end; i++) {
System.out.print("c|");
}
int cols = end - start + 1;
System.out.println("}\n" +
" \\hline\n" +
" \\multicolumn{3}{|c|}{ } & \\multicolumn{ " + cols + "}{|c|}{$k$} \\\\\n" +
" \\cline{4-" + (cols + 3) + " }\n" +
" \\multicolumn{3}{|c|}{ } ");
for (int i = start; i <= end; i++) {
System.out.print(" & " + i);
}
for (int row = 0; row < 6; row++) {
System.out.print("\\\\\n");
if (row % 2 == 0) {
System.out.print("\\hline\n" +
" \\multirow{2}{*}{" + (row / 2 + 1) + "-aa}& \\multirow{2}{*}{spectra (\\%)} ");
} else {
System.out.println(" & ");
}
System.out.println(" & " + (row % 2 == 0 ? "+" : "--"));
for (int i = start; i <= end; i++) {
System.out.print(" & ");
if (res2[row].length > i - 1) {
System.out.print(ValidTags.df.format(res2[row][i-1]));
}
}
}
System.out.println(" \\\\\n" +
" \\hline\n" +
"\\end{tabular}\n" +
"\\end{center}\n" +
"\\par}\n" +
"\\centering\n");
if (end == max) {
System.out.println("\\caption{" + caption + "}\n" +
"\\label{table:all-top-scoring}\n");
}
System.out.println("\\vspace{3mm}\n" +
"\\end{table}");
}
System.out.println("\\end{landscape}");
System.out.println("\n\\begin{figure}\n" +
" \\begin{center}");
System.out.println("\\includegraphics{" + label + "}");
System.out.println("\\end{center}\n" +
"\\caption{" + caption + "}\n" +
" \\label{fig:" + label + "}\n" +
"\\end{figure}\n");
PrintWriter dataFile = ReaderUtil.createOutputFile(new File("plots", label + ".dat"));
PrintWriter gplFile = ReaderUtil.createOutputFile(new File("plots", label + ".gpl"));
gplFile.print("set terminal postscript eps color \"Helvetica\" 22\n" +
"set out \"" + label + ".eps\"\n" +
"set ylabel \"spectra (%)\"\n" +
"set xlabel \"tag length (l)\"\n" +
"plot");
gplFile.println("\"plots/" + label + ".dat\" using 1:2 title 't=1 +' with linespoints,\\");
gplFile.println("\"plots/" + label + ".dat\" using 1:3 title 't=1 -' with linespoints,\\");
gplFile.println("\"plots/" + label + ".dat\" using 1:4 title 't=2 +' with linespoints,\\");
gplFile.println("\"plots/" + label + ".dat\" using 1:5 title 't=2 -' with linespoints,\\");
gplFile.println("\"plots/" + label + ".dat\" using 1:6 title 't=3 +' with linespoints,\\");
gplFile.println("\"plots/" + label + ".dat\" using 1:7 title 't=3 -' with linespoints");
gplFile.close();
for (int i = 1; i <=14; i++) {
dataFile.print(i + " ");
for (int j = 0; j < 6; j++) {
dataFile.print(res2[j].length > i - 1 ? (res2[j][i-1]): " ");
dataFile.print(" ");
}
dataFile.println();
}
dataFile.close();
}
|
public void testEditWithControls() throws Exception {
HtmlPage page = environment.getPage("//inplaceInputTest.jsf");
String withControlsComponentId = BASE_ID + WITH_CONTROLS;
edit(page, withControlsComponentId, "Another Test String");
HtmlElement cancel = page.getFirstByXPath("//*[@id = '" + withControlsComponentId + "Cancelbtn']");
assertNotNull(cancel);
cancel.mouseDown();
DomText text = page.getFirstByXPath("//*[@id = '"+ withControlsComponentId + "Label']/text()");
assertNotNull(text);
assertEquals("Edit Text", text.getTextContent());
HtmlElement span = page.getFirstByXPath("//*[@id = '"+ withControlsComponentId +"']");
assertNotNull(span);
assertEquals("rf-ii-d-s", span.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
edit(page, withControlsComponentId, "Another Test String");
HtmlElement ok = page.getFirstByXPath("//*[@id = '"+ withControlsComponentId + "Okbtn']");
assertNotNull(ok);
ok.mouseDown();
text = page.getFirstByXPath("//*[@id = '"+ withControlsComponentId +"Label']/text()");
assertNotNull(text);
assertEquals("Another Test String", text.getTextContent());
span = page.getFirstByXPath("//*[@id = '"+ withControlsComponentId +"']");
assertNotNull(span);
assertEquals("rf-ii-d-s rf-ii-c-s", span.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
edit(page, withControlsComponentId, "Test String");
blur(page);
text = page.getFirstByXPath("//*[@id = '"+ withControlsComponentId +"Label']/text()");
assertNotNull(text);
assertEquals("Test String", text.getTextContent());
}
| public void testEditWithControls() throws Exception {
HtmlPage page = environment.getPage("//inplaceInputTest.jsf");
String withControlsComponentId = BASE_ID + WITH_CONTROLS;
edit(page, withControlsComponentId, "Another Test String");
HtmlElement cancel = page.getFirstByXPath("//*[@id = '" + withControlsComponentId + "Cancelbtn']");
assertNotNull(cancel);
cancel.mouseDown();
DomText text = page.getFirstByXPath("//*[@id = '"+ withControlsComponentId + "Label']/text()");
assertNotNull(text);
assertEquals("Edit Text", text.getTextContent());
HtmlElement span = page.getFirstByXPath("//*[@id = '"+ withControlsComponentId +"']");
assertNotNull(span);
assertEquals("rf-ii-d-s rf-ii-c-s", span.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
edit(page, withControlsComponentId, "Another Test String");
HtmlElement ok = page.getFirstByXPath("//*[@id = '"+ withControlsComponentId + "Okbtn']");
assertNotNull(ok);
ok.mouseDown();
text = page.getFirstByXPath("//*[@id = '"+ withControlsComponentId +"Label']/text()");
assertNotNull(text);
assertEquals("Another Test String", text.getTextContent());
span = page.getFirstByXPath("//*[@id = '"+ withControlsComponentId +"']");
assertNotNull(span);
assertEquals("rf-ii-d-s rf-ii-c-s", span.getAttribute(HtmlConstants.CLASS_ATTRIBUTE));
edit(page, withControlsComponentId, "Test String");
blur(page);
text = page.getFirstByXPath("//*[@id = '"+ withControlsComponentId +"Label']/text()");
assertNotNull(text);
assertEquals("Test String", text.getTextContent());
}
|
private boolean validate() {
ServiceModel model = wizard.getServiceModel();
if (wizard.isJAXWS()) {
setMessage(JBossWSUIMessages.JBossWS_GenerateWizard_GenerateWizardPage_Description);
setErrorMessage(null);
JBossWSGenerateWizardValidator.setServiceModel(model);
addJarsIfFound.setEnabled(false);
if (!projects.isDisposed() && projects.getText().length() > 0) {
model.setWebProjectName(projects.getText());
}
if (((JBossWSAnnotatedClassWizard) this.getWizard()).getProject() == null) {
setErrorMessage(JBossWSUIMessages.Error_JBossWS_GenerateWizard_NoProjectSelected);
return false;
}
try {
IFacetedProject facetProject =
ProjectFacetsManager.create(((JBossWSAnnotatedClassWizard)this.getWizard()).getProject());
if (facetProject == null || facetProject.getProjectFacetVersion(IJ2EEFacetConstants.DYNAMIC_WEB_FACET) == null) {
setErrorMessage(JBossWSUIMessages.Error_JBossWS_GenerateWizard_NotDynamicWebProject2);
return false;
}
} catch (CoreException e1) {
setErrorMessage(JBossWSUIMessages.Error_JBossWS_GenerateWizard_NotDynamicWebProject2);
return false;
}
IFile web = ((JBossWSAnnotatedClassWizard) this.getWizard()).getWebFile();
if (web == null || !web.exists()) {
if (updateWebXML.getSelection()) {
setMessage(JBossWSUIMessages.Error_JBossWS_GenerateWizard_NoWebXML,
DialogPage.WARNING);
return true;
}
}
try {
if ("" .equals(JBossWSCreationUtils.getJavaProjectSrcLocation(((JBossWSAnnotatedClassWizard) this.getWizard()).getProject()))) {
setErrorMessage(JBossWSUIMessages.Error_JBossWS_GenerateWizard_NoSrcInProject);
return false;
}
} catch (JavaModelException e) {
e.printStackTrace();
}
IStatus status = JBossWSGenerateWizardValidator.isWSNameValid();
if (status != null) {
setErrorMessage(status.getMessage());
return false;
}
IStatus classNameStatus = JBossWSGenerateWizardValidator.isWSClassValid(model
.getCustomClassName(), wizard.getProject());
if (classNameStatus != null) {
if (classNameStatus.getSeverity() == IStatus.ERROR) {
setMessage(classNameStatus.getMessage(), DialogPage.WARNING);
setErrorMessage(null);
return true;
} else if (classNameStatus.getSeverity() == IStatus.WARNING) {
setMessage(classNameStatus.getMessage(), DialogPage.WARNING);
setErrorMessage(null);
return true;
}
}
setMessage(JBossWSUIMessages.JBossWS_GenerateWizard_GenerateWizardPage_Description);
setErrorMessage(null);
return true;
} else {
setMessage(JBossWSUIMessages.JBossWS_GenerateWizard_GenerateWizardPage_Description);
setErrorMessage(null);
JBossRSGenerateWizardValidator.setServiceModel(model);
if (!projects.isDisposed() && projects.getText().length() > 0) {
model.setWebProjectName(projects.getText());
}
setErrorMessage(null);
if (((JBossWSAnnotatedClassWizard) this.getWizard()).getProject() == null) {
setErrorMessage(JBossWSUIMessages.Error_JBossWS_GenerateWizard_NoProjectSelected);
return false;
}
try {
IFacetedProject facetProject =
ProjectFacetsManager.create(((JBossWSAnnotatedClassWizard)this.getWizard()).getProject());
if (facetProject.getProjectFacetVersion(IJ2EEFacetConstants.DYNAMIC_WEB_FACET) == null) {
setErrorMessage(JBossWSUIMessages.Error_JBossWS_GenerateWizard_NotDynamicWebProject2);
return false;
}
} catch (CoreException e1) {
setErrorMessage(JBossWSUIMessages.Error_JBossWS_GenerateWizard_NotDynamicWebProject2);
return false;
}
IFile web = ((JBossWSAnnotatedClassWizard) this.getWizard()).getWebFile();
if (web == null || !web.exists()) {
if (updateWebXML.getSelection()) {
setMessage(JBossWSUIMessages.Error_JBossWS_GenerateWizard_NoWebXML,
DialogPage.WARNING);
return true;
}
}
IStatus reNoREDirectoryInRuntimeRoot = RestEasyLibUtils.doesRuntimeHaveRootLevelRestEasyDir(
((JBossWSAnnotatedClassWizard) this.getWizard()).getProject());
addJarsIfFound.setEnabled(reNoREDirectoryInRuntimeRoot.getSeverity() == IStatus.OK);
IStatus reInstalledStatus =
RestEasyLibUtils.doesRuntimeSupportRestEasy(((JBossWSAnnotatedClassWizard) this.getWizard()).getProject());
if (reInstalledStatus.getSeverity() != IStatus.OK && !addJarsIfFound.getSelection()){
setMessage(JBossWSUIMessages.JBossRSGenerateWizardPage_Error_RestEasyJarsNotFoundInRuntime, DialogPage.WARNING);
return true;
}
try {
if ("" .equals(JBossWSCreationUtils.getJavaProjectSrcLocation(((JBossWSAnnotatedClassWizard) this.getWizard()).getProject()))) {
setErrorMessage(JBossWSUIMessages.Error_JBossWS_GenerateWizard_NoSrcInProject);
return false;
}
} catch (JavaModelException e) {
e.printStackTrace();
}
if (wizard.getUpdateWebXML()) {
IStatus alreadyHasREST = JBossRSGenerateWizardValidator.RESTAppExists();
if (alreadyHasREST != null) {
if (alreadyHasREST.getSeverity() == IStatus.ERROR) {
setErrorMessage(alreadyHasREST.getMessage());
return false;
} else if (alreadyHasREST.getSeverity() == IStatus.WARNING) {
setMessage(alreadyHasREST.getMessage(), DialogPage.WARNING);
setErrorMessage(null);
return true;
}
}
}
IStatus classNameStatus = JBossRSGenerateWizardValidator.isWSClassValid(model
.getCustomClassName(), wizard.getProject());
if (classNameStatus != null) {
if (classNameStatus.getSeverity() == IStatus.ERROR) {
setMessage(classNameStatus.getMessage(), DialogPage.WARNING);
setErrorMessage(null);
return true;
} else if (classNameStatus.getSeverity() == IStatus.WARNING) {
setMessage(classNameStatus.getMessage(), DialogPage.WARNING);
setErrorMessage(null);
return true;
}
}
IStatus appClassNameStatus = JBossRSGenerateWizardValidator.isAppClassNameValid(
model.getCustomPackage() + '.' + model.getApplicationClassName());
if (appClassNameStatus != null) {
if (appClassNameStatus.getSeverity() == IStatus.ERROR) {
setMessage(appClassNameStatus.getMessage(), DialogPage.ERROR);
return false;
} else if (appClassNameStatus.getSeverity() == IStatus.WARNING) {
setMessage(appClassNameStatus.getMessage(), DialogPage.WARNING);
return true;
}
}
}
setMessage(JBossWSUIMessages.JBossWSAnnotatedClassWizardPage_PageDescription);
setErrorMessage(null);
return true;
}
| private boolean validate() {
ServiceModel model = wizard.getServiceModel();
if (wizard.isJAXWS()) {
setMessage(JBossWSUIMessages.JBossWS_GenerateWizard_GenerateWizardPage_Description);
setErrorMessage(null);
JBossWSGenerateWizardValidator.setServiceModel(model);
addJarsIfFound.setEnabled(false);
if (!projects.isDisposed() && projects.getText().length() > 0) {
model.setWebProjectName(projects.getText());
}
if (((JBossWSAnnotatedClassWizard) this.getWizard()).getProject() == null) {
setErrorMessage(JBossWSUIMessages.Error_JBossWS_GenerateWizard_NoProjectSelected);
return false;
}
try {
IFacetedProject facetProject =
ProjectFacetsManager.create(((JBossWSAnnotatedClassWizard)this.getWizard()).getProject());
if (facetProject == null || facetProject.getProjectFacetVersion(IJ2EEFacetConstants.DYNAMIC_WEB_FACET) == null) {
setErrorMessage(JBossWSUIMessages.Error_JBossWS_GenerateWizard_NotDynamicWebProject2);
return false;
}
} catch (CoreException e1) {
setErrorMessage(JBossWSUIMessages.Error_JBossWS_GenerateWizard_NotDynamicWebProject2);
return false;
}
IFile web = ((JBossWSAnnotatedClassWizard) this.getWizard()).getWebFile();
if (web == null || !web.exists()) {
if (updateWebXML.getSelection()) {
setMessage(JBossWSUIMessages.Error_JBossWS_GenerateWizard_NoWebXML,
DialogPage.WARNING);
return true;
}
}
try {
if ("" .equals(JBossWSCreationUtils.getJavaProjectSrcLocation(((JBossWSAnnotatedClassWizard) this.getWizard()).getProject()))) {
setErrorMessage(JBossWSUIMessages.Error_JBossWS_GenerateWizard_NoSrcInProject);
return false;
}
} catch (JavaModelException e) {
e.printStackTrace();
}
IStatus status = JBossWSGenerateWizardValidator.isWSNameValid();
if (status != null) {
setErrorMessage(status.getMessage());
return false;
}
IStatus classNameStatus = JBossWSGenerateWizardValidator.isWSClassValid(model
.getCustomClassName(), wizard.getProject());
if (classNameStatus != null) {
if (classNameStatus.getSeverity() == IStatus.ERROR) {
setMessage(classNameStatus.getMessage(), DialogPage.WARNING);
setErrorMessage(null);
return true;
} else if (classNameStatus.getSeverity() == IStatus.WARNING) {
setMessage(classNameStatus.getMessage(), DialogPage.WARNING);
setErrorMessage(null);
return true;
}
}
setMessage(JBossWSUIMessages.JBossWS_GenerateWizard_GenerateWizardPage_Description);
setErrorMessage(null);
return true;
} else {
setMessage(JBossWSUIMessages.JBossWS_GenerateWizard_GenerateWizardPage_Description);
setErrorMessage(null);
JBossRSGenerateWizardValidator.setServiceModel(model);
if (!projects.isDisposed() && projects.getText().length() > 0) {
model.setWebProjectName(projects.getText());
}
setErrorMessage(null);
if (((JBossWSAnnotatedClassWizard) this.getWizard()).getProject() == null) {
setErrorMessage(JBossWSUIMessages.Error_JBossWS_GenerateWizard_NoProjectSelected);
return false;
}
try {
IFacetedProject facetProject =
ProjectFacetsManager.create(((JBossWSAnnotatedClassWizard)this.getWizard()).getProject());
if (facetProject == null || facetProject.getProjectFacetVersion(IJ2EEFacetConstants.DYNAMIC_WEB_FACET) == null) {
setErrorMessage(JBossWSUIMessages.Error_JBossWS_GenerateWizard_NotDynamicWebProject2);
return false;
}
} catch (CoreException e1) {
setErrorMessage(JBossWSUIMessages.Error_JBossWS_GenerateWizard_NotDynamicWebProject2);
return false;
}
IFile web = ((JBossWSAnnotatedClassWizard) this.getWizard()).getWebFile();
if (web == null || !web.exists()) {
if (updateWebXML.getSelection()) {
setMessage(JBossWSUIMessages.Error_JBossWS_GenerateWizard_NoWebXML,
DialogPage.WARNING);
return true;
}
}
IStatus reNoREDirectoryInRuntimeRoot = RestEasyLibUtils.doesRuntimeHaveRootLevelRestEasyDir(
((JBossWSAnnotatedClassWizard) this.getWizard()).getProject());
addJarsIfFound.setEnabled(reNoREDirectoryInRuntimeRoot.getSeverity() == IStatus.OK);
IStatus reInstalledStatus =
RestEasyLibUtils.doesRuntimeSupportRestEasy(((JBossWSAnnotatedClassWizard) this.getWizard()).getProject());
if (reInstalledStatus.getSeverity() != IStatus.OK && !addJarsIfFound.getSelection()){
setMessage(JBossWSUIMessages.JBossRSGenerateWizardPage_Error_RestEasyJarsNotFoundInRuntime, DialogPage.WARNING);
return true;
}
try {
if ("" .equals(JBossWSCreationUtils.getJavaProjectSrcLocation(((JBossWSAnnotatedClassWizard) this.getWizard()).getProject()))) {
setErrorMessage(JBossWSUIMessages.Error_JBossWS_GenerateWizard_NoSrcInProject);
return false;
}
} catch (JavaModelException e) {
e.printStackTrace();
}
if (wizard.getUpdateWebXML()) {
IStatus alreadyHasREST = JBossRSGenerateWizardValidator.RESTAppExists();
if (alreadyHasREST != null) {
if (alreadyHasREST.getSeverity() == IStatus.ERROR) {
setErrorMessage(alreadyHasREST.getMessage());
return false;
} else if (alreadyHasREST.getSeverity() == IStatus.WARNING) {
setMessage(alreadyHasREST.getMessage(), DialogPage.WARNING);
setErrorMessage(null);
return true;
}
}
}
IStatus classNameStatus = JBossRSGenerateWizardValidator.isWSClassValid(model
.getCustomClassName(), wizard.getProject());
if (classNameStatus != null) {
if (classNameStatus.getSeverity() == IStatus.ERROR) {
setMessage(classNameStatus.getMessage(), DialogPage.WARNING);
setErrorMessage(null);
return true;
} else if (classNameStatus.getSeverity() == IStatus.WARNING) {
setMessage(classNameStatus.getMessage(), DialogPage.WARNING);
setErrorMessage(null);
return true;
}
}
IStatus appClassNameStatus = JBossRSGenerateWizardValidator.isAppClassNameValid(
model.getCustomPackage() + '.' + model.getApplicationClassName());
if (appClassNameStatus != null) {
if (appClassNameStatus.getSeverity() == IStatus.ERROR) {
setMessage(appClassNameStatus.getMessage(), DialogPage.ERROR);
return false;
} else if (appClassNameStatus.getSeverity() == IStatus.WARNING) {
setMessage(appClassNameStatus.getMessage(), DialogPage.WARNING);
return true;
}
}
}
setMessage(JBossWSUIMessages.JBossWSAnnotatedClassWizardPage_PageDescription);
setErrorMessage(null);
return true;
}
|
public static void main(String[] args) {
String userTypeName = null;
boolean noSplash = false;
if (args.length > 0) {
for (int i = 0; i < args.length; i++) {
if (args[i].equals("-userType")) {
userTypeName = args[i + 1];
}
if (args[i].equals("-nosplash")) {
noSplash = true;
} else if (args[i].equalsIgnoreCase("DEV")) {
isDev = true;
}
}
}
ToolBox.setPlatform();
if (ToolBox.getPLATFORM() != ToolBox.MACOS || !isDev) {
getResourcePath();
}
remapStandardOuputs(isDev);
ResourceLocator.printDirectoriesSearchOrder(System.err);
try {
DenaliSecurityProvider.insertSecurityProvider();
} catch (Exception e) {
if (logger.isLoggable(Level.WARNING)) {
logger.log(Level.WARNING, "Could not insert security provider", e);
}
}
UserType userTypeNamed = UserType.getUserTypeNamed(userTypeName);
UserType.setCurrentUserType(userTypeNamed);
if (ToolBox.getFrame(null) != null) {
ToolBox.getFrame(null).setIconImage(userTypeNamed.getIconImage().getImage());
}
SplashWindow splashWindow = null;
if (!noSplash) {
splashWindow = new SplashWindow(FlexoFrame.getActiveFrame(), userTypeNamed, 10000);
}
if (isDev) {
FlexoLoggingFormatter.logDate = false;
}
FlexoProperties.load();
initProxyManagement();
initializeLoggingManager();
initUILAF();
FlexoApplication.initialize();
if (logger.isLoggable(Level.INFO)) {
logger.info("Starting on " + ToolBox.getPLATFORM() + "... JVM version is " + System.getProperty("java.version"));
}
if (logger.isLoggable(Level.INFO)) {
logger.info("Working directory is " + new File(".").getAbsolutePath());
}
if (logger.isLoggable(Level.INFO)) {
logger.info("Heap memory is about: " + ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getMax() / (1024 * 1024) + "Mb");
}
getModuleLoader().setAllowsDocSubmission(FlexoProperties.instance().getAllowsDocSubmission());
if (logger.isLoggable(Level.INFO)) {
logger.info("Launching FLEXO Application Suite version " + FlexoCst.BUSINESS_APPLICATION_VERSION_NAME + "...");
}
getFlexoResourceCenterService().getFlexoResourceCenter();
final SplashWindow splashWindow2 = splashWindow;
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
splashWindow2.setVisible(false);
splashWindow2.dispose();
if (getModuleLoader().fileNameToOpen == null) {
new WelcomeDialog();
} else {
try {
getProjectLoader().loadProject(new File(getModuleLoader().fileNameToOpen));
} catch (ProjectLoadingCancelledException e) {
new WelcomeDialog();
}
}
}
});
}
| public static void main(String[] args) {
String userTypeName = null;
boolean noSplash = false;
if (args.length > 0) {
for (int i = 0; i < args.length; i++) {
if (args[i].equals("-userType")) {
userTypeName = args[i + 1];
}
if (args[i].equals("-nosplash")) {
noSplash = true;
} else if (args[i].equalsIgnoreCase("DEV")) {
isDev = true;
}
}
}
ToolBox.setPlatform();
if (ToolBox.getPLATFORM() != ToolBox.MACOS || !isDev) {
getResourcePath();
}
remapStandardOuputs(isDev);
ResourceLocator.printDirectoriesSearchOrder(System.err);
try {
DenaliSecurityProvider.insertSecurityProvider();
} catch (Exception e) {
if (logger.isLoggable(Level.WARNING)) {
logger.log(Level.WARNING, "Could not insert security provider", e);
}
}
UserType userTypeNamed = UserType.getUserTypeNamed(userTypeName);
UserType.setCurrentUserType(userTypeNamed);
FlexoProperties.load();
initializeLoggingManager();
FlexoApplication.initialize();
if (ToolBox.getFrame(null) != null) {
ToolBox.getFrame(null).setIconImage(userTypeNamed.getIconImage().getImage());
}
SplashWindow splashWindow = null;
if (!noSplash) {
splashWindow = new SplashWindow(FlexoFrame.getActiveFrame(), userTypeNamed, 10000);
}
if (isDev) {
FlexoLoggingFormatter.logDate = false;
}
initProxyManagement();
initUILAF();
if (logger.isLoggable(Level.INFO)) {
logger.info("Starting on " + ToolBox.getPLATFORM() + "... JVM version is " + System.getProperty("java.version"));
}
if (logger.isLoggable(Level.INFO)) {
logger.info("Working directory is " + new File(".").getAbsolutePath());
}
if (logger.isLoggable(Level.INFO)) {
logger.info("Heap memory is about: " + ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getMax() / (1024 * 1024) + "Mb");
}
getModuleLoader().setAllowsDocSubmission(FlexoProperties.instance().getAllowsDocSubmission());
if (logger.isLoggable(Level.INFO)) {
logger.info("Launching FLEXO Application Suite version " + FlexoCst.BUSINESS_APPLICATION_VERSION_NAME + "...");
}
getFlexoResourceCenterService().getFlexoResourceCenter();
final SplashWindow splashWindow2 = splashWindow;
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
splashWindow2.setVisible(false);
splashWindow2.dispose();
if (getModuleLoader().fileNameToOpen == null) {
new WelcomeDialog();
} else {
try {
getProjectLoader().loadProject(new File(getModuleLoader().fileNameToOpen));
} catch (ProjectLoadingCancelledException e) {
new WelcomeDialog();
}
}
}
});
}
|
public void buildInnerTARDIS(String[][][] s, World world, Constants.COMPASS d, int dbID) {
int level, row, col, id, x, y, z, startx, starty = 15, startz, resetx, resetz, cx = 0, cy = 0, cz = 0, rid = 0, multiplier = 1, tx = 0, ty = 0, tz = 0;
byte data = 0;
short damage = 0;
String tmp, replacedBlocks = "";
HashMap<Block, Byte> postDoorBlocks = new HashMap<Block, Byte>();
HashMap<Block, Byte> postTorchBlocks = new HashMap<Block, Byte>();
TARDISUtils utils = new TARDISUtils(plugin);
int gsl[] = utils.getStartLocation(dbID, d);
startx = gsl[0];
resetx = gsl[1];
startz = gsl[2];
resetz = gsl[3];
x = gsl[4];
z = gsl[5];
StringBuilder sb = new StringBuilder();
for (level = 0; level < 8; level++) {
for (row = 0; row < 11; row++) {
for (col = 0; col < 11; col++) {
if (plugin.config.getBoolean("bonus_chest") == Boolean.valueOf("true")) {
Location replaceLoc = new Location(world, startx, starty, startz);
int replacedMaterialId = replaceLoc.getBlock().getTypeId();
if (replacedMaterialId != 8 && replacedMaterialId != 9 && replacedMaterialId != 10 && replacedMaterialId != 11) {
sb.append(replacedMaterialId).append(":");
}
}
utils.setBlock(world, startx, starty, startz, 0, (byte) 0);
switch (d) {
case NORTH:
case SOUTH:
startx += x;
break;
case EAST:
case WEST:
startz += z;
break;
}
}
switch (d) {
case NORTH:
case SOUTH:
startx = resetx;
startz += z;
break;
case EAST:
case WEST:
startz = resetz;
startx += x;
break;
}
}
switch (d) {
case NORTH:
case SOUTH:
startz = resetz;
break;
case EAST:
case WEST:
startx = resetx;
break;
}
starty += 1;
}
startx = resetx;
starty = 15;
startz = resetz;
try {
Connection connection = service.getConnection();
statement = connection.createStatement();
for (level = 0; level < 8; level++) {
for (row = 0; row < 11; row++) {
for (col = 0; col < 11; col++) {
tmp = s[level][row][col];
if (!tmp.equals("-")) {
if (tmp.contains(":")) {
String[] iddata = tmp.split(":");
id = Integer.parseInt(iddata[0]);
if (iddata[1].equals("~")) {
if (id == 76 && row == 1) {
switch (d) {
case NORTH:
data = 3;
break;
case EAST:
data = 2;
break;
case SOUTH:
data = 4;
break;
case WEST:
data = 1;
break;
}
}
if (id == 76 && row == 3) {
switch (d) {
case NORTH:
data = 2;
break;
case EAST:
data = 4;
break;
case SOUTH:
data = 1;
break;
case WEST:
data = 3;
break;
}
}
if (id == 93 && col == 2 && level == 1) {
switch (d) {
case NORTH:
data = 6;
break;
case EAST:
data = 7;
break;
case SOUTH:
data = 4;
break;
case WEST:
data = 5;
break;
}
}
if (id == 93 && col == 3 && level == 1) {
switch (d) {
case NORTH:
data = 4;
break;
case EAST:
data = 5;
break;
case SOUTH:
data = 6;
break;
case WEST:
data = 7;
break;
}
}
if (id == 54) {
switch (d) {
case NORTH:
case EAST:
data = 2;
break;
case SOUTH:
case WEST:
data = 3;
break;
}
String chest = world.getName() + ":" + startx + ":" + starty + ":" + startz;
String queryChest = "UPDATE tardis SET chest = '" + chest + "' WHERE tardis_id = " + dbID;
statement.executeUpdate(queryChest);
}
if (id == 61) {
switch (d) {
case NORTH:
case WEST:
data = 3;
break;
case SOUTH:
case EAST:
data = 2;
break;
}
}
if (id == 77) {
switch (d) {
case NORTH:
data = 4;
break;
case WEST:
data = 2;
break;
case SOUTH:
data = 3;
break;
case EAST:
data = 1;
break;
}
String button = world.getName() + ":" + startx + ":" + starty + ":" + startz;
String queryButton = "UPDATE tardis SET button = '" + button + "' WHERE tardis_id = " + dbID;
statement.executeUpdate(queryButton);
}
if (id == 93 && row == 3 && col == 5 && level == 5) {
switch (d) {
case NORTH:
data = 0;
break;
case EAST:
data = 1;
break;
case SOUTH:
data = 2;
break;
case WEST:
data = 3;
break;
}
String repeater0 = world.getName() + ":" + startx + ":" + starty + ":" + startz;
String queryRepeater0 = "UPDATE tardis SET repeater0 = '" + repeater0 + "' WHERE tardis_id = " + dbID;
statement.executeUpdate(queryRepeater0);
}
if (id == 93 && row == 5 && col == 3 && level == 5) {
switch (d) {
case NORTH:
data = 3;
break;
case EAST:
data = 0;
break;
case SOUTH:
data = 1;
break;
case WEST:
data = 2;
break;
}
String repeater1 = world.getName() + ":" + startx + ":" + starty + ":" + startz;
String queryRepeater1 = "UPDATE tardis SET repeater1 = '" + repeater1 + "' WHERE tardis_id = " + dbID;
statement.executeUpdate(queryRepeater1);
}
if (id == 93 && row == 5 && col == 7 && level == 5) {
switch (d) {
case NORTH:
data = 1;
break;
case EAST:
data = 2;
break;
case SOUTH:
data = 3;
break;
case WEST:
data = 0;
break;
}
String repeater2 = world.getName() + ":" + startx + ":" + starty + ":" + startz;
String queryRepeater2 = "UPDATE tardis SET repeater2 = '" + repeater2 + "' WHERE tardis_id = " + dbID;
statement.executeUpdate(queryRepeater2);
}
if (id == 93 && row == 7 && col == 5 && level == 5) {
switch (d) {
case NORTH:
data = 2;
break;
case EAST:
data = 3;
break;
case SOUTH:
data = 0;
break;
case WEST:
data = 1;
break;
}
String repeater3 = world.getName() + ":" + startx + ":" + starty + ":" + startz;
String queryRepeater3 = "UPDATE tardis SET repeater3 = '" + repeater3 + "' WHERE tardis_id = " + dbID;
statement.executeUpdate(queryRepeater3);
}
if (id == 71) {
switch (d) {
case NORTH:
data = 3;
break;
case EAST:
data = 0;
break;
case SOUTH:
data = 1;
break;
case WEST:
data = 2;
break;
}
String doorloc = world.getName() + ":" + startx + ":" + starty + ":" + startz;
String queryDoor = "INSERT INTO doors (tardis_id, door_type, door_location) VALUES (" + dbID + ", 1, '" + doorloc + "')";
statement.executeUpdate(queryDoor);
}
} else {
data = Byte.parseByte(iddata[1]);
}
} else {
id = Integer.parseInt(tmp);
data = 0;
}
if (id == 71) {
postDoorBlocks.put(world.getBlockAt(startx, starty, startz), data);
} else if (id == 76) {
postTorchBlocks.put(world.getBlockAt(startx, starty, startz), data);
} else {
utils.setBlock(world, startx, starty, startz, id, data);
}
}
switch (d) {
case NORTH:
case SOUTH:
startx += x;
break;
case EAST:
case WEST:
startz += z;
break;
}
}
switch (d) {
case NORTH:
case SOUTH:
startx = resetx;
startz += z;
break;
case EAST:
case WEST:
startz = resetz;
startx += x;
break;
}
}
switch (d) {
case NORTH:
case SOUTH:
startz = resetz;
break;
case EAST:
case WEST:
startx = resetx;
break;
}
starty += 1;
}
} catch (SQLException e) {
System.err.println(Constants.MY_PLUGIN_NAME + " Save Block Locations Error: " + e);
}
for (Map.Entry<Block, Byte> entry : postDoorBlocks.entrySet()) {
Block pdb = entry.getKey();
byte pddata = Byte.valueOf(entry.getValue());
pdb.setTypeIdAndData(71, pddata, true);
}
for (Map.Entry<Block, Byte> entry : postTorchBlocks.entrySet()) {
Block ptb = entry.getKey();
byte ptdata = Byte.valueOf(entry.getValue());
ptb.setTypeIdAndData(76, ptdata, true);
}
if (plugin.config.getBoolean("bonus_chest") == Boolean.valueOf("true")) {
String rb = sb.toString();
replacedBlocks = rb.substring(0, rb.length() - 1);
String[] replaceddata = replacedBlocks.split(":");
try {
String queryGetChest = "SELECT chest FROM tardis WHERE tardis_id = " + dbID;
ResultSet chestRS = statement.executeQuery(queryGetChest);
String saved_chestloc = chestRS.getString("chest");
String[] cdata = saved_chestloc.split(":");
World cw = plugin.getServer().getWorld(cdata[0]);
try {
cx = Integer.parseInt(cdata[1]);
cy = Integer.parseInt(cdata[2]);
cz = Integer.parseInt(cdata[3]);
} catch (NumberFormatException n) {
System.err.println("Could not convert to number");
}
Location chest_loc = new Location(cw, cx, cy, cz);
Block bonus_chest = chest_loc.getBlock();
Chest chest = (Chest) bonus_chest.getState();
Inventory chestInv = chest.getInventory();
for (String i : replaceddata) {
try {
rid = Integer.parseInt(i);
} catch (NumberFormatException n) {
System.err.println("Could not convert to number");
}
switch (rid) {
case 1:
rid = 4;
break;
case 16:
rid = 263;
break;
case 21:
rid = 351;
multiplier = 4;
damage = 4;
break;
case 56:
rid = 264;
break;
case 73:
rid = 331;
multiplier = 4;
break;
}
chestInv.addItem(new ItemStack(rid, multiplier, damage));
multiplier = 1;
damage = 0;
}
chestRS.close();
statement.close();
} catch (SQLException e) {
System.err.println(Constants.MY_PLUGIN_NAME + " Could not get chest location from DB!" + e);
}
}
}
| public void buildInnerTARDIS(String[][][] s, World world, Constants.COMPASS d, int dbID) {
int level, row, col, id, x, y, z, startx, starty = 15, startz, resetx, resetz, cx = 0, cy = 0, cz = 0, rid = 0, multiplier = 1, tx = 0, ty = 0, tz = 0;
byte data = 0;
short damage = 0;
String tmp, replacedBlocks = "";
HashMap<Block, Byte> postDoorBlocks = new HashMap<Block, Byte>();
HashMap<Block, Byte> postTorchBlocks = new HashMap<Block, Byte>();
TARDISUtils utils = new TARDISUtils(plugin);
int gsl[] = utils.getStartLocation(dbID, d);
startx = gsl[0];
resetx = gsl[1];
startz = gsl[2];
resetz = gsl[3];
x = gsl[4];
z = gsl[5];
StringBuilder sb = new StringBuilder();
for (level = 0; level < 8; level++) {
for (row = 0; row < 11; row++) {
for (col = 0; col < 11; col++) {
if (plugin.config.getBoolean("bonus_chest") == Boolean.valueOf("true")) {
Location replaceLoc = new Location(world, startx, starty, startz);
int replacedMaterialId = replaceLoc.getBlock().getTypeId();
if (replacedMaterialId != 8 && replacedMaterialId != 9 && replacedMaterialId != 10 && replacedMaterialId != 11) {
sb.append(replacedMaterialId).append(":");
}
}
utils.setBlock(world, startx, starty, startz, 0, (byte) 0);
switch (d) {
case NORTH:
case SOUTH:
startx += x;
break;
case EAST:
case WEST:
startz += z;
break;
}
}
switch (d) {
case NORTH:
case SOUTH:
startx = resetx;
startz += z;
break;
case EAST:
case WEST:
startz = resetz;
startx += x;
break;
}
}
switch (d) {
case NORTH:
case SOUTH:
startz = resetz;
break;
case EAST:
case WEST:
startx = resetx;
break;
}
starty += 1;
}
startx = resetx;
starty = 15;
startz = resetz;
try {
Connection connection = service.getConnection();
statement = connection.createStatement();
for (level = 0; level < 8; level++) {
for (row = 0; row < 11; row++) {
for (col = 0; col < 11; col++) {
tmp = s[level][row][col];
if (!tmp.equals("-")) {
if (tmp.contains(":")) {
String[] iddata = tmp.split(":");
id = Integer.parseInt(iddata[0]);
if (iddata[1].equals("~")) {
if (id == 76 && row == 1) {
switch (d) {
case NORTH:
data = 3;
break;
case EAST:
data = 2;
break;
case SOUTH:
data = 4;
break;
case WEST:
data = 1;
break;
}
}
if (id == 76 && row == 3) {
switch (d) {
case NORTH:
data = 2;
break;
case EAST:
data = 4;
break;
case SOUTH:
data = 1;
break;
case WEST:
data = 3;
break;
}
}
if (id == 93 && col == 2 && level == 1) {
switch (d) {
case NORTH:
data = 6;
break;
case EAST:
data = 7;
break;
case SOUTH:
data = 4;
break;
case WEST:
data = 5;
break;
}
}
if (id == 93 && col == 3 && level == 1) {
switch (d) {
case NORTH:
data = 4;
break;
case EAST:
data = 5;
break;
case SOUTH:
data = 6;
break;
case WEST:
data = 7;
break;
}
}
if (id == 54) {
switch (d) {
case NORTH:
case EAST:
data = 2;
break;
case SOUTH:
case WEST:
data = 3;
break;
}
String chest = world.getName() + ":" + startx + ":" + starty + ":" + startz;
String queryChest = "UPDATE tardis SET chest = '" + chest + "' WHERE tardis_id = " + dbID;
statement.executeUpdate(queryChest);
}
if (id == 61) {
switch (d) {
case NORTH:
case WEST:
data = 3;
break;
case SOUTH:
case EAST:
data = 2;
break;
}
}
if (id == 77) {
switch (d) {
case NORTH:
data = 4;
break;
case WEST:
data = 2;
break;
case SOUTH:
data = 3;
break;
case EAST:
data = 1;
break;
}
String button = world.getName() + ":" + startx + ":" + starty + ":" + startz;
String queryButton = "UPDATE tardis SET button = '" + button + "' WHERE tardis_id = " + dbID;
statement.executeUpdate(queryButton);
}
if (id == 93 && row == 3 && col == 5 && level == 5) {
switch (d) {
case NORTH:
data = 0;
break;
case EAST:
data = 1;
break;
case SOUTH:
data = 2;
break;
case WEST:
data = 3;
break;
}
String repeater0 = world.getName() + ":" + startx + ":" + starty + ":" + startz;
String queryRepeater0 = "UPDATE tardis SET repeater0 = '" + repeater0 + "' WHERE tardis_id = " + dbID;
statement.executeUpdate(queryRepeater0);
}
if (id == 93 && row == 5 && col == 3 && level == 5) {
switch (d) {
case NORTH:
data = 3;
break;
case EAST:
data = 0;
break;
case SOUTH:
data = 1;
break;
case WEST:
data = 2;
break;
}
String repeater1 = world.getName() + ":" + startx + ":" + starty + ":" + startz;
String queryRepeater1 = "UPDATE tardis SET repeater1 = '" + repeater1 + "' WHERE tardis_id = " + dbID;
statement.executeUpdate(queryRepeater1);
}
if (id == 93 && row == 5 && col == 7 && level == 5) {
switch (d) {
case NORTH:
data = 1;
break;
case EAST:
data = 2;
break;
case SOUTH:
data = 3;
break;
case WEST:
data = 0;
break;
}
String repeater2 = world.getName() + ":" + startx + ":" + starty + ":" + startz;
String queryRepeater2 = "UPDATE tardis SET repeater2 = '" + repeater2 + "' WHERE tardis_id = " + dbID;
statement.executeUpdate(queryRepeater2);
}
if (id == 93 && row == 7 && col == 5 && level == 5) {
switch (d) {
case NORTH:
data = 2;
break;
case EAST:
data = 3;
break;
case SOUTH:
data = 0;
break;
case WEST:
data = 1;
break;
}
String repeater3 = world.getName() + ":" + startx + ":" + starty + ":" + startz;
String queryRepeater3 = "UPDATE tardis SET repeater3 = '" + repeater3 + "' WHERE tardis_id = " + dbID;
statement.executeUpdate(queryRepeater3);
}
if (id == 71) {
switch (d) {
case NORTH:
data = 3;
break;
case EAST:
data = 0;
break;
case SOUTH:
data = 1;
break;
case WEST:
data = 2;
break;
}
String doorloc = world.getName() + ":" + startx + ":" + starty + ":" + startz;
String queryDoor = "INSERT INTO doors (tardis_id, door_type, door_location) VALUES (" + dbID + ", 1, '" + doorloc + "')";
statement.executeUpdate(queryDoor);
}
} else {
data = Byte.parseByte(iddata[1]);
}
} else {
id = Integer.parseInt(tmp);
data = 0;
}
if (id == 71) {
postDoorBlocks.put(world.getBlockAt(startx, starty, startz), data);
} else if (id == 76) {
postTorchBlocks.put(world.getBlockAt(startx, starty, startz), data);
} else {
utils.setBlock(world, startx, starty, startz, id, data);
}
}
switch (d) {
case NORTH:
case SOUTH:
startx += x;
break;
case EAST:
case WEST:
startz += z;
break;
}
}
switch (d) {
case NORTH:
case SOUTH:
startx = resetx;
startz += z;
break;
case EAST:
case WEST:
startz = resetz;
startx += x;
break;
}
}
switch (d) {
case NORTH:
case SOUTH:
startz = resetz;
break;
case EAST:
case WEST:
startx = resetx;
break;
}
starty += 1;
}
} catch (SQLException e) {
System.err.println(Constants.MY_PLUGIN_NAME + " Save Block Locations Error: " + e);
}
for (Map.Entry<Block, Byte> entry : postDoorBlocks.entrySet()) {
Block pdb = entry.getKey();
byte pddata = Byte.valueOf(entry.getValue());
pdb.setTypeIdAndData(71, pddata, true);
}
for (Map.Entry<Block, Byte> entry : postTorchBlocks.entrySet()) {
Block ptb = entry.getKey();
byte ptdata = Byte.valueOf(entry.getValue());
ptb.setTypeIdAndData(76, ptdata, true);
}
if (plugin.config.getBoolean("bonus_chest") == Boolean.valueOf("true")) {
String rb = sb.toString();
replacedBlocks = rb.substring(0, rb.length() - 1);
String[] replaceddata = replacedBlocks.split(":");
try {
String queryGetChest = "SELECT chest FROM tardis WHERE tardis_id = " + dbID;
ResultSet chestRS = statement.executeQuery(queryGetChest);
String saved_chestloc = chestRS.getString("chest");
String[] cdata = saved_chestloc.split(":");
World cw = plugin.getServer().getWorld(cdata[0]);
try {
cx = Integer.parseInt(cdata[1]);
cy = Integer.parseInt(cdata[2]);
cz = Integer.parseInt(cdata[3]);
} catch (NumberFormatException n) {
System.err.println("Could not convert to number");
}
Location chest_loc = new Location(cw, cx, cy, cz);
Block bonus_chest = chest_loc.getBlock();
Chest chest = (Chest) bonus_chest.getState();
Inventory chestInv = chest.getInventory();
for (String i : replaceddata) {
try {
rid = Integer.parseInt(i);
} catch (NumberFormatException n) {
System.err.println("Could not convert to number");
}
switch (rid) {
case 1:
rid = 4;
break;
case 16:
rid = 263;
break;
case 21:
rid = 351;
multiplier = 4;
damage = 4;
break;
case 56:
rid = 264;
break;
case 73:
rid = 331;
multiplier = 4;
break;
case 129:
rid = 388;
break;
}
chestInv.addItem(new ItemStack(rid, multiplier, damage));
multiplier = 1;
damage = 0;
}
chestRS.close();
statement.close();
} catch (SQLException e) {
System.err.println(Constants.MY_PLUGIN_NAME + " Could not get chest location from DB!" + e);
}
}
}
|
public Map<String,Object> toMarkerAttributes(Map<String,Object> p) {
assert !disposed;
assert Protocol.isDispatchThread();
Map<String,Object> client_data = (Map<String,Object>)p.get(IBreakpoints.PROP_CLIENT_DATA);
if (client_data != null) {
Map<String,Object> m = (Map<String,Object>)client_data.get(CDATA_MARKER);
if (m != null) {
m = new HashMap<String,Object>(m);
m.put(ATTR_ID, p.get(IBreakpoints.PROP_ID));
Boolean enabled = (Boolean)p.get(IBreakpoints.PROP_ENABLED);
m.put(ATTR_ENABLED, enabled == null ? Boolean.FALSE : enabled);
return m;
}
}
Map<String,Object> m = new HashMap<String,Object>();
for (Map.Entry<String,Object> e : p.entrySet()) {
String key = e.getKey();
Object val = e.getValue();
if (key.equals(IBreakpoints.PROP_ENABLED)) continue;
if (key.equals(IBreakpoints.PROP_FILE)) continue;
if (key.equals(IBreakpoints.PROP_LINE)) continue;
if (key.equals(IBreakpoints.PROP_COLUMN)) continue;
if (key.equals(IBreakpoints.PROP_LOCATION)) continue;
if (key.equals(IBreakpoints.PROP_ACCESS_MODE)) continue;
if (key.equals(IBreakpoints.PROP_SIZE)) continue;
if (key.equals(IBreakpoints.PROP_CONDITION)) continue;
if (key.equals(IBreakpoints.PROP_EVENT_TYPE)) continue;
if (key.equals(IBreakpoints.PROP_EVENT_ARGS)) continue;
if (val instanceof String[]) {
StringBuffer bf = new StringBuffer();
for (String s : (String[])val) {
if (bf.length() > 0) bf.append(',');
bf.append(s);
}
if (bf.length() == 0) continue;
val = bf.toString();
}
else if (val instanceof Collection) {
StringBuffer bf = new StringBuffer();
for (String s : (Collection<String>)val) {
if (bf.length() > 0) bf.append(',');
bf.append(s);
}
if (bf.length() == 0) continue;
val = bf.toString();
}
m.put(ITCFConstants.ID_TCF_DEBUG_MODEL + '.' + key, val);
}
Boolean enabled = (Boolean)p.get(IBreakpoints.PROP_ENABLED);
m.put(ATTR_ENABLED, enabled == null ? Boolean.FALSE : enabled);
String location = (String)p.get(IBreakpoints.PROP_LOCATION);
if (location != null && location.length() > 0) {
int access_mode = IBreakpoints.ACCESSMODE_EXECUTE;
Number access_mode_num = (Number)p.get(IBreakpoints.PROP_ACCESS_MODE);
if (access_mode_num != null) access_mode = access_mode_num.intValue();
if ((access_mode & IBreakpoints.ACCESSMODE_EXECUTE) != 0) {
if (Character.isDigit(location.charAt(0))) {
m.put(ATTR_ADDRESS, location);
}
else {
m.put(ATTR_FUNCTION, location);
}
}
else {
m.put(ATTR_EXPRESSION, location.replaceFirst("^&\\((.+)\\)$", "$1"));
m.put(ATTR_READ, (access_mode & IBreakpoints.ACCESSMODE_READ) != 0);
m.put(ATTR_WRITE, (access_mode & IBreakpoints.ACCESSMODE_WRITE) != 0);
}
Number size_num = (Number)p.get(IBreakpoints.PROP_SIZE);
if (size_num != null) m.put(ATTR_SIZE, size_num.toString());
}
m.put(IBreakpoint.REGISTERED, Boolean.TRUE);
m.put(IBreakpoint.PERSISTED, Boolean.TRUE);
m.put(IBreakpoint.ID, ITCFConstants.ID_TCF_DEBUG_MODEL);
String msg = "";
if (location != null) msg += location;
m.put(ATTR_MESSAGE, "Breakpoint: " + msg);
String file = (String)p.get(IBreakpoints.PROP_FILE);
if (file != null && file.length() > 0) {
m.put(ATTR_FILE, file);
}
Number line = (Number)p.get(IBreakpoints.PROP_LINE);
if (line != null) {
m.put(ATTR_LINE, Integer.valueOf(line.intValue()));
Number column = (Number)p.get(IBreakpoints.PROP_COLUMN);
if (column != null) {
m.put(IMarker.CHAR_START, new Integer(column.intValue()));
m.put(IMarker.CHAR_END, new Integer(column.intValue() + 1));
}
}
String condition = (String)p.get(IBreakpoints.PROP_CONDITION);
if (condition != null && condition.length() > 0) m.put(ATTR_CONDITION, condition);
String event_type = (String)p.get(IBreakpoints.PROP_EVENT_TYPE);
if (event_type != null && event_type.length() > 0) m.put(ATTR_EVENT_TYPE, event_type);
String event_args = (String)p.get(IBreakpoints.PROP_EVENT_ARGS);
if (event_args != null && event_args.length() > 0) m.put(ATTR_EVENT_ARGS, event_args);
Number ignore_count = (Number)p.get(IBreakpoints.PROP_IGNORE_COUNT);
if (ignore_count != null) m.put(ATTR_IGNORE_COUNT, ignore_count);
Boolean temporary = (Boolean)p.get(IBreakpoints.PROP_TEMPORARY);
if (temporary != null && temporary.booleanValue()) {
Integer cdt_type = (Integer)m.get(ATTR_TYPE);
cdt_type = cdt_type != null ? cdt_type : 0;
cdt_type = cdt_type | ATTR_TYPE_TEMPORARY;
m.put(ATTR_TYPE, cdt_type);
}
Integer type = (Integer)p.get(IBreakpoints.PROP_TYPE);
if (type != null) {
Integer cdt_type = (Integer)m.get(ATTR_TYPE);
cdt_type = cdt_type != null ? cdt_type : 0;
if (IBreakpoints.TYPE_HARDWARE.equals(type)) {
cdt_type = cdt_type | ATTR_TYPE_HARDWARE;
}
else if (IBreakpoints.TYPE_SOFTWARE.equals(type)) {
cdt_type = cdt_type | ATTR_TYPE_SOFTWARE;
}
m.put(ATTR_TYPE, cdt_type);
}
return m;
}
| public Map<String,Object> toMarkerAttributes(Map<String,Object> p) {
assert !disposed;
assert Protocol.isDispatchThread();
Map<String,Object> client_data = (Map<String,Object>)p.get(IBreakpoints.PROP_CLIENT_DATA);
if (client_data != null) {
Map<String,Object> m = (Map<String,Object>)client_data.get(CDATA_MARKER);
if (m != null) {
m = new HashMap<String,Object>(m);
m.put(ATTR_ID, p.get(IBreakpoints.PROP_ID));
Boolean enabled = (Boolean)p.get(IBreakpoints.PROP_ENABLED);
m.put(ATTR_ENABLED, enabled == null ? Boolean.FALSE : enabled);
return m;
}
}
Map<String,Object> m = new HashMap<String,Object>();
for (Map.Entry<String,Object> e : p.entrySet()) {
String key = e.getKey();
Object val = e.getValue();
if (key.equals(IBreakpoints.PROP_ENABLED)) continue;
if (key.equals(IBreakpoints.PROP_FILE)) continue;
if (key.equals(IBreakpoints.PROP_LINE)) continue;
if (key.equals(IBreakpoints.PROP_COLUMN)) continue;
if (key.equals(IBreakpoints.PROP_LOCATION)) continue;
if (key.equals(IBreakpoints.PROP_ACCESS_MODE)) continue;
if (key.equals(IBreakpoints.PROP_SIZE)) continue;
if (key.equals(IBreakpoints.PROP_CONDITION)) continue;
if (key.equals(IBreakpoints.PROP_EVENT_TYPE)) continue;
if (key.equals(IBreakpoints.PROP_EVENT_ARGS)) continue;
if (val instanceof String[]) {
StringBuffer bf = new StringBuffer();
for (String s : (String[])val) {
if (bf.length() > 0) bf.append(',');
bf.append(s);
}
if (bf.length() == 0) continue;
val = bf.toString();
}
else if (val instanceof Collection) {
StringBuffer bf = new StringBuffer();
for (String s : (Collection<String>)val) {
if (bf.length() > 0) bf.append(',');
bf.append(s);
}
if (bf.length() == 0) continue;
val = bf.toString();
}
m.put(ITCFConstants.ID_TCF_DEBUG_MODEL + '.' + key, val);
}
Boolean enabled = (Boolean)p.get(IBreakpoints.PROP_ENABLED);
m.put(ATTR_ENABLED, enabled == null ? Boolean.FALSE : enabled);
String location = (String)p.get(IBreakpoints.PROP_LOCATION);
if (location != null && location.length() > 0) {
int access_mode = IBreakpoints.ACCESSMODE_EXECUTE;
Number access_mode_num = (Number)p.get(IBreakpoints.PROP_ACCESS_MODE);
if (access_mode_num != null) access_mode = access_mode_num.intValue();
if ((access_mode & IBreakpoints.ACCESSMODE_EXECUTE) != 0) {
if (Character.isDigit(location.charAt(0))) {
m.put(ATTR_ADDRESS, location);
}
else {
m.put(ATTR_FUNCTION, location);
}
}
else {
m.put(ATTR_EXPRESSION, location.replaceFirst("^&\\((.+)\\)$", "$1"));
m.put(ATTR_READ, (access_mode & IBreakpoints.ACCESSMODE_READ) != 0);
m.put(ATTR_WRITE, (access_mode & IBreakpoints.ACCESSMODE_WRITE) != 0);
}
Number size_num = (Number)p.get(IBreakpoints.PROP_SIZE);
if (size_num != null) m.put(ATTR_SIZE, size_num.toString());
}
m.put(IBreakpoint.REGISTERED, Boolean.TRUE);
m.put(IBreakpoint.PERSISTED, Boolean.TRUE);
m.put(IBreakpoint.ID, ITCFConstants.ID_TCF_DEBUG_MODEL);
String msg = "";
if (location != null) msg += location;
m.put(ATTR_MESSAGE, "Breakpoint: " + msg);
String file = (String)p.get(IBreakpoints.PROP_FILE);
if (file != null && file.length() > 0) {
m.put(ATTR_FILE, file);
}
Number line = (Number)p.get(IBreakpoints.PROP_LINE);
if (line != null) {
m.put(ATTR_LINE, Integer.valueOf(line.intValue()));
Number column = (Number)p.get(IBreakpoints.PROP_COLUMN);
if (column != null) {
m.put(IMarker.CHAR_START, new Integer(column.intValue()));
m.put(IMarker.CHAR_END, new Integer(column.intValue() + 1));
}
}
String condition = (String)p.get(IBreakpoints.PROP_CONDITION);
if (condition != null && condition.length() > 0) m.put(ATTR_CONDITION, condition);
String event_type = (String)p.get(IBreakpoints.PROP_EVENT_TYPE);
if (event_type != null && event_type.length() > 0) m.put(ATTR_EVENT_TYPE, event_type);
String event_args = (String)p.get(IBreakpoints.PROP_EVENT_ARGS);
if (event_args != null && event_args.length() > 0) m.put(ATTR_EVENT_ARGS, event_args);
Number ignore_count = (Number)p.get(IBreakpoints.PROP_IGNORE_COUNT);
if (ignore_count != null) m.put(ATTR_IGNORE_COUNT, ignore_count);
Boolean temporary = (Boolean)p.get(IBreakpoints.PROP_TEMPORARY);
if (temporary != null && temporary.booleanValue()) {
Integer cdt_type = (Integer)m.get(ATTR_TYPE);
cdt_type = cdt_type != null ? cdt_type : 0;
cdt_type = cdt_type | ATTR_TYPE_TEMPORARY;
m.put(ATTR_TYPE, cdt_type);
}
String type = (String)p.get(IBreakpoints.PROP_TYPE);
if (type != null) {
Integer cdt_type = (Integer)m.get(ATTR_TYPE);
cdt_type = cdt_type != null ? cdt_type : 0;
if (IBreakpoints.TYPE_HARDWARE.equals(type)) {
cdt_type = cdt_type | ATTR_TYPE_HARDWARE;
}
else if (IBreakpoints.TYPE_SOFTWARE.equals(type)) {
cdt_type = cdt_type | ATTR_TYPE_SOFTWARE;
}
m.put(ATTR_TYPE, cdt_type);
}
return m;
}
|
public void doPostCredential(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
if(!Hudson.adminCheck(req,rsp)) return;
MultipartFormDataParser parser = new MultipartFormDataParser(req);
String url = parser.get("url");
String kind = parser.get("kind");
int idx = Arrays.asList("","password","publickey","certificate").indexOf(kind);
final String username = parser.get("username"+idx);
final String password = parser.get("password"+idx);
final File keyFile;
FileItem item=null;
if(kind.equals("password")) {
keyFile = null;
} else {
item = parser.getFileItem(kind.equals("publickey")?"privateKey":"certificate");
keyFile = File.createTempFile("hudson","key");
if(item!=null)
try {
item.write(keyFile);
} catch (Exception e) {
throw new IOException2(e);
}
}
try {
SVNRepository repository = SVNRepositoryFactory.create(SVNURL.parseURIDecoded(url));
repository.setAuthenticationManager(new DefaultSVNAuthenticationManager(SVNWCUtil.getDefaultConfigurationDirectory(),true,username,password,keyFile,password) {
Credential cred = null;
@Override
public SVNAuthentication getFirstAuthentication(String kind, String realm, SVNURL url) throws SVNException {
if(kind.equals(ISVNAuthenticationManager.PASSWORD))
cred = new PasswordCredential(username,password);
if(kind.equals(ISVNAuthenticationManager.SSH)) {
if(keyFile==null)
cred = new PasswordCredential(username,password);
else
cred = new SshPublicKeyCredential(username,password,keyFile);
}
if(kind.equals(ISVNAuthenticationManager.SSL))
cred = new SslClientCertificateCredential(keyFile,password);
if(cred==null) return null;
return cred.createSVNAuthentication(kind);
}
@Override
public void acknowledgeAuthentication(boolean accepted, String kind, String realm, SVNErrorMessage errorMessage, SVNAuthentication authentication) throws SVNException {
if(accepted) {
assert cred!=null;
credentials.put(realm,cred);
save();
}
super.acknowledgeAuthentication(accepted, kind, realm, errorMessage, authentication);
}
});
repository.testConnection();
rsp.sendRedirect("credentialOK");
} catch (SVNException e) {
req.setAttribute("message",e.getErrorMessage());
rsp.forward(Hudson.getInstance(),"error",req);
} finally {
keyFile.delete();
if(item!=null)
item.delete();
}
}
| public void doPostCredential(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
if(!Hudson.adminCheck(req,rsp)) return;
MultipartFormDataParser parser = new MultipartFormDataParser(req);
String url = parser.get("url");
String kind = parser.get("kind");
int idx = Arrays.asList("","password","publickey","certificate").indexOf(kind);
final String username = parser.get("username"+idx);
final String password = parser.get("password"+idx);
final File keyFile;
FileItem item=null;
if(kind.equals("password")) {
keyFile = null;
} else {
item = parser.getFileItem(kind.equals("publickey")?"privateKey":"certificate");
keyFile = File.createTempFile("hudson","key");
if(item!=null)
try {
item.write(keyFile);
} catch (Exception e) {
throw new IOException2(e);
}
}
try {
SVNRepository repository = SVNRepositoryFactory.create(SVNURL.parseURIDecoded(url));
repository.setAuthenticationManager(new DefaultSVNAuthenticationManager(SVNWCUtil.getDefaultConfigurationDirectory(),true,username,password,keyFile,password) {
Credential cred = null;
@Override
public SVNAuthentication getFirstAuthentication(String kind, String realm, SVNURL url) throws SVNException {
if(kind.equals(ISVNAuthenticationManager.PASSWORD))
cred = new PasswordCredential(username,password);
if(kind.equals(ISVNAuthenticationManager.SSH)) {
if(keyFile==null)
cred = new PasswordCredential(username,password);
else
cred = new SshPublicKeyCredential(username,password,keyFile);
}
if(kind.equals(ISVNAuthenticationManager.SSL))
cred = new SslClientCertificateCredential(keyFile,password);
if(cred==null) return null;
return cred.createSVNAuthentication(kind);
}
@Override
public void acknowledgeAuthentication(boolean accepted, String kind, String realm, SVNErrorMessage errorMessage, SVNAuthentication authentication) throws SVNException {
if(accepted) {
assert cred!=null;
credentials.put(realm,cred);
save();
}
super.acknowledgeAuthentication(accepted, kind, realm, errorMessage, authentication);
}
});
repository.testConnection();
rsp.sendRedirect("credentialOK");
} catch (SVNException e) {
req.setAttribute("message",e.getErrorMessage());
rsp.forward(Hudson.getInstance(),"error",req);
} finally {
if(keyFile!=null)
keyFile.delete();
if(item!=null)
item.delete();
}
}
|
public static void main(String[] args) throws IOException {
Adafruit8x8LEDMatrix leds = new Adafruit8x8LEDMatrix(I2C_BUS_NR, LED_PACK_ADDRESS);
Ampel ampel = new Ampel(GPIO_PIN_RED, GPIO_PIN_YELLOW, GPIO_PIN_GREEN);
while(true){
for (int row = 0; row < 8; row++) {
for (int col = 0; col < 8; col++) {
int color = row % 3;
Adafruit8x8LEDMatrix.LedColor ledColor;
Ampel.State ampelState;
switch (color){
case 0: ledColor= Adafruit8x8LEDMatrix.LedColor.RED; ampelState = Ampel.State.RED; break;
case 1: ledColor= Adafruit8x8LEDMatrix.LedColor.YELLOW; ampelState = Ampel.State.RED_YELLOW; break;
case 2: ledColor= Adafruit8x8LEDMatrix.LedColor.GREEN; ampelState = Ampel.State.GREEN; break;
default: ledColor= Adafruit8x8LEDMatrix.LedColor.OFF; ampelState = Ampel.State.OFF;
}
ampel.setState(ampelState);
leds.clear(false);
leds.setPixel(row, row % 2 == 0 ? col : 7-col, ledColor);
leds.writeDisplay();
try {
Thread.sleep(80);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
}
| public static void main(String[] args) throws IOException {
Adafruit8x8LEDMatrix leds = new Adafruit8x8LEDMatrix(I2C_BUS_NR, LED_PACK_ADDRESS);
Ampel ampel = new Ampel(GPIO_PIN_RED, GPIO_PIN_YELLOW, GPIO_PIN_GREEN);
while(true){
for (int row = 0; row < 8; row++) {
for (int col = 0; col < 8; col++) {
int color = row % 3;
Adafruit8x8LEDMatrix.LedColor ledColor;
Ampel.State ampelState;
switch (color){
case 0: ledColor= Adafruit8x8LEDMatrix.LedColor.RED; ampelState = Ampel.State.RED; break;
case 1: ledColor= Adafruit8x8LEDMatrix.LedColor.YELLOW; ampelState = Ampel.State.YELLOW; break;
case 2: ledColor= Adafruit8x8LEDMatrix.LedColor.GREEN; ampelState = Ampel.State.GREEN; break;
default: ledColor= Adafruit8x8LEDMatrix.LedColor.OFF; ampelState = Ampel.State.OFF;
}
ampel.setState(ampelState);
leds.clear(false);
leds.setPixel(row, row % 2 == 0 ? col : 7-col, ledColor);
leds.writeDisplay();
try {
Thread.sleep(80);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
}
|
public void run(final boolean fork, boolean cancelable, final IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException {
try {
operationInProgress = true;
final StatusLineManager mgr = getStatusLineManager();
if (mgr == null) {
runnable.run(new NullProgressMonitor());
return;
}
boolean cancelWasEnabled = mgr.isCancelEnabled();
final Control contents = getContents();
final Display display = contents.getDisplay();
Shell shell = getShell();
boolean contentsWasEnabled = contents.getEnabled();
MenuManager manager = getMenuBarManager();
Menu menuBar = null;
if (manager != null) {
menuBar = manager.getMenu();
manager = null;
}
boolean menuBarWasEnabled = false;
if (menuBar != null)
menuBarWasEnabled = menuBar.isEnabled();
Control toolbarControl = getToolBarControl();
boolean toolbarWasEnabled = false;
if (toolbarControl != null)
toolbarWasEnabled = toolbarControl.getEnabled();
Control coolbarControl = getCoolBarControl();
boolean coolbarWasEnabled = false;
if (coolbarControl != null)
coolbarWasEnabled = coolbarControl.getEnabled();
Shell[] shells = display.getShells();
boolean[] enabled = new boolean[shells.length];
for (int i = 0; i < shells.length; i++) {
Shell current = shells[i];
if (current == shell) continue;
if (current != null && !current.isDisposed()) {
enabled[i] = current.getEnabled();
current.setEnabled(false);
}
}
Control currentFocus = display.getFocusControl();
try {
contents.setEnabled(false);
if (menuBar != null) menuBar.setEnabled(false);
if (toolbarControl != null) toolbarControl.setEnabled(false);
if (coolbarControl != null) coolbarControl.setEnabled(false);
mgr.setCancelEnabled(cancelable);
final Exception[] holder = new Exception[1];
BusyIndicator.showWhile(display, new Runnable() {
public void run() {
try {
ModalContext.run(runnable, fork, mgr.getProgressMonitor(), display);
} catch (InvocationTargetException ite) {
holder[0] = ite;
} catch (InterruptedException ie) {
holder[0] = ie;
}
}});
if (holder[0] != null) {
if (holder[0] instanceof InvocationTargetException) {
throw (InvocationTargetException) holder[0];
} else if (holder[0] instanceof InterruptedException) {
throw (InterruptedException) holder[0];
}
}
} finally {
operationInProgress = false;
for (int i = 0; i < shells.length; i++) {
Shell current = shells[i];
if (current == shell) continue;
if (current != null && !current.isDisposed()) {
current.setEnabled(enabled[i]);
}
}
if (!contents.isDisposed())
contents.setEnabled(contentsWasEnabled);
if (menuBar != null && !menuBar.isDisposed())
menuBar.setEnabled(menuBarWasEnabled);
if (toolbarControl != null && !toolbarControl.isDisposed())
toolbarControl.setEnabled(toolbarWasEnabled);
if (coolbarControl != null && !coolbarControl.isDisposed())
coolbarControl.setEnabled(coolbarWasEnabled);
mgr.setCancelEnabled(cancelWasEnabled);
if (currentFocus != null && !currentFocus.isDisposed()) currentFocus.setFocus();
}
} finally {
operationInProgress = false;
}
}
| public void run(final boolean fork, boolean cancelable, final IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException {
try {
operationInProgress = true;
final StatusLineManager mgr = getStatusLineManager();
if (mgr == null) {
runnable.run(new NullProgressMonitor());
return;
}
boolean cancelWasEnabled = mgr.isCancelEnabled();
final Control contents = getContents();
final Display display = contents.getDisplay();
Shell shell = getShell();
boolean contentsWasEnabled = contents.getEnabled();
MenuManager manager = getMenuBarManager();
Menu menuBar = null;
if (manager != null) {
menuBar = manager.getMenu();
manager = null;
}
boolean menuBarWasEnabled = false;
if (menuBar != null)
menuBarWasEnabled = menuBar.isEnabled();
Control toolbarControl = getToolBarControl();
boolean toolbarWasEnabled = false;
if (toolbarControl != null)
toolbarWasEnabled = toolbarControl.getEnabled();
Control coolbarControl = getCoolBarControl();
boolean coolbarWasEnabled = false;
if (coolbarControl != null)
coolbarWasEnabled = coolbarControl.getEnabled();
Shell[] shells = display.getShells();
boolean[] enabled = new boolean[shells.length];
for (int i = 0; i < shells.length; i++) {
Shell current = shells[i];
if (current == shell) continue;
if (current != null && !current.isDisposed()) {
enabled[i] = current.getEnabled();
current.setEnabled(false);
}
}
Control currentFocus = display.getFocusControl();
try {
contents.setEnabled(false);
if (menuBar != null) menuBar.setEnabled(false);
if (toolbarControl != null) toolbarControl.setEnabled(false);
if (coolbarControl != null) coolbarControl.setEnabled(false);
mgr.setCancelEnabled(cancelable);
final Exception[] holder = new Exception[1];
BusyIndicator.showWhile(display, new Runnable() {
public void run() {
try {
ModalContext.run(runnable, fork, mgr.getProgressMonitor(), display);
} catch (InvocationTargetException ite) {
holder[0] = ite;
} catch (InterruptedException ie) {
holder[0] = ie;
}
}});
if (holder[0] != null) {
if (holder[0] instanceof InvocationTargetException) {
throw (InvocationTargetException) holder[0];
} else if (holder[0] instanceof InterruptedException) {
throw (InterruptedException) holder[0];
}
}
} finally {
operationInProgress = false;
for (int i = 0; i < shells.length; i++) {
Shell current = shells[i];
if (current == shell) continue;
if (current != null && !current.isDisposed()) {
current.setEnabled(enabled[i]);
}
}
if (!contents.isDisposed())
contents.setEnabled(contentsWasEnabled);
if (menuBar != null && !menuBar.isDisposed())
menuBar.setEnabled(menuBarWasEnabled);
if (toolbarControl != null && !toolbarControl.isDisposed())
toolbarControl.setEnabled(toolbarWasEnabled);
if (coolbarControl != null && !coolbarControl.isDisposed())
coolbarControl.setEnabled(coolbarWasEnabled);
mgr.setCancelEnabled(cancelWasEnabled);
if (currentFocus != null && !currentFocus.isDisposed()) {
currentFocus.forceFocus();
}
}
} finally {
operationInProgress = false;
}
}
|
public void getSamplesByHostIdsAndSampleKindIds(final List<Integer> hostIdList,
@Nullable final List<Integer> sampleKindIdList,
final DateTime startTime,
final DateTime endTime,
final TimelineChunkAndTimesConsumer chunkConsumer)
{
dbi.withHandle(new HandleCallback<Void>()
{
@Override
public Void withHandle(final Handle handle) throws Exception
{
handle.setStatementLocator(new StringTemplate3StatementLocator(TimelineDAOQueries.class));
ResultIterator<TimelineChunkAndTimes> iterator = null;
try {
final Query<Map<String, Object>> query = handle
.createQuery("getSamplesByHostIdsAndSampleKindIds")
.bind("startTime", TimelineTimes.unixSeconds(startTime))
.bind("endTime", TimelineTimes.unixSeconds(endTime))
.define("hostIds", JOINER.join(hostIdList));
if (sampleKindIdList != null) {
query.define("sampleKindIds", JOINER.join(sampleKindIdList));
}
iterator = query
.map(TimelineChunkAndTimes.mapper)
.iterator();
while (iterator.hasNext()) {
chunkConsumer.processTimelineChunkAndTimes(iterator.next());
}
return null;
}
finally {
if (iterator != null) {
try {
iterator.close();
}
catch (Exception e) {
log.error("Exception closing TimelineChunkAndTimes iterator for hostIds %s and sampleKindIds %s", hostIdList, sampleKindIdList);
}
}
}
}
});
}
| public void getSamplesByHostIdsAndSampleKindIds(final List<Integer> hostIdList,
@Nullable final List<Integer> sampleKindIdList,
final DateTime startTime,
final DateTime endTime,
final TimelineChunkAndTimesConsumer chunkConsumer)
{
dbi.withHandle(new HandleCallback<Void>()
{
@Override
public Void withHandle(final Handle handle) throws Exception
{
handle.setStatementLocator(new StringTemplate3StatementLocator(TimelineDAOQueries.class));
ResultIterator<TimelineChunkAndTimes> iterator = null;
try {
final Query<Map<String, Object>> query = handle
.createQuery("getSamplesByHostIdsAndSampleKindIds")
.bind("startTime", TimelineTimes.unixSeconds(startTime))
.bind("endTime", TimelineTimes.unixSeconds(endTime))
.define("hostIds", JOINER.join(hostIdList));
if (sampleKindIdList != null && !sampleKindIdList.isEmpty()) {
query.define("sampleKindIds", JOINER.join(sampleKindIdList));
}
iterator = query
.map(TimelineChunkAndTimes.mapper)
.iterator();
while (iterator.hasNext()) {
chunkConsumer.processTimelineChunkAndTimes(iterator.next());
}
return null;
}
finally {
if (iterator != null) {
try {
iterator.close();
}
catch (Exception e) {
log.error("Exception closing TimelineChunkAndTimes iterator for hostIds %s and sampleKindIds %s", hostIdList, sampleKindIdList);
}
}
}
}
});
}
|
public JSONObject getRDF(String uri, String output, String containerSessionId, SecurityToken token) throws Exception {
String url = uri;
boolean local = false;
if (systemDomain != null && url.toLowerCase().startsWith(systemDomain.toLowerCase())) {
local = true;
if (VIVO.equalsIgnoreCase(system)) {
url += (url.indexOf('?') == -1 ? "?" : "&") + "format=rdfxml";
}
else if (PROFILES.equalsIgnoreCase(system)) {
int ndx = -1;
String nodeId = null;
if ((ndx = uri.indexOf("Subject=")) != -1) {
nodeId = uri.indexOf('&', ndx) != -1 ? uri.substring(ndx + "Subject=".length(), uri.indexOf('&', ndx)) : uri.substring(ndx + "Subject=".length());
}
else {
String[] items = uri.substring(systemDomain.length() + 1, uri.indexOf('?') == -1 ? uri.length() : uri.indexOf('?')).split("/");
for (String item : items) {
if (StringUtils.isNumeric(item)) {
nodeId = item;
break;
}
}
}
if (nodeId != null) {
uri = systemBase + nodeId;
}
if (!url.toLowerCase().endsWith(".rdf") && url.indexOf('?') == -1) {
url = systemDomain + "/Profile/Profile.aspx?Subject=" + nodeId;
if ("full".equalsIgnoreCase(output)) {
url += "&Expand=true&ShowDetails=true";
}
if (containerSessionId != null)
{
url += "&ContainerSessionID=" + containerSessionId + "&Viewer=" + URLEncoder.encode(token.getViewerId(), "UTF-8");
}
}
}
}
LOG.log(Level.INFO, "getRDF :" + url );
final Options opts = new Options(local ? systemBase : "");
opts.format = RDFXML;
opts.outputForm = "compacted";
Model model = FileManager.get().loadModel(url);
Object obj = JSONLD.fromRDF(model, opts);
obj = JSONLD.simplify(obj, opts);
String str = JSONUtils.toString(obj);
JSONObject jsonld = new JSONObject(str);
return new JSONObject().put("uri", uri).put("jsonld", jsonld).put("base", opts.base);
}
| public JSONObject getRDF(String uri, String output, String containerSessionId, SecurityToken token) throws Exception {
String url = uri;
boolean local = false;
if (systemDomain != null && url.toLowerCase().startsWith(systemDomain.toLowerCase())) {
local = true;
if (VIVO.equalsIgnoreCase(system)) {
url += (url.indexOf('?') == -1 ? "?" : "&") + "format=rdfxml";
}
else if (PROFILES.equalsIgnoreCase(system)) {
int ndx = -1;
String nodeId = null;
if ((ndx = uri.indexOf("Subject=")) != -1) {
nodeId = uri.indexOf('&', ndx) != -1 ? uri.substring(ndx + "Subject=".length(), uri.indexOf('&', ndx)) : uri.substring(ndx + "Subject=".length());
}
else {
String[] items = uri.substring(systemDomain.length() + 1, uri.indexOf('?') == -1 ? uri.length() : uri.indexOf('?')).split("/");
for (String item : items) {
if (StringUtils.isNumeric(item)) {
nodeId = item;
break;
}
}
}
if (nodeId != null) {
uri = systemBase + nodeId;
}
if (!url.toLowerCase().endsWith(".rdf") && url.indexOf('?') == -1) {
url = systemDomain + "/Profile/Profile.aspx?Subject=" + nodeId;
if ("full".equalsIgnoreCase(output)) {
url += "&Expand=true&ShowDetails=true";
}
if (containerSessionId != null)
{
url += "&ContainerSessionID=" + containerSessionId;
}
if (token.getViewerId() != null)
{
url += "&Viewer=" + URLEncoder.encode(token.getViewerId(), "UTF-8");
}
}
}
}
LOG.log(Level.INFO, "getRDF :" + url );
final Options opts = new Options(local ? systemBase : "");
opts.format = RDFXML;
opts.outputForm = "compacted";
Model model = FileManager.get().loadModel(url);
Object obj = JSONLD.fromRDF(model, opts);
obj = JSONLD.simplify(obj, opts);
String str = JSONUtils.toString(obj);
JSONObject jsonld = new JSONObject(str);
return new JSONObject().put("uri", uri).put("jsonld", jsonld).put("base", opts.base);
}
|
public XmcdDisc next() throws XmcdExtractionException, XmcdMissingInformationException {
XmcdDisc xmcdDisc;
try {
while ((nextEntry != null) && (nextEntry.isDirectory())) {
nextEntry = tar.getNextTarEntry();
}
currentEntry = nextEntry;
String currentFileContents = IOUtils.toString(tar);
currentEntry = tar.getNextTarEntry();
File filename = new File(currentEntry.getName());
FreedbGenre freedbGenre = FreedbGenre.fromDirectoryName(filename.getParentFile().getName());
xmcdDisc = XmcdDisc.fromXmcdFile(currentFileContents, freedbGenre);
} catch (IOException e) {
throw new XmcdExtractionException("Error while unarchiving", e);
} catch (IllegalArgumentException e) {
throw new XmcdFormatException(
String.format("Invalid directory name %s", currentEntry.getFile().getParentFile().getName()));
} catch (XmcdMissingInformationException e) {
throw new XmcdMissingInformationException(
String.format("Error while parsing %s", currentEntry.getName()), e);
} catch (XmcdFormatException e) {
throw new XmcdFormatException(
String.format("Error while parsing %s", currentEntry.getName()), e);
}
return xmcdDisc;
}
| public XmcdDisc next() throws XmcdExtractionException, XmcdMissingInformationException {
XmcdDisc xmcdDisc;
try {
while ((nextEntry != null) && (nextEntry.isDirectory())) {
nextEntry = tar.getNextTarEntry();
}
currentEntry = nextEntry;
String currentFileContents = IOUtils.toString(tar);
nextEntry = tar.getNextTarEntry();
String dirName = new File(currentEntry.getName()).getParentFile().getName();
FreedbGenre freedbGenre = FreedbGenre.fromDirectoryName(dirName);
xmcdDisc = XmcdDisc.fromXmcdFile(currentFileContents, freedbGenre);
} catch (IOException e) {
throw new XmcdExtractionException("Error while unarchiving", e);
} catch (IllegalArgumentException e) {
throw new XmcdFormatException(
String.format("Invalid directory name %s", currentEntry.getFile().getParentFile().getName()));
} catch (XmcdMissingInformationException e) {
throw new XmcdMissingInformationException(
String.format("Error while parsing %s", currentEntry.getName()), e);
} catch (XmcdFormatException e) {
throw new XmcdFormatException(
String.format("Error while parsing %s", currentEntry.getName()), e);
}
return xmcdDisc;
}
|
public SimpleMessageListenerContainer messageListenerContainer() {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory());
container.setQueues(machineQueue());
container.setMessageListener(new MessageListener());
container.setAutoStartup(true);
container.setConcurrentConsumers(1);
return container;
}
| public SimpleMessageListenerContainer messageListenerContainer() {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory());
container.setQueues(machineQueue());
container.setMessageListener(new MessageListener(heartbeatService, rabbitTemplate()));
container.setAutoStartup(true);
container.setConcurrentConsumers(1);
return container;
}
|
public boolean isSameType( IType obj ){
if( obj == this )
return true;
if( obj instanceof ITypedef )
return obj.isSameType( this );
if( obj instanceof ICQualifierType ){
ICQualifierType qt = (ICQualifierType) obj;
try {
if( isConst() != qt.isConst() ) return false;
if( isRestrict() != qt.isRestrict() ) return false;
if( isVolatile() != qt.isVolatile() ) return false;
return qt.getType().isSameType( getType() );
} catch ( DOMException e ) {
return false;
}
}
return false;
}
| public boolean isSameType( IType obj ){
if( obj == this )
return true;
if( obj instanceof ITypedef )
return obj.isSameType( this );
if( obj instanceof ICQualifierType ){
ICQualifierType qt = (ICQualifierType) obj;
try {
if( isConst() != qt.isConst() ) return false;
if( isRestrict() != qt.isRestrict() ) return false;
if( isVolatile() != qt.isVolatile() ) return false;
if( type == null )
return false;
return type.isSameType( qt.getType() );
} catch ( DOMException e ) {
return false;
}
}
return false;
}
|
public GlobalStats() throws IOException {
final String apiUrl = "http://api.mcstats.org/1.0/All+Servers/graph/Global+Statistics";
final String jsonString = getPage(apiUrl);
final JsonObject jsonObject = new JsonParser().parse(jsonString).getAsJsonObject();
final JsonObject data = jsonObject.getAsJsonObject("data");
final JsonArray playersArray = data.getAsJsonArray("Players");
final JsonArray serversArray = data.getAsJsonArray("Servers");
final SortedMap<Long, Long> playersMap = new TreeMap<>(new Comparator<Long>() {
@Override
public int compare(Long x, Long y) {
return -Long.compare(x, y);
}
});
for (JsonElement a : playersArray) {
playersMap.put(a.getAsJsonArray().get(0).getAsLong(), a.getAsJsonArray().get(1).getAsLong());
}
long totalForAvg = 0, nbForAvg = 0;
long min = Long.MAX_VALUE, max = Long.MIN_VALUE;
for (final Long value : playersMap.values()) {
totalForAvg += value;
nbForAvg++;
if (value < min) {
min = value;
}
if (value > max) {
max = value;
}
}
this.playersMin = formatter.format(min);
this.playersMax = formatter.format(max);
this.playersAvg = formatter.format(((double) totalForAvg) / ((double) nbForAvg));
long lastAmount = playersMap.get(playersMap.lastKey());
this.playersAmount = formatter.format(lastAmount);
playersMap.remove(playersMap.lastKey());
long diff = lastAmount - playersMap.get(playersMap.lastKey());
if (diff > 0) {
this.playersDiff = Colors.DARK_GREEN + Colors.BOLD + "+" + diff + Colors.NORMAL;
} else if (diff == 0) {
this.playersDiff = Colors.DARK_GRAY + Colors.BOLD + "±" + diff + Colors.NORMAL;
} else {
this.playersDiff = Colors.RED + Colors.BOLD + diff + Colors.NORMAL;
}
final SortedMap<Long, Long> serversMap = new TreeMap<>(new Comparator<Long>() {
@Override
public int compare(Long x, Long y) {
return -Long.compare(x, y);
}
});
for (JsonElement a : serversArray) {
serversMap.put(a.getAsJsonArray().get(0).getAsLong(), a.getAsJsonArray().get(1).getAsLong());
}
totalForAvg = 0;
nbForAvg = 0;
min = Long.MAX_VALUE;
max = Long.MIN_VALUE;
for (final Long value : serversMap.values()) {
totalForAvg += value;
nbForAvg++;
if (value < min) {
min = value;
}
if (value > max) {
max = value;
}
}
this.serversMin = formatter.format(min);
this.serversMax = formatter.format(max);
this.serversAvg = formatter.format(((double) totalForAvg) / ((double) nbForAvg));
lastAmount = serversMap.get(serversMap.lastKey());
this.serversAmount = formatter.format(lastAmount);
serversMap.remove(serversMap.lastKey());
diff = lastAmount - serversMap.get(serversMap.lastKey());
if (diff > 0) {
this.serversDiff = Colors.DARK_GREEN + Colors.BOLD + "+" + diff + Colors.NORMAL;
} else if (diff == 0) {
this.serversDiff = Colors.DARK_GRAY + Colors.BOLD + "±" + diff + Colors.NORMAL;
} else {
this.serversDiff = Colors.RED + Colors.BOLD + diff + Colors.NORMAL;
}
}
| public GlobalStats() throws IOException {
final String apiUrl = "http://api.mcstats.org/1.0/All+Servers/graph/Global+Statistics";
final String jsonString = getPage(apiUrl);
final JsonObject jsonObject = new JsonParser().parse(jsonString).getAsJsonObject();
final JsonObject data = jsonObject.getAsJsonObject("data");
final JsonArray playersArray = data.getAsJsonArray("Players");
final JsonArray serversArray = data.getAsJsonArray("Servers");
final SortedMap<Long, Long> playersMap = new TreeMap<>(new Comparator<Long>() {
@Override
public int compare(Long x, Long y) {
return -Long.compare(x, y);
}
});
for (JsonElement a : playersArray) {
playersMap.put(a.getAsJsonArray().get(0).getAsLong(), a.getAsJsonArray().get(1).getAsLong());
}
long totalForAvg = 0, nbForAvg = 0;
long min = Long.MAX_VALUE, max = Long.MIN_VALUE;
for (final Long value : playersMap.values()) {
totalForAvg += value;
nbForAvg++;
if (value < min) {
min = value;
}
if (value > max) {
max = value;
}
}
this.playersMin = formatter.format(min);
this.playersMax = formatter.format(max);
this.playersAvg = formatter.format(((double) totalForAvg) / ((double) nbForAvg));
long lastAmount = playersMap.get(playersMap.lastKey());
this.playersAmount = formatter.format(lastAmount);
playersMap.remove(playersMap.lastKey());
long diff = lastAmount - playersMap.get(playersMap.lastKey());
if (diff > 0) {
this.playersDiff = Colors.DARK_GREEN + Colors.BOLD + "+" + diff + Colors.NORMAL;
} else if (diff == 0) {
this.playersDiff = Colors.DARK_GRAY + Colors.BOLD + "±" + diff + Colors.NORMAL;
} else {
this.playersDiff = Colors.RED + Colors.BOLD + diff + Colors.NORMAL;
}
final SortedMap<Long, Long> serversMap = new TreeMap<>(new Comparator<Long>() {
@Override
public int compare(Long x, Long y) {
return -Long.compare(x, y);
}
});
for (JsonElement a : serversArray) {
serversMap.put(a.getAsJsonArray().get(0).getAsLong(), a.getAsJsonArray().get(1).getAsLong());
}
totalForAvg = 0;
nbForAvg = 0;
min = Long.MAX_VALUE;
max = Long.MIN_VALUE;
for (final Long value : serversMap.values()) {
totalForAvg += value;
nbForAvg++;
if (value < min) {
min = value;
}
if (value > max) {
max = value;
}
}
this.serversMin = formatter.format(min);
this.serversMax = formatter.format(max);
this.serversAvg = formatter.format(((double) totalForAvg) / ((double) nbForAvg));
lastAmount = serversMap.get(serversMap.lastKey());
this.serversAmount = formatter.format(lastAmount);
serversMap.remove(serversMap.lastKey());
diff = lastAmount - serversMap.get(serversMap.lastKey());
if (diff > 0) {
this.serversDiff = Colors.DARK_GREEN + Colors.BOLD + "+" + diff + Colors.NORMAL;
} else if (diff == 0) {
this.serversDiff = Colors.DARK_GRAY + Colors.BOLD + "±" + diff + Colors.NORMAL;
} else {
this.serversDiff = Colors.RED + Colors.BOLD + diff + Colors.NORMAL;
}
}
|
protected void setUp() throws Exception {
super.setUp();
System.setProperty(Context.INITIAL_CONTEXT_FACTORY, SpringInitialContextFactory.class.getName());
System.setProperty(Context.PROVIDER_URL, "jndi.xml");
TransactionManagerFactoryBean factory = new TransactionManagerFactoryBean();
factory.setTransactionLogDir("target/txlog");
tm = (GeronimoPlatformTransactionManager) factory.getObject();
broker = new BrokerService();
broker.setPersistenceAdapter(new MemoryPersistenceAdapter());
broker.addConnector("tcp://localhost:61616");
broker.start();
JCAFlow senderFlow = new JCAFlow();
senderFlow.setJmsURL("tcp://localhost:61616");
senderContainer.setTransactionManager(tm);
senderContainer.setEmbedded(true);
senderContainer.setName("senderContainer");
senderContainer.setFlows(new Flow[] { senderFlow} );
senderContainer.setMonitorInstallationDirectory(false);
senderContainer.setAutoEnlistInTransaction(true);
senderContainer.init();
senderContainer.start();
JCAFlow receiverFlow = new JCAFlow();
receiverFlow.setJmsURL("tcp://localhost:61616");
receiverContainer.setTransactionManager(tm);
receiverContainer.setEmbedded(true);
receiverContainer.setName("receiverContainer");
receiverContainer.setFlows(new Flow[] { receiverFlow} );
receiverContainer.setMonitorInstallationDirectory(false);
receiverContainer.init();
receiverContainer.start();
}
| protected void setUp() throws Exception {
super.setUp();
System.setProperty(Context.INITIAL_CONTEXT_FACTORY, SpringInitialContextFactory.class.getName());
System.setProperty(Context.PROVIDER_URL, "jndi.xml");
TransactionManagerFactoryBean factory = new TransactionManagerFactoryBean();
factory.setTransactionLogDir("target/txlog");
tm = (GeronimoPlatformTransactionManager) factory.getObject();
broker = new BrokerService();
broker.setPersistenceAdapter(new MemoryPersistenceAdapter());
broker.addConnector("tcp://localhost:61616");
broker.start();
JCAFlow senderFlow = new JCAFlow();
senderFlow.setJmsURL("tcp://localhost:61616");
senderContainer.setTransactionManager(tm);
senderContainer.setEmbedded(true);
senderContainer.setName("senderContainer");
senderContainer.setFlows(new Flow[] { senderFlow} );
senderContainer.setMonitorInstallationDirectory(false);
senderContainer.setAutoEnlistInTransaction(true);
senderContainer.init();
senderContainer.start();
JCAFlow receiverFlow = new JCAFlow();
receiverFlow.setJmsURL("tcp://localhost:61616");
receiverContainer.setTransactionManager(tm);
receiverContainer.setEmbedded(true);
receiverContainer.setName("receiverContainer");
receiverContainer.setFlows(new Flow[] { receiverFlow} );
receiverContainer.setMonitorInstallationDirectory(false);
receiverContainer.setAutoEnlistInTransaction(true);
receiverContainer.init();
receiverContainer.start();
}
|
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
addPreferencesFromResource(R.xml.tether_prefs);
final Activity activity = getActivity();
BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
if (adapter != null) {
adapter.getProfileProxy(activity.getApplicationContext(), mProfileServiceListener,
BluetoothProfile.PAN);
}
mEnableWifiAp =
(CheckBoxPreference) findPreference(ENABLE_WIFI_AP);
Preference wifiApSettings = findPreference(WIFI_AP_SSID_AND_SECURITY);
mUsbTether = (CheckBoxPreference) findPreference(USB_TETHER_SETTINGS);
mBluetoothTether = (CheckBoxPreference) findPreference(ENABLE_BLUETOOTH_TETHERING);
mTetherHelp = (PreferenceScreen) findPreference(TETHERING_HELP);
ConnectivityManager cm =
(ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);
mUsbRegexs = cm.getTetherableUsbRegexs();
mWifiRegexs = cm.getTetherableWifiRegexs();
mBluetoothRegexs = cm.getTetherableBluetoothRegexs();
final boolean usbAvailable = mUsbRegexs.length != 0;
final boolean wifiAvailable = mWifiRegexs.length != 0;
final boolean bluetoothAvailable = mBluetoothRegexs.length != 0;
if (!usbAvailable || Utils.isMonkeyRunning()) {
getPreferenceScreen().removePreference(mUsbTether);
}
if (wifiAvailable) {
mWifiApEnabler = new WifiApEnabler(activity, mEnableWifiAp);
initWifiTethering();
} else {
getPreferenceScreen().removePreference(mEnableWifiAp);
getPreferenceScreen().removePreference(wifiApSettings);
}
if (!bluetoothAvailable) {
getPreferenceScreen().removePreference(mBluetoothTether);
} else {
if (mBluetoothPan != null && mBluetoothPan.isTetheringOn()) {
mBluetoothTether.setChecked(true);
} else {
mBluetoothTether.setChecked(false);
}
}
mProvisionApp = getResources().getStringArray(
com.android.internal.R.array.config_mobile_hotspot_provision_app);
mView = new WebView(activity);
}
| public void onCreate(Bundle icicle) {
super.onCreate(icicle);
addPreferencesFromResource(R.xml.tether_prefs);
final Activity activity = getActivity();
BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
if (adapter != null) {
adapter.getProfileProxy(activity.getApplicationContext(), mProfileServiceListener,
BluetoothProfile.PAN);
}
mEnableWifiAp =
(CheckBoxPreference) findPreference(ENABLE_WIFI_AP);
Preference wifiApSettings = findPreference(WIFI_AP_SSID_AND_SECURITY);
mUsbTether = (CheckBoxPreference) findPreference(USB_TETHER_SETTINGS);
mBluetoothTether = (CheckBoxPreference) findPreference(ENABLE_BLUETOOTH_TETHERING);
mTetherHelp = (PreferenceScreen) findPreference(TETHERING_HELP);
ConnectivityManager cm =
(ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);
mUsbRegexs = cm.getTetherableUsbRegexs();
mWifiRegexs = cm.getTetherableWifiRegexs();
mBluetoothRegexs = cm.getTetherableBluetoothRegexs();
final boolean usbAvailable = mUsbRegexs.length != 0;
final boolean wifiAvailable = mWifiRegexs.length != 0;
final boolean bluetoothAvailable = mBluetoothRegexs.length != 0;
if (!usbAvailable || Utils.isMonkeyRunning()) {
getPreferenceScreen().removePreference(mUsbTether);
}
if (wifiAvailable && !Utils.isMonkeyRunning()) {
mWifiApEnabler = new WifiApEnabler(activity, mEnableWifiAp);
initWifiTethering();
} else {
getPreferenceScreen().removePreference(mEnableWifiAp);
getPreferenceScreen().removePreference(wifiApSettings);
}
if (!bluetoothAvailable) {
getPreferenceScreen().removePreference(mBluetoothTether);
} else {
if (mBluetoothPan != null && mBluetoothPan.isTetheringOn()) {
mBluetoothTether.setChecked(true);
} else {
mBluetoothTether.setChecked(false);
}
}
mProvisionApp = getResources().getStringArray(
com.android.internal.R.array.config_mobile_hotspot_provision_app);
mView = new WebView(activity);
}
|
public NewWaveEvent(Arena arena, Wave wave, int waveNo) {
this.wave = wave;
this.waveNo = waveNo;
}
| public NewWaveEvent(Arena arena, Wave wave, int waveNo) {
this.arena = arena;
this.wave = wave;
this.waveNo = waveNo;
}
|
public char getopt(String argv[]) {
Debug.println("getopt",
"optind=" + optind + ", argv.length="+argv.length);
if (optind >= (argv.length)-1) {
done = true;
}
if (done) {
return DONE;
}
String thisArg = argv[optind++];
if (thisArg.startsWith("-")) {
optarg = null;
for (int i=0; i<options.length; i++) {
if ( options[i].argLetter == thisArg.charAt(1) ||
(options[i].argName != null &&
options[i].argName == thisArg.substring(1))) {
if (options[i].takesArgument) {
if (optind < argv.length) {
optarg = argv[optind];
++optind;
} else {
throw new IllegalArgumentException(
"Option " + options[i].argLetter +
" needs value but found end of arg list");
}
}
return options[i].argLetter;
}
}
return '?';
} else {
done = true;
return DONE;
}
}
| public char getopt(String argv[]) {
Debug.println("getopt",
"optind=" + optind + ", argv.length="+argv.length);
if (optind >= (argv.length)-1) {
done = true;
}
if (done) {
return DONE;
}
String thisArg = argv[optind++];
if (thisArg.startsWith("-")) {
optarg = null;
for (int i=0; i<options.length; i++) {
if ( options[i].argLetter == thisArg.charAt(1) ||
(options[i].argName != null &&
options[i].argName.equals(thisArg.substring(1)))) {
if (options[i].takesArgument) {
if (optind < argv.length) {
optarg = argv[optind];
++optind;
} else {
throw new IllegalArgumentException(
"Option " + options[i].argLetter +
" needs value but found end of arg list");
}
}
return options[i].argLetter;
}
}
return '?';
} else {
done = true;
return DONE;
}
}
|
public BaseActionInterface buildAction(Context context, String name) {
BaseActionInterface seedAction = null;
if ("beak".equals(name))
seedAction = new BeakeringAction(context);
else if ("cut".equals(name))
seedAction = new CuttingAction(context);
else if ("lighten".equals(name))
seedAction = new LighteningAction(context);
else if ("water".equals(name))
seedAction = new WateringAction(context);
else if ("sow".equals(name))
seedAction = new SowingAction(context);
else if ("hoe".equals(name))
seedAction = new HoeAction(context);
else if ("harvest".equals(name))
seedAction = new HarvestAction(context);
else seedAction = new SowingAction(context);
return seedAction;
}
| public BaseActionInterface buildAction(Context context, String name) {
BaseActionInterface seedAction = null;
if ("beak".equals(name))
seedAction = new BeakeringAction(context);
else if ("cut".equals(name))
seedAction = new CuttingAction(context);
else if ("lighten".equals(name))
seedAction = new LighteningAction(context);
else if ("water".equals(name))
seedAction = new WateringAction(context);
else if ("sow".equals(name))
seedAction = new SowingAction(context);
else if ("hoe".equals(name))
seedAction = new HoeAction(context);
else if ("harvest".equals(name))
seedAction = new HarvestAction(context);
else seedAction = null;
return seedAction;
}
|
public void handleRequest(EngineRequest request, EngineResponse response, JSAPResult results) throws HokanException {
String horo = results.getString(ARG_HORO);
HoroUpdater horoUpdater = (HoroUpdater) updaterManagerService.getUpdater("horoUpdater");
UpdaterData updaterData = new UpdaterData();
horoUpdater.getData(updaterData, horo);
HoroHolder hh = (HoroHolder) updaterData.getData();
if (hh != null) {
response.setResponseMessage(hh.toString());
} else {
response.setResponseMessage("Saat dildoo perään et pääse pylsimään!");
}
}
| public void handleRequest(EngineRequest request, EngineResponse response, JSAPResult results) throws HokanException {
String horo = results.getString(ARG_HORO);
HoroUpdater horoUpdater = (HoroUpdater) updaterManagerService.getUpdater("horoUpdater");
UpdaterData updaterData = new UpdaterData();
horoUpdater.getData(updaterData, horo);
HoroHolder hh = (HoroHolder) updaterData.getData();
if (hh != null) {
response.setResponseMessage(hh.toString());
} else {
response.setResponseMessage("Saat dildoo perään ja et pääse pylsimään!");
}
}
|
public LabOrderListItem saveLabOrder(Integer orderId, Integer patientId, String orderConceptStr, String orderLocationStr, String orderDateStr, String accessionNumber, String discontinuedDateStr, Map<String, LabResultListItem> labResults) {
log.debug("Saving LabOrder with params: " + orderId + ", " + patientId + ", " + orderConceptStr + ", " + orderLocationStr + ", " + orderDateStr + ", " + accessionNumber + ", " + discontinuedDateStr + ", " + labResults);
Patient patient = null;
Concept orderConcept = null;
Location orderLocation = null;
Date orderDate = null;
EncounterType encounterType = null;
OrderType orderType = null;
Date discontinuedDate = null;
Date today = new Date();
List<String> errors = new ArrayList<String>();
if (orderConceptStr == null || "".equals(orderConceptStr)) {
errors.add("Order Type Concept is required");
}
else {
try {
orderConcept = Context.getConceptService().getConcept(Integer.valueOf(orderConceptStr));
if (orderConcept == null) {
errors.add("Order Type Concept was not found.");
}
}
catch (Exception e) {
errors.add("Invalid Order Type Concept specified.");
}
}
if (orderLocationStr == null || "".equals(orderLocationStr)) {
errors.add("Order Location is required");
}
else {
try {
orderLocation = Context.getLocationService().getLocation(Integer.valueOf(orderLocationStr));
if (orderLocation == null) {
errors.add("Order Location was not found.");
}
}
catch (Exception e) {
errors.add("Invalid Order Location specified.");
}
}
if (orderDateStr == null || "".equals(orderDateStr)) {
errors.add("Order Date is required");
}
else {
try {
orderDate = Context.getDateFormat().parse(orderDateStr);
if (orderDate.after(today)) {
errors.add("Order Date cannot be in the future.");
}
}
catch (Exception e) {
errors.add("Invalid Order Date specified.");
}
}
try {
String encounterTypeProp = Context.getAdministrationService().getGlobalProperty("simplelabentry.labTestEncounterType");
encounterType = Context.getEncounterService().getEncounterType(Integer.valueOf(encounterTypeProp));
if (encounterType == null) {
errors.add("Encounter Type is required");
}
}
catch (Exception e) {
errors.add("Invalid Encounter Type configured.");
}
try {
String orderTypeProp = Context.getAdministrationService().getGlobalProperty("simplelabentry.labOrderType");
orderType = Context.getOrderService().getOrderType(Integer.valueOf(orderTypeProp));
if (orderType == null) {
errors.add("Order Type is required");
}
}
catch (Exception e) {
errors.add("Invalid Order Type configured.");
}
if (discontinuedDateStr != null && !"".equals(discontinuedDateStr)) {
try {
discontinuedDate = Context.getDateFormat().parse(discontinuedDateStr);
if (discontinuedDate.after(today)) {
errors.add("Result Date cannot be in the future.");
}
}
catch (Exception e) {
errors.add("Invalid Result Date specified.");
}
}
if (patientId == null) {
if (orderId == null) {
errors.add("Patient ID is required");
}
}
else {
try {
patient = Context.getPatientService().getPatient(Integer.valueOf(patientId));
if (patient == null) {
errors.add("Patient was not found.");
}
if (patient.isDead() && (patient.getDeathDate() == null || patient.getDeathDate().before(orderDate))) {
errors.add("You cannot enter an Order for a Patient who has died.");
}
}
catch (Exception e) {
errors.add("Invalid Patient ID specified.");
}
}
boolean hasLabResults = false;
for (String resultConcept : labResults.keySet()) {
LabResultListItem rli = labResults.get(resultConcept);
if (StringUtils.isNotBlank(rli.getResult())) {
hasLabResults = true;
}
Concept c = null;
try {
c = Context.getConceptService().getConcept(Integer.parseInt(resultConcept));
}
catch (Exception e) { }
if (c == null) {
errors.add("Lab Result has an invalid concept id = " + resultConcept);
}
else {
if (c.isNumeric()) {
ConceptNumeric cn = (ConceptNumeric) c;
if (StringUtils.isNotBlank(rli.getResult())) {
try {
Float result = Float.valueOf(rli.getResult());
if (!OpenmrsUtil.isValidNumericValue(result, cn)) {
errors.add("The value " + rli.getResult() + " entered for " + cn.getName() + " is outside of it's absolute range of " + cn.getLowAbsolute() + " -> " + cn.getHiAbsolute());
}
}
catch (Exception e) {
errors.add("An invalid numeric value of " + rli.getResult() + " was entered for " + c.getName());
}
}
}
}
}
if (!hasLabResults && discontinuedDate != null) {
errors.add("You cannot enter a result date if no results have been entered.");
}
SimpleLabEntryService ls = (SimpleLabEntryService) Context.getService(SimpleLabEntryService.class);
List<Order> existingOrders = ls.getLabOrders(orderConcept, orderLocation, orderDate, null, Arrays.asList(patient));
for (Order o : existingOrders) {
if (StringUtils.equalsIgnoreCase(o.getAccessionNumber(), accessionNumber)) {
errors.add("You cannot enter an order that matches an existing order.");
}
}
if (!errors.isEmpty()) {
StringBuffer errorString = new StringBuffer("Validation errors while trying to create order:\n\n");
for (String error : errors) {
errorString.append(" - " + error + "\n\n");
}
log.error(errorString);
throw new RuntimeException(errorString.toString());
}
User user = Context.getAuthenticatedUser();
Date now = new Date();
Order o = null;
if (orderId == null) {
o = new Order();
o.setPatient(patient);
o.setOrderer(user);
o.setCreator(user);
o.setDateCreated(now);
Encounter e = new Encounter();
e.setEncounterType(encounterType);
e.setPatient(patient);
e.setDateCreated(now);
e.setCreator(user);
e.setProvider(user);
o.setEncounter(e);
e.addOrder(o);
}
else {
o = Context.getOrderService().getOrder(orderId);
}
Encounter e = o.getEncounter();
e.setEncounterDatetime(orderDate);
e.setLocation(orderLocation);
o.setOrderType(orderType);
o.setConcept(orderConcept);
o.setAccessionNumber(accessionNumber);
o.setStartDate(orderDate);
o.setDiscontinuedDate(discontinuedDate);
if (discontinuedDate != null) {
o.setDiscontinued(true);
o.setDiscontinuedBy(user);
}
else {
o.setDiscontinued(false);
o.setDiscontinuedBy(null);
}
for (String resultConcept : labResults.keySet()) {
LabResultListItem rli = labResults.get(resultConcept);
boolean needToAdd = true;
for (Obs obs : e.getObs()) {
if (obs.getConcept().getConceptId().toString().equals(resultConcept)) {
String previousResult = LabResultListItem.getValueStringFromObs(obs);
if (previousResult != null && previousResult.equals(rli.getResult())) {
log.debug("Concept: " + obs.getConcept().getName() + ", value: " + rli.getResult() + " has not changed.");
needToAdd = false;
}
else {
log.debug("Concept: " + obs.getConcept().getName() + " has changed value from: " + previousResult + " to: " + rli.getResult());
obs.setVoided(true);
obs.setVoidedBy(user);
}
}
}
if (needToAdd) {
Obs newObs = new Obs();
newObs.setConcept(Context.getConceptService().getConcept(Integer.parseInt(resultConcept)));
newObs.setEncounter(e);
newObs.setObsDatetime(e.getEncounterDatetime());
newObs.setOrder(o);
newObs.setPerson(e.getPatient());
LabResultListItem.setObsFromValueString(newObs, rli.getResult());
newObs.setAccessionNumber(accessionNumber);
newObs.setCreator(user);
newObs.setDateCreated(now);
e.addObs(newObs);
log.debug("Added obs: " + newObs);
}
}
Context.getEncounterService().saveEncounter(e);
return new LabOrderListItem(o);
}
| public LabOrderListItem saveLabOrder(Integer orderId, Integer patientId, String orderConceptStr, String orderLocationStr, String orderDateStr, String accessionNumber, String discontinuedDateStr, Map<String, LabResultListItem> labResults) {
log.debug("Saving LabOrder with params: " + orderId + ", " + patientId + ", " + orderConceptStr + ", " + orderLocationStr + ", " + orderDateStr + ", " + accessionNumber + ", " + discontinuedDateStr + ", " + labResults);
Patient patient = null;
Concept orderConcept = null;
Location orderLocation = null;
Date orderDate = null;
EncounterType encounterType = null;
OrderType orderType = null;
Date discontinuedDate = null;
Date today = new Date();
List<String> errors = new ArrayList<String>();
if (orderConceptStr == null || "".equals(orderConceptStr)) {
errors.add("Order Type Concept is required");
}
else {
try {
orderConcept = Context.getConceptService().getConcept(Integer.valueOf(orderConceptStr));
if (orderConcept == null) {
errors.add("Order Type Concept was not found.");
}
}
catch (Exception e) {
errors.add("Invalid Order Type Concept specified.");
}
}
if (orderLocationStr == null || "".equals(orderLocationStr)) {
errors.add("Order Location is required");
}
else {
try {
orderLocation = Context.getLocationService().getLocation(Integer.valueOf(orderLocationStr));
if (orderLocation == null) {
errors.add("Order Location was not found.");
}
}
catch (Exception e) {
errors.add("Invalid Order Location specified.");
}
}
if (orderDateStr == null || "".equals(orderDateStr)) {
errors.add("Order Date is required");
}
else {
try {
orderDate = Context.getDateFormat().parse(orderDateStr);
if (orderDate.after(today)) {
errors.add("Order Date cannot be in the future.");
}
}
catch (Exception e) {
errors.add("Invalid Order Date specified.");
}
}
try {
String encounterTypeProp = Context.getAdministrationService().getGlobalProperty("simplelabentry.labTestEncounterType");
encounterType = Context.getEncounterService().getEncounterType(Integer.valueOf(encounterTypeProp));
if (encounterType == null) {
errors.add("Encounter Type is required");
}
}
catch (Exception e) {
errors.add("Invalid Encounter Type configured.");
}
try {
String orderTypeProp = Context.getAdministrationService().getGlobalProperty("simplelabentry.labOrderType");
orderType = Context.getOrderService().getOrderType(Integer.valueOf(orderTypeProp));
if (orderType == null) {
errors.add("Order Type is required");
}
}
catch (Exception e) {
errors.add("Invalid Order Type configured.");
}
if (discontinuedDateStr != null && !"".equals(discontinuedDateStr)) {
try {
discontinuedDate = Context.getDateFormat().parse(discontinuedDateStr);
if (discontinuedDate.after(today)) {
errors.add("Result Date cannot be in the future.");
}
}
catch (Exception e) {
errors.add("Invalid Result Date specified.");
}
}
if (patientId == null) {
if (orderId == null) {
errors.add("Patient ID is required");
}
}
else {
try {
patient = Context.getPatientService().getPatient(Integer.valueOf(patientId));
if (patient == null) {
errors.add("Patient was not found.");
}
if (patient.isDead() && (patient.getDeathDate() == null || patient.getDeathDate().before(orderDate))) {
errors.add("You cannot enter an Order for a Patient who has died.");
}
}
catch (Exception e) {
errors.add("Invalid Patient ID specified.");
}
}
boolean hasLabResults = false;
for (String resultConcept : labResults.keySet()) {
LabResultListItem rli = labResults.get(resultConcept);
if (StringUtils.isNotBlank(rli.getResult())) {
hasLabResults = true;
}
Concept c = null;
try {
c = Context.getConceptService().getConcept(Integer.parseInt(resultConcept));
}
catch (Exception e) { }
if (c == null) {
errors.add("Lab Result has an invalid concept id = " + resultConcept);
}
else {
if (c.isNumeric()) {
ConceptNumeric cn = (ConceptNumeric) c;
if (StringUtils.isNotBlank(rli.getResult())) {
try {
Float result = Float.valueOf(rli.getResult());
if (!OpenmrsUtil.isValidNumericValue(result, cn)) {
errors.add("The value " + rli.getResult() + " entered for " + cn.getName() + " is outside of it's absolute range of " + cn.getLowAbsolute() + " -> " + cn.getHiAbsolute());
}
}
catch (Exception e) {
errors.add("An invalid numeric value of " + rli.getResult() + " was entered for " + c.getName());
}
}
}
}
}
if (!hasLabResults && discontinuedDate != null) {
errors.add("You cannot enter a result date if no results have been entered.");
}
SimpleLabEntryService ls = (SimpleLabEntryService) Context.getService(SimpleLabEntryService.class);
List<Order> existingOrders = ls.getLabOrders(orderConcept, orderLocation, orderDate, null, Arrays.asList(patient));
for (Order o : existingOrders) {
if (orderId == null && StringUtils.equalsIgnoreCase(o.getAccessionNumber(), accessionNumber)) {
errors.add("You cannot enter an order that matches an existing order.");
}
}
if (!errors.isEmpty()) {
StringBuffer errorString = new StringBuffer("Validation errors while trying to create order:\n\n");
for (String error : errors) {
errorString.append(" - " + error + "\n\n");
}
log.error(errorString);
throw new RuntimeException(errorString.toString());
}
User user = Context.getAuthenticatedUser();
Date now = new Date();
Order o = null;
if (orderId == null) {
o = new Order();
o.setPatient(patient);
o.setOrderer(user);
o.setCreator(user);
o.setDateCreated(now);
Encounter e = new Encounter();
e.setEncounterType(encounterType);
e.setPatient(patient);
e.setDateCreated(now);
e.setCreator(user);
e.setProvider(user);
o.setEncounter(e);
e.addOrder(o);
}
else {
o = Context.getOrderService().getOrder(orderId);
}
Encounter e = o.getEncounter();
e.setEncounterDatetime(orderDate);
e.setLocation(orderLocation);
o.setOrderType(orderType);
o.setConcept(orderConcept);
o.setAccessionNumber(accessionNumber);
o.setStartDate(orderDate);
o.setDiscontinuedDate(discontinuedDate);
if (discontinuedDate != null) {
o.setDiscontinued(true);
o.setDiscontinuedBy(user);
}
else {
o.setDiscontinued(false);
o.setDiscontinuedBy(null);
}
for (String resultConcept : labResults.keySet()) {
LabResultListItem rli = labResults.get(resultConcept);
boolean needToAdd = true;
for (Obs obs : e.getObs()) {
if (obs.getConcept().getConceptId().toString().equals(resultConcept)) {
String previousResult = LabResultListItem.getValueStringFromObs(obs);
if (previousResult != null && previousResult.equals(rli.getResult())) {
log.debug("Concept: " + obs.getConcept().getName() + ", value: " + rli.getResult() + " has not changed.");
needToAdd = false;
}
else {
log.debug("Concept: " + obs.getConcept().getName() + " has changed value from: " + previousResult + " to: " + rli.getResult());
obs.setVoided(true);
obs.setVoidedBy(user);
}
}
}
if (needToAdd) {
Obs newObs = new Obs();
newObs.setConcept(Context.getConceptService().getConcept(Integer.parseInt(resultConcept)));
newObs.setEncounter(e);
newObs.setObsDatetime(e.getEncounterDatetime());
newObs.setOrder(o);
newObs.setPerson(e.getPatient());
LabResultListItem.setObsFromValueString(newObs, rli.getResult());
newObs.setAccessionNumber(accessionNumber);
newObs.setCreator(user);
newObs.setDateCreated(now);
e.addObs(newObs);
log.debug("Added obs: " + newObs);
}
}
Context.getEncounterService().saveEncounter(e);
return new LabOrderListItem(o);
}
|
private static ChatRoomResultSet crrsPostRequest(List<NameValuePair> rgparam, String stUrl) {
JSONObject json = makeRequest(stUrl, rgparam);
try {
boolean fSucceeded = json.getString(RequestParameters.PARAMETER_SUCCESS).equals("true");
if (fSucceeded) {
List<ChatRoomInfo> rgchatroominfo = new ArrayList<ChatRoomInfo>();
JSONArray rgroom = json.getJSONArray(RequestParameters.PARAMETER_ROOM_ROOMS);
for (int i = 0; i < rgroom.length(); i++) {
JSONObject jsonobject = rgroom.getJSONObject(i);
String stName = URLDecoder.decode(jsonobject.getString(RequestParameters.PARAMETER_ROOM_NAME), "UTF-8");
String stId = jsonobject.getString(RequestParameters.PARAMETER_ROOM_ID);
String stDescription = URLDecoder.decode(jsonobject.getString(RequestParameters.PARAMETER_ROOM_DESCRIPTION), "UTF-8");
double latitude = jsonobject.getDouble(RequestParameters.PARAMETER_ROOM_LATITUDE);
double longitude = jsonobject.getDouble(RequestParameters.PARAMETER_ROOM_LONGITUDE);
String stCreator = URLDecoder.decode(jsonobject.getString(RequestParameters.PARAMETER_ROOM_CREATOR), "UTF-8");
int numUsers = jsonobject.getInt(RequestParameters.PARAMETER_ROOM_NUM_USERS);
long ticks = jsonobject.getLong(RequestParameters.PARAMETER_TIMESTAMP);
rgchatroominfo.add(new ChatRoomInfo(stName, stId, stDescription, latitude, longitude, stCreator, numUsers, new Timestamp(ticks)));
}
return new ChatRoomResultSet(true, rgchatroominfo, "NO ERROR CODE", "NO ERROR MESSAGE");
}
return new ChatRoomResultSet(false, ResponseParameters.RESPONSE_ERROR_CODE_ROOM,
ResponseParameters.RESPONSE_MESSAGE_ERROR);
} catch (JSONException e) {
e.printStackTrace();
}
catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return new ChatRoomResultSet(false, "REQUEST FAILED", "REQUEST FAILED");
}
| private static ChatRoomResultSet crrsPostRequest(List<NameValuePair> rgparam, String stUrl) {
JSONObject json = makeRequest(stUrl, rgparam);
try {
boolean fSucceeded = json.getString(RequestParameters.PARAMETER_SUCCESS).equals("true");
if (fSucceeded) {
List<ChatRoomInfo> rgchatroominfo = new ArrayList<ChatRoomInfo>();
JSONArray rgroom = json.getJSONArray(RequestParameters.PARAMETER_ROOM_ROOMS);
for (int i = 0; i < rgroom.length(); i++) {
JSONObject jsonobject = rgroom.getJSONObject(i);
String stName = URLDecoder.decode(jsonobject.getString(RequestParameters.PARAMETER_ROOM_NAME), "UTF-8");
String stId = jsonobject.getString(RequestParameters.PARAMETER_ROOM_ID);
String stDescription = URLDecoder.decode(jsonobject.getString(RequestParameters.PARAMETER_ROOM_DESCRIPTION), "UTF-8");
double latitude = jsonobject.getDouble(RequestParameters.PARAMETER_ROOM_LATITUDE);
double longitude = jsonobject.getDouble(RequestParameters.PARAMETER_ROOM_LONGITUDE);
String stCreator = URLDecoder.decode(jsonobject.getString(RequestParameters.PARAMETER_ROOM_CREATOR), "UTF-8");
int numUsers = jsonobject.getInt(RequestParameters.PARAMETER_ROOM_NUM_USERS);
long ticks = jsonobject.getLong(RequestParameters.PARAMETER_TIMESTAMP);
rgchatroominfo.add(new ChatRoomInfo(stName, stId, stDescription, latitude, longitude, stCreator, numUsers, new Timestamp(ticks)));
}
return new ChatRoomResultSet(true, rgchatroominfo, "NO ERROR CODE", "NO ERROR MESSAGE");
}
return new ChatRoomResultSet(false, ResponseParameters.RESPONSE_ERROR_CODE_ROOM,
ResponseParameters.RESPONSE_MESSAGE_ERROR);
} catch (JSONException e) {
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return new ChatRoomResultSet(false, "REQUEST FAILED", "REQUEST FAILED");
}
|
public void doGo(Session session, Exit exit) {
Character chara = session.character;
String name = chara.givenName;
chara.writeLnToRoom(String.format(customMsg(exit.exitMsg,"%s moves %s."), name, exit.name));
session.writeLn(String.format(customMsg(exit.travelMsg,"You move %s."), exit.name));
chara.setRoom(exit.getRoom());
Exit targetExit = exit.getRoom().getExit(exit.exitUUID);
chara.writeLnToRoom(String.format(customMsg(targetExit.enterMsg,"%s arrives from the %s."), name, targetExit.name));
session.force("look");
}
| public void doGo(Session session, Exit exit) {
Character chara = session.character;
String name = chara.givenName;
chara.writeLnToRoom(String.format(customMsg(exit.exitMsg,"%s moves %s."), name, exit.name));
session.writeLn(String.format(customMsg(exit.travelMsg,"You move %s."), exit.name));
chara.setRoom(exit.getRoom());
Exit targetExit = exit.getRoom().getExit(exit.exitUUID);
if(targetExit != null) {
chara.writeLnToRoom(String.format(customMsg(targetExit.enterMsg,"%s arrives from the %s."), name, targetExit.name));
} else {
chara.writeLnToRoom(String.format("%s arrives from somewhere.", name));
}
session.force("look");
}
|
public static void main(String argv[]) {
if (argv.length < 2) {
printUsage();
System.exit(1);
}
XMLParserConfiguration parserConfiguration = null;
String arg = null;
int i = 0;
arg = argv[i];
if (arg.equals("-p")) {
i++;
String parserName = argv[i];
try {
ClassLoader cl = ObjectFactory.findClassLoader();
parserConfiguration = (XMLParserConfiguration)ObjectFactory.newInstance(parserName, cl, true);
}
catch (Exception e) {
parserConfiguration = null;
System.err.println("error: Unable to instantiate parser configuration ("+parserName+")");
}
i++;
}
arg = argv[i];
Vector externalDTDs = null;
if (arg.equals("-d")) {
externalDTDs= new Vector();
i++;
while (i < argv.length && !(arg = argv[i]).startsWith("-")) {
externalDTDs.addElement(arg);
i++;
}
if (externalDTDs.size() == 0) {
printUsage();
System.exit(1);
}
}
Vector schemas = null;
boolean schemaFullChecking = DEFAULT_SCHEMA_FULL_CHECKING;
boolean honourAllSchemaLocations = DEFAULT_HONOUR_ALL_SCHEMA_LOCATIONS;
if(i < argv.length) {
arg = argv[i];
if (arg.equals("-f")) {
schemaFullChecking = true;
i++;
arg = argv[i];
}
else if (arg.equals("-F")) {
schemaFullChecking = false;
i++;
arg = argv[i];
}
else if (arg.equals("-hs")) {
honourAllSchemaLocations = true;
i++;
arg = argv[i];
}
else if (arg.equals("-HS")) {
honourAllSchemaLocations = false;
i++;
arg = argv[i];
}
if (arg.equals("-a")) {
if(externalDTDs != null) {
printUsage();
System.exit(1);
}
schemas= new Vector();
i++;
while (i < argv.length && !(arg = argv[i]).startsWith("-")) {
schemas.addElement(arg);
i++;
}
if (schemas.size() == 0) {
printUsage();
System.exit(1);
}
}
}
Vector ifiles = null;
if (i < argv.length) {
if (!arg.equals("-i")) {
printUsage();
System.exit(1);
}
i++;
ifiles = new Vector();
while (i < argv.length && !(arg = argv[i]).startsWith("-")) {
ifiles.addElement(arg);
i++;
}
if (ifiles.size() == 0 || i != argv.length) {
printUsage();
System.exit(1);
}
}
SymbolTable sym = new SymbolTable(BIG_PRIME);
XMLGrammarPreparser preparser = new XMLGrammarPreparser(sym);
XMLGrammarPoolImpl grammarPool = new XMLGrammarPoolImpl();
boolean isDTD = false;
if(externalDTDs != null) {
preparser.registerPreparser(XMLGrammarDescription.XML_DTD, null);
isDTD = true;
} else if(schemas != null) {
preparser.registerPreparser(XMLGrammarDescription.XML_SCHEMA, null);
isDTD = false;
} else {
System.err.println("No schema or DTD specified!");
System.exit(1);
}
preparser.setProperty(GRAMMAR_POOL, grammarPool);
preparser.setFeature(NAMESPACES_FEATURE_ID, true);
preparser.setFeature(VALIDATION_FEATURE_ID, true);
preparser.setFeature(SCHEMA_VALIDATION_FEATURE_ID, true);
preparser.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, schemaFullChecking);
preparser.setFeature(HONOUR_ALL_SCHEMA_LOCATIONS_ID, honourAllSchemaLocations);
try {
if(isDTD) {
for (i = 0; i < externalDTDs.size(); i++) {
Grammar g = preparser.preparseGrammar(XMLGrammarDescription.XML_DTD, stringToXIS((String)externalDTDs.elementAt(i)));
}
} else {
for (i = 0; i < schemas.size(); i++) {
Grammar g = preparser.preparseGrammar(XMLGrammarDescription.XML_SCHEMA, stringToXIS((String)schemas.elementAt(i)));
}
}
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
if (parserConfiguration == null) {
parserConfiguration = new XIncludeAwareParserConfiguration(sym, grammarPool);
}
else {
parserConfiguration.setProperty(SYMBOL_TABLE, sym);
parserConfiguration.setProperty(GRAMMAR_POOL, grammarPool);
}
try{
parserConfiguration.setFeature(NAMESPACES_FEATURE_ID, true);
parserConfiguration.setFeature(VALIDATION_FEATURE_ID, true);
parserConfiguration.setFeature(SCHEMA_VALIDATION_FEATURE_ID, true);
parserConfiguration.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, schemaFullChecking);
parserConfiguration.setFeature(HONOUR_ALL_SCHEMA_LOCATIONS_ID, honourAllSchemaLocations);
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
if (ifiles != null) {
try {
for (i = 0; i < ifiles.size(); i++) {
parserConfiguration.parse(stringToXIS((String)ifiles.elementAt(i)));
}
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
}
}
| public static void main(String argv[]) {
if (argv.length < 2) {
printUsage();
System.exit(1);
}
XMLParserConfiguration parserConfiguration = null;
String arg = null;
int i = 0;
arg = argv[i];
if (arg.equals("-p")) {
i++;
String parserName = argv[i];
try {
ClassLoader cl = ObjectFactory.findClassLoader();
parserConfiguration = (XMLParserConfiguration)ObjectFactory.newInstance(parserName, cl, true);
}
catch (Exception e) {
parserConfiguration = null;
System.err.println("error: Unable to instantiate parser configuration ("+parserName+")");
}
i++;
}
arg = argv[i];
Vector externalDTDs = null;
if (arg.equals("-d")) {
externalDTDs= new Vector();
i++;
while (i < argv.length && !(arg = argv[i]).startsWith("-")) {
externalDTDs.addElement(arg);
i++;
}
if (externalDTDs.size() == 0) {
printUsage();
System.exit(1);
}
}
Vector schemas = null;
boolean schemaFullChecking = DEFAULT_SCHEMA_FULL_CHECKING;
boolean honourAllSchemaLocations = DEFAULT_HONOUR_ALL_SCHEMA_LOCATIONS;
if(i < argv.length) {
arg = argv[i];
if (arg.equals("-f")) {
schemaFullChecking = true;
i++;
arg = argv[i];
}
else if (arg.equals("-F")) {
schemaFullChecking = false;
i++;
arg = argv[i];
}
if (arg.equals("-hs")) {
honourAllSchemaLocations = true;
i++;
arg = argv[i];
}
else if (arg.equals("-HS")) {
honourAllSchemaLocations = false;
i++;
arg = argv[i];
}
if (arg.equals("-a")) {
if(externalDTDs != null) {
printUsage();
System.exit(1);
}
schemas= new Vector();
i++;
while (i < argv.length && !(arg = argv[i]).startsWith("-")) {
schemas.addElement(arg);
i++;
}
if (schemas.size() == 0) {
printUsage();
System.exit(1);
}
}
}
Vector ifiles = null;
if (i < argv.length) {
if (!arg.equals("-i")) {
printUsage();
System.exit(1);
}
i++;
ifiles = new Vector();
while (i < argv.length && !(arg = argv[i]).startsWith("-")) {
ifiles.addElement(arg);
i++;
}
if (ifiles.size() == 0 || i != argv.length) {
printUsage();
System.exit(1);
}
}
SymbolTable sym = new SymbolTable(BIG_PRIME);
XMLGrammarPreparser preparser = new XMLGrammarPreparser(sym);
XMLGrammarPoolImpl grammarPool = new XMLGrammarPoolImpl();
boolean isDTD = false;
if(externalDTDs != null) {
preparser.registerPreparser(XMLGrammarDescription.XML_DTD, null);
isDTD = true;
} else if(schemas != null) {
preparser.registerPreparser(XMLGrammarDescription.XML_SCHEMA, null);
isDTD = false;
} else {
System.err.println("No schema or DTD specified!");
System.exit(1);
}
preparser.setProperty(GRAMMAR_POOL, grammarPool);
preparser.setFeature(NAMESPACES_FEATURE_ID, true);
preparser.setFeature(VALIDATION_FEATURE_ID, true);
preparser.setFeature(SCHEMA_VALIDATION_FEATURE_ID, true);
preparser.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, schemaFullChecking);
preparser.setFeature(HONOUR_ALL_SCHEMA_LOCATIONS_ID, honourAllSchemaLocations);
try {
if(isDTD) {
for (i = 0; i < externalDTDs.size(); i++) {
Grammar g = preparser.preparseGrammar(XMLGrammarDescription.XML_DTD, stringToXIS((String)externalDTDs.elementAt(i)));
}
} else {
for (i = 0; i < schemas.size(); i++) {
Grammar g = preparser.preparseGrammar(XMLGrammarDescription.XML_SCHEMA, stringToXIS((String)schemas.elementAt(i)));
}
}
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
if (parserConfiguration == null) {
parserConfiguration = new XIncludeAwareParserConfiguration(sym, grammarPool);
}
else {
parserConfiguration.setProperty(SYMBOL_TABLE, sym);
parserConfiguration.setProperty(GRAMMAR_POOL, grammarPool);
}
try{
parserConfiguration.setFeature(NAMESPACES_FEATURE_ID, true);
parserConfiguration.setFeature(VALIDATION_FEATURE_ID, true);
parserConfiguration.setFeature(SCHEMA_VALIDATION_FEATURE_ID, true);
parserConfiguration.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, schemaFullChecking);
parserConfiguration.setFeature(HONOUR_ALL_SCHEMA_LOCATIONS_ID, honourAllSchemaLocations);
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
if (ifiles != null) {
try {
for (i = 0; i < ifiles.size(); i++) {
parserConfiguration.parse(stringToXIS((String)ifiles.elementAt(i)));
}
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
}
}
|
public final ProcessorResult processAttribute(final Arguments arguments, final Element element, final String attributeName) {
final RemovalType removalType = getRemovalType(arguments, element, attributeName);
if (removalType == null) {
return ProcessorResult.OK;
}
switch (removalType) {
case NONE:
return ProcessorResult.OK;
case ALL:
element.getParent().removeChild(element);
return ProcessorResult.OK;
case ALLBUTFIRST:
final List<Node> children = element.getChildren();
final List<Node> newChildren = new ArrayList<Node>(children.size());
boolean childElementFound = false;
for (final Node child : children) {
if (child instanceof Element) {
if (!childElementFound) {
newChildren.add(child);
childElementFound = true;
}
} else {
newChildren.add(child);
}
}
element.setChildren(newChildren);
element.removeAttribute(attributeName);
return ProcessorResult.OK;
case ELEMENT:
element.getParent().extractChild(element);
return ProcessorResult.OK;
case BODY:
element.clearChildren();
element.removeAttribute(attributeName);
return ProcessorResult.OK;
}
return ProcessorResult.OK;
}
| public final ProcessorResult processAttribute(final Arguments arguments, final Element element, final String attributeName) {
final RemovalType removalType = getRemovalType(arguments, element, attributeName);
if (removalType == null) {
return ProcessorResult.OK;
}
switch (removalType) {
case NONE:
element.removeAttribute(attributeName);
return ProcessorResult.OK;
case ALL:
element.getParent().removeChild(element);
return ProcessorResult.OK;
case ALLBUTFIRST:
final List<Node> children = element.getChildren();
final List<Node> newChildren = new ArrayList<Node>(children.size());
boolean childElementFound = false;
for (final Node child : children) {
if (child instanceof Element) {
if (!childElementFound) {
newChildren.add(child);
childElementFound = true;
}
} else {
newChildren.add(child);
}
}
element.setChildren(newChildren);
element.removeAttribute(attributeName);
return ProcessorResult.OK;
case ELEMENT:
element.getParent().extractChild(element);
return ProcessorResult.OK;
case BODY:
element.clearChildren();
element.removeAttribute(attributeName);
return ProcessorResult.OK;
}
return ProcessorResult.OK;
}
|
public boolean handleTransfer(JTextComponent targetComponent) {
String code = NbBundle.getMessage( Circle.class, "TEMPLATE_Text" );
CodeTemplateManager ctm = CodeTemplateManager.get( targetComponent.getDocument());
CodeTemplate template = ctm.createTemporary( code );
template.insert( targetComponent );
Util.addImport( targetComponent, "javafx.scene.text.Text" );
Util.addImport( targetComponent, "javafx.scene.Font" );
Util.addImport( targetComponent, "javafx.scene.FontStyle" );
return true;
}
| public boolean handleTransfer(JTextComponent targetComponent) {
String code = NbBundle.getMessage( Circle.class, "TEMPLATE_Text" );
CodeTemplateManager ctm = CodeTemplateManager.get( targetComponent.getDocument());
CodeTemplate template = ctm.createTemporary( code );
template.insert( targetComponent );
Util.addImport( targetComponent, "javafx.scene.text.Text" );
Util.addImport( targetComponent, "javafx.scene.text.Font" );
return true;
}
|
protected Object doInBackground(Object... params) {
int updatedRows = 0;
boolean serverUpdated = false;
boolean netOn = Util.isNetworkOn(mContext);
try {
String sessionId = ((SugarCrmApp) SugarCrmApp.app).getSessionId();
String url = SugarCrmSettings.getSugarRestUrl(mContext);
ContentValues values = new ContentValues();
String updatedBeanId = null;
if (netOn) {
switch (mCommand) {
case Util.INSERT:
if (mUri.getPathSegments().size() >= 3) {
updatedBeanId = RestUtil.setEntry(url, sessionId, mModuleName, mUpdateNameValueMap);
if (updatedBeanId != null) {
mParentModuleName = mUri.getPathSegments().get(0);
String rowId = mUri.getPathSegments().get(1);
mBeanId = mDbHelper.lookupBeanId(mParentModuleName, rowId);
mLinkFieldName = mDbHelper.getLinkfieldName(mModuleName);
RelationshipStatus status = RestUtil.setRelationship(url, sessionId, mParentModuleName, mBeanId, mLinkFieldName, new String[] { updatedBeanId }, new LinkedHashMap<String, String>(), Util.EXCLUDE_DELETED_ITEMS);
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.i(TAG, "created: " + status.getCreatedCount() + " failed: "
+ status.getFailedCount()
+ "deleted: "
+ status.getDeletedCount());
}
if (status.getCreatedCount() >= 1) {
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.i(TAG, "Relationship is also set!");
}
serverUpdated = true;
} else {
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.i(TAG, "setRelationship failed!");
}
serverUpdated = false;
}
} else {
serverUpdated = false;
}
} else {
updatedBeanId = RestUtil.setEntry(url, sessionId, mModuleName, mUpdateNameValueMap);
if (updatedBeanId != null) {
if (!Util.ACCOUNTS.equals(mModuleName)) {
String accountName = mUpdateNameValueMap.get(ModuleFields.ACCOUNT_NAME);
if (!TextUtils.isEmpty(accountName)) {
SQLiteDatabase db = mDbHelper.getReadableDatabase();
String selection = AccountsColumns.NAME + "='" + accountName
+ "'";
Cursor cursor = db.query(DatabaseHelper.ACCOUNTS_TABLE_NAME, Accounts.LIST_PROJECTION, selection, null, null, null, null);
cursor.moveToFirst();
String newAccountBeanId = cursor.getString(1);
cursor.close();
mLinkFieldName = mDbHelper.getLinkfieldName(mModuleName);
RelationshipStatus status = RestUtil.setRelationship(url, sessionId, Util.ACCOUNTS, newAccountBeanId, mLinkFieldName, new String[] { updatedBeanId }, new LinkedHashMap<String, String>(), Util.EXCLUDE_DELETED_ITEMS);
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "created: " + status.getCreatedCount()
+ " failed: "
+ status.getFailedCount()
+ " deleted: "
+ status.getDeletedCount());
if (status.getCreatedCount() >= 1) {
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "Relationship is also set!");
serverUpdated = true;
} else {
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "setRelationship failed!");
serverUpdated = false;
}
}
} else {
serverUpdated = true;
}
} else {
serverUpdated = false;
}
}
break;
case Util.UPDATE:
String serverUpdatedBeanId = null;
if (mUri.getPathSegments().size() >= 3) {
mParentModuleName = mUri.getPathSegments().get(0);
String rowId = mUri.getPathSegments().get(1);
mBeanId = mDbHelper.lookupBeanId(mParentModuleName, rowId);
String moduleName = mUri.getPathSegments().get(2);
rowId = mUri.getPathSegments().get(3);
updatedBeanId = mDbHelper.lookupBeanId(moduleName, rowId);
mLinkFieldName = mDbHelper.getLinkfieldName(moduleName);
serverUpdatedBeanId = RestUtil.setEntry(url, sessionId, moduleName, mUpdateNameValueMap);
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "updatedBeanId : " + updatedBeanId
+ " serverUpdatedBeanId : "
+ serverUpdatedBeanId);
if (serverUpdatedBeanId.equals(updatedBeanId)) {
String accountName = mUpdateNameValueMap.get(ModuleFields.ACCOUNT_NAME);
if (!TextUtils.isEmpty(accountName)) {
SQLiteDatabase db = mDbHelper.getReadableDatabase();
String selection = AccountsColumns.NAME + "='" + accountName + "'";
Cursor cursor = db.query(DatabaseHelper.ACCOUNTS_TABLE_NAME, Accounts.LIST_PROJECTION, selection, null, null, null, null);
cursor.moveToFirst();
String newAccountBeanId = cursor.getString(1);
cursor.close();
selection = mDbHelper.getAccountRelationsSelection(moduleName)
+ "=" + rowId + " AND "
+ ModuleFields.DELETED + "="
+ Util.EXCLUDE_DELETED_ITEMS;
cursor = db.query(mDbHelper.getAccountRelationsTableName(moduleName), new String[] { ModuleFields.ACCOUNT_ID }, selection, null, null, null, null);
String accountRowId = null;
if (cursor.moveToFirst()) {
accountRowId = cursor.getString(0);
}
cursor.close();
String accountBeanId = null;
if (!TextUtils.isEmpty(accountRowId)) {
selection = AccountsColumns.ID + "=" + accountRowId;
cursor = db.query(DatabaseHelper.ACCOUNTS_TABLE_NAME, new String[] { AccountsColumns.BEAN_ID }, selection, null, null, null, null);
cursor.moveToFirst();
accountBeanId = cursor.getString(0);
cursor.close();
if (!accountBeanId.equals(newAccountBeanId)) {
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "updating delete flag for relationship with account bean id : "
+ accountBeanId
+ " linkFieldName : "
+ mDbHelper.getLinkfieldName(mModuleName)
+ " bean Id : "
+ updatedBeanId);
RelationshipStatus status = RestUtil.setRelationship(url, sessionId, Util.ACCOUNTS, accountBeanId, mLinkFieldName, new String[] { updatedBeanId }, new LinkedHashMap<String, String>(), Util.DELETED_ITEM);
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "updating delete flag for relationship is also set!");
}
}
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, "updating relationship with parent module : "
+ mParentModuleName
+ " parent bean Id : "
+ mBeanId);
Log.d(TAG, "updating relationship with link field name : "
+ mLinkFieldName
+ " updated bean Id : "
+ updatedBeanId);
}
RelationshipStatus status = RestUtil.setRelationship(url, sessionId, mParentModuleName, mBeanId, mLinkFieldName, new String[] { updatedBeanId }, new LinkedHashMap<String, String>(), Util.EXCLUDE_DELETED_ITEMS);
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "created: " + status.getCreatedCount() + " failed: "
+ status.getFailedCount()
+ " deleted: "
+ status.getDeletedCount());
if (status.getCreatedCount() >= 1) {
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, "Relationship is also set!");
}
serverUpdated = true;
} else {
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, "setRelationship failed!");
}
serverUpdated = false;
}
db.close();
}
} else {
serverUpdated = false;
}
} else {
mModuleName = mUri.getPathSegments().get(0);
String rowId = mUri.getPathSegments().get(1);
mBeanId = mDbHelper.lookupBeanId(mModuleName, rowId);
mUpdateNameValueMap.put(SugarCRMContent.SUGAR_BEAN_ID, mBeanId);
updatedBeanId = RestUtil.setEntry(url, sessionId, mModuleName, mUpdateNameValueMap);
mUpdateNameValueMap.remove(SugarCRMContent.SUGAR_BEAN_ID);
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "updatedBeanId : " + updatedBeanId + " mBeanId : "
+ mBeanId);
if (mBeanId.equals(updatedBeanId)) {
if (!Util.ACCOUNTS.equals(mModuleName)) {
String accountName = mUpdateNameValueMap.get(ModuleFields.ACCOUNT_NAME);
if (!TextUtils.isEmpty(accountName)) {
SQLiteDatabase db = mDbHelper.getReadableDatabase();
String selection = AccountsColumns.NAME + "='" + accountName
+ "'";
Cursor cursor = db.query(DatabaseHelper.ACCOUNTS_TABLE_NAME, Accounts.LIST_PROJECTION, selection, null, null, null, null);
cursor.moveToFirst();
String newAccountBeanId = cursor.getString(1);
cursor.close();
selection = mDbHelper.getAccountRelationsSelection(mModuleName)
+ "=" + rowId + " AND "
+ ModuleFields.DELETED + "="
+ Util.EXCLUDE_DELETED_ITEMS;
cursor = db.query(mDbHelper.getAccountRelationsTableName(mModuleName), new String[] { ModuleFields.ACCOUNT_ID }, selection, null, null, null, null);
String accountRowId = null;
if (cursor.moveToFirst()) {
accountRowId = cursor.getString(0);
}
cursor.close();
String accountBeanId = null;
if (!TextUtils.isEmpty(accountRowId)) {
selection = AccountsColumns.ID + "=" + accountRowId;
cursor = db.query(DatabaseHelper.ACCOUNTS_TABLE_NAME, new String[] { AccountsColumns.BEAN_ID }, selection, null, null, null, null);
cursor.moveToFirst();
accountBeanId = cursor.getString(0);
cursor.close();
if (!accountBeanId.equals(newAccountBeanId)) {
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "updating delete flag for relationship with account bean id : "
+ accountBeanId
+ " linkFieldName : "
+ mDbHelper.getLinkfieldName(mModuleName)
+ " bean Id : "
+ updatedBeanId);
RelationshipStatus status = RestUtil.setRelationship(url, sessionId, Util.ACCOUNTS, accountBeanId, mDbHelper.getLinkfieldName(mModuleName), new String[] { updatedBeanId }, new LinkedHashMap<String, String>(), Util.DELETED_ITEM);
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "updating delete flag for relationship is also set!");
}
}
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, "updating relationship with parent module : "
+ Util.ACCOUNTS
+ " parent bean Id : "
+ newAccountBeanId);
Log.d(TAG, "updating relationship with link field name : "
+ mDbHelper.getLinkfieldName(mModuleName)
+ " updated bean Id : "
+ updatedBeanId);
}
RelationshipStatus status = RestUtil.setRelationship(url, sessionId, Util.ACCOUNTS, newAccountBeanId, mDbHelper.getLinkfieldName(mModuleName), new String[] { updatedBeanId }, new LinkedHashMap<String, String>(), Util.EXCLUDE_DELETED_ITEMS);
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "created: " + status.getCreatedCount()
+ " failed: "
+ status.getFailedCount()
+ " deleted: "
+ status.getDeletedCount());
if (status.getCreatedCount() >= 1) {
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "Relationship is also set!");
serverUpdated = true;
} else {
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "setRelationship failed!");
serverUpdated = false;
}
db.close();
}
} else {
serverUpdated = true;
}
} else {
serverUpdated = false;
}
}
break;
case Util.DELETE:
mModuleName = mUri.getPathSegments().get(0);
String rowId = mUri.getPathSegments().get(1);
mBeanId = mDbHelper.lookupBeanId(mModuleName, rowId);
mUpdateNameValueMap.put(SugarCRMContent.SUGAR_BEAN_ID, mBeanId);
updatedBeanId = RestUtil.setEntry(url, sessionId, mModuleName, mUpdateNameValueMap);
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "updatedBeanId : " + updatedBeanId + " mBeanId : " + mBeanId);
mUpdateNameValueMap.remove(SugarCRMContent.SUGAR_BEAN_ID);
if (mBeanId.equals(updatedBeanId)) {
serverUpdated = true;
} else {
serverUpdated = false;
}
break;
}
}
switch (mCommand) {
case Util.INSERT:
for (String key : mUpdateNameValueMap.keySet()) {
values.put(key, mUpdateNameValueMap.get(key));
}
if (serverUpdated) {
values.put(SugarCRMContent.SUGAR_BEAN_ID, updatedBeanId);
Uri insertResultUri = mContext.getContentResolver().insert(mUri, values);
Log.i(TAG, "insertResultURi - " + insertResultUri);
updatedRows = 1;
} else {
values.put(SugarCRMContent.SUGAR_BEAN_ID, "Sync" + UUID.randomUUID());
Uri insertResultUri = mContext.getContentResolver().insert(mUri, values);
updatedRows = 1;
Log.i(TAG, "insertResultURi - " + insertResultUri);
insertSyncRecord(insertResultUri);
}
break;
case Util.UPDATE:
for (String key : mUpdateNameValueMap.keySet()) {
values.put(key, mUpdateNameValueMap.get(key));
}
if (serverUpdated)
updatedRows = mContext.getContentResolver().update(mUri, values, null, null);
if (!serverUpdated && updatedRows > 0) {
updateSyncRecord();
}
break;
case Util.DELETE:
if (serverUpdated) {
updatedRows = mContext.getContentResolver().delete(mUri, null, null);
} else {
values.put(ModuleFields.DELETED, Util.DELETED_ITEM);
updatedRows = mContext.getContentResolver().update(mUri, values, null, null);
if (updatedRows > 0)
updateSyncRecord();
}
break;
}
} catch (Exception e) {
Log.e(TAG, e.getMessage(), e);
sendUpdateStatus(netOn, serverUpdated, updatedRows);
}
mDbHelper.close();
sendUpdateStatus(netOn, serverUpdated, updatedRows);
return null;
}
| protected Object doInBackground(Object... params) {
int updatedRows = 0;
boolean serverUpdated = false;
boolean netOn = Util.isNetworkOn(mContext);
try {
String sessionId = ((SugarCrmApp) SugarCrmApp.app).getSessionId();
String url = SugarCrmSettings.getSugarRestUrl(mContext);
ContentValues values = new ContentValues();
String updatedBeanId = null;
if (netOn) {
switch (mCommand) {
case Util.INSERT:
if (mUri.getPathSegments().size() >= 3) {
updatedBeanId = RestUtil.setEntry(url, sessionId, mModuleName, mUpdateNameValueMap);
if (updatedBeanId != null) {
mParentModuleName = mUri.getPathSegments().get(0);
String rowId = mUri.getPathSegments().get(1);
mBeanId = mDbHelper.lookupBeanId(mParentModuleName, rowId);
mLinkFieldName = mDbHelper.getLinkfieldName(mModuleName);
RelationshipStatus status = RestUtil.setRelationship(url, sessionId, mParentModuleName, mBeanId, mLinkFieldName, new String[] { updatedBeanId }, new LinkedHashMap<String, String>(), Util.EXCLUDE_DELETED_ITEMS);
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.i(TAG, "created: " + status.getCreatedCount() + " failed: "
+ status.getFailedCount()
+ "deleted: "
+ status.getDeletedCount());
}
if (status.getCreatedCount() >= 1) {
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.i(TAG, "Relationship is also set!");
}
serverUpdated = true;
} else {
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.i(TAG, "setRelationship failed!");
}
serverUpdated = false;
}
} else {
serverUpdated = false;
}
} else {
updatedBeanId = RestUtil.setEntry(url, sessionId, mModuleName, mUpdateNameValueMap);
if (updatedBeanId != null) {
if (!Util.ACCOUNTS.equals(mModuleName)) {
String accountName = mUpdateNameValueMap.get(ModuleFields.ACCOUNT_NAME);
if (!TextUtils.isEmpty(accountName)) {
SQLiteDatabase db = mDbHelper.getReadableDatabase();
String selection = AccountsColumns.NAME + "='" + accountName
+ "'";
Cursor cursor = db.query(DatabaseHelper.ACCOUNTS_TABLE_NAME, Accounts.LIST_PROJECTION, selection, null, null, null, null);
cursor.moveToFirst();
String newAccountBeanId = cursor.getString(1);
cursor.close();
mLinkFieldName = mDbHelper.getLinkfieldName(mModuleName);
RelationshipStatus status = RestUtil.setRelationship(url, sessionId, Util.ACCOUNTS, newAccountBeanId, mLinkFieldName, new String[] { updatedBeanId }, new LinkedHashMap<String, String>(), Util.EXCLUDE_DELETED_ITEMS);
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "created: " + status.getCreatedCount()
+ " failed: "
+ status.getFailedCount()
+ " deleted: "
+ status.getDeletedCount());
if (status.getCreatedCount() >= 1) {
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "Relationship is also set!");
serverUpdated = true;
} else {
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "setRelationship failed!");
serverUpdated = false;
}
}
} else {
serverUpdated = true;
}
} else {
serverUpdated = false;
}
}
break;
case Util.UPDATE:
String serverUpdatedBeanId = null;
if (mUri.getPathSegments().size() >= 3) {
mParentModuleName = mUri.getPathSegments().get(0);
String rowId = mUri.getPathSegments().get(1);
mBeanId = mDbHelper.lookupBeanId(mParentModuleName, rowId);
String moduleName = mUri.getPathSegments().get(2);
rowId = mUri.getPathSegments().get(3);
updatedBeanId = mDbHelper.lookupBeanId(moduleName, rowId);
mLinkFieldName = mDbHelper.getLinkfieldName(moduleName);
serverUpdatedBeanId = RestUtil.setEntry(url, sessionId, moduleName, mUpdateNameValueMap);
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "updatedBeanId : " + updatedBeanId
+ " serverUpdatedBeanId : "
+ serverUpdatedBeanId);
if (serverUpdatedBeanId.equals(updatedBeanId)) {
String accountName = mUpdateNameValueMap.get(ModuleFields.ACCOUNT_NAME);
if (!TextUtils.isEmpty(accountName)) {
SQLiteDatabase db = mDbHelper.getReadableDatabase();
String selection = AccountsColumns.NAME + "='" + accountName + "'";
Cursor cursor = db.query(DatabaseHelper.ACCOUNTS_TABLE_NAME, Accounts.LIST_PROJECTION, selection, null, null, null, null);
cursor.moveToFirst();
String newAccountBeanId = cursor.getString(1);
cursor.close();
selection = mDbHelper.getAccountRelationsSelection(moduleName)
+ "=" + rowId + " AND "
+ ModuleFields.DELETED + "="
+ Util.EXCLUDE_DELETED_ITEMS;
cursor = db.query(mDbHelper.getAccountRelationsTableName(moduleName), new String[] { ModuleFields.ACCOUNT_ID }, selection, null, null, null, null);
String accountRowId = null;
if (cursor.moveToFirst()) {
accountRowId = cursor.getString(0);
}
cursor.close();
String accountBeanId = null;
if (!TextUtils.isEmpty(accountRowId)) {
selection = AccountsColumns.ID + "=" + accountRowId;
cursor = db.query(DatabaseHelper.ACCOUNTS_TABLE_NAME, new String[] { AccountsColumns.BEAN_ID }, selection, null, null, null, null);
cursor.moveToFirst();
accountBeanId = cursor.getString(0);
cursor.close();
if (!accountBeanId.equals(newAccountBeanId)) {
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "updating delete flag for relationship with account bean id : "
+ accountBeanId
+ " linkFieldName : "
+ mDbHelper.getLinkfieldName(mModuleName)
+ " bean Id : "
+ updatedBeanId);
RelationshipStatus status = RestUtil.setRelationship(url, sessionId, Util.ACCOUNTS, accountBeanId, mLinkFieldName, new String[] { updatedBeanId }, new LinkedHashMap<String, String>(), Util.DELETED_ITEM);
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "updating delete flag for relationship is also set!");
}
}
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, "updating relationship with parent module : "
+ mParentModuleName
+ " parent bean Id : "
+ mBeanId);
Log.d(TAG, "updating relationship with link field name : "
+ mLinkFieldName
+ " updated bean Id : "
+ updatedBeanId);
}
RelationshipStatus status = RestUtil.setRelationship(url, sessionId, mParentModuleName, newAccountBeanId, mLinkFieldName, new String[] { updatedBeanId }, new LinkedHashMap<String, String>(), Util.EXCLUDE_DELETED_ITEMS);
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "created: " + status.getCreatedCount() + " failed: "
+ status.getFailedCount()
+ " deleted: "
+ status.getDeletedCount());
if (status.getCreatedCount() >= 1) {
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, "Relationship is also set!");
}
serverUpdated = true;
} else {
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, "setRelationship failed!");
}
serverUpdated = false;
}
db.close();
}
} else {
serverUpdated = false;
}
} else {
mModuleName = mUri.getPathSegments().get(0);
String rowId = mUri.getPathSegments().get(1);
mBeanId = mDbHelper.lookupBeanId(mModuleName, rowId);
mUpdateNameValueMap.put(SugarCRMContent.SUGAR_BEAN_ID, mBeanId);
updatedBeanId = RestUtil.setEntry(url, sessionId, mModuleName, mUpdateNameValueMap);
mUpdateNameValueMap.remove(SugarCRMContent.SUGAR_BEAN_ID);
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "updatedBeanId : " + updatedBeanId + " mBeanId : "
+ mBeanId);
if (mBeanId.equals(updatedBeanId)) {
if (!Util.ACCOUNTS.equals(mModuleName)) {
String accountName = mUpdateNameValueMap.get(ModuleFields.ACCOUNT_NAME);
if (!TextUtils.isEmpty(accountName)) {
SQLiteDatabase db = mDbHelper.getReadableDatabase();
String selection = AccountsColumns.NAME + "='" + accountName
+ "'";
Cursor cursor = db.query(DatabaseHelper.ACCOUNTS_TABLE_NAME, Accounts.LIST_PROJECTION, selection, null, null, null, null);
cursor.moveToFirst();
String newAccountBeanId = cursor.getString(1);
cursor.close();
selection = mDbHelper.getAccountRelationsSelection(mModuleName)
+ "=" + rowId + " AND "
+ ModuleFields.DELETED + "="
+ Util.EXCLUDE_DELETED_ITEMS;
cursor = db.query(mDbHelper.getAccountRelationsTableName(mModuleName), new String[] { ModuleFields.ACCOUNT_ID }, selection, null, null, null, null);
String accountRowId = null;
if (cursor.moveToFirst()) {
accountRowId = cursor.getString(0);
}
cursor.close();
String accountBeanId = null;
if (!TextUtils.isEmpty(accountRowId)) {
selection = AccountsColumns.ID + "=" + accountRowId;
cursor = db.query(DatabaseHelper.ACCOUNTS_TABLE_NAME, new String[] { AccountsColumns.BEAN_ID }, selection, null, null, null, null);
cursor.moveToFirst();
accountBeanId = cursor.getString(0);
cursor.close();
if (!accountBeanId.equals(newAccountBeanId)) {
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "updating delete flag for relationship with account bean id : "
+ accountBeanId
+ " linkFieldName : "
+ mDbHelper.getLinkfieldName(mModuleName)
+ " bean Id : "
+ updatedBeanId);
RelationshipStatus status = RestUtil.setRelationship(url, sessionId, Util.ACCOUNTS, accountBeanId, mDbHelper.getLinkfieldName(mModuleName), new String[] { updatedBeanId }, new LinkedHashMap<String, String>(), Util.DELETED_ITEM);
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "updating delete flag for relationship is also set!");
}
}
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, "updating relationship with parent module : "
+ Util.ACCOUNTS
+ " parent bean Id : "
+ newAccountBeanId);
Log.d(TAG, "updating relationship with link field name : "
+ mDbHelper.getLinkfieldName(mModuleName)
+ " updated bean Id : "
+ updatedBeanId);
}
RelationshipStatus status = RestUtil.setRelationship(url, sessionId, Util.ACCOUNTS, newAccountBeanId, mDbHelper.getLinkfieldName(mModuleName), new String[] { updatedBeanId }, new LinkedHashMap<String, String>(), Util.EXCLUDE_DELETED_ITEMS);
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "created: " + status.getCreatedCount()
+ " failed: "
+ status.getFailedCount()
+ " deleted: "
+ status.getDeletedCount());
if (status.getCreatedCount() >= 1) {
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "Relationship is also set!");
serverUpdated = true;
} else {
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "setRelationship failed!");
serverUpdated = false;
}
db.close();
}
} else {
serverUpdated = true;
}
} else {
serverUpdated = false;
}
}
break;
case Util.DELETE:
mModuleName = mUri.getPathSegments().get(0);
String rowId = mUri.getPathSegments().get(1);
mBeanId = mDbHelper.lookupBeanId(mModuleName, rowId);
mUpdateNameValueMap.put(SugarCRMContent.SUGAR_BEAN_ID, mBeanId);
updatedBeanId = RestUtil.setEntry(url, sessionId, mModuleName, mUpdateNameValueMap);
if (Log.isLoggable(TAG, Log.DEBUG))
Log.d(TAG, "updatedBeanId : " + updatedBeanId + " mBeanId : " + mBeanId);
mUpdateNameValueMap.remove(SugarCRMContent.SUGAR_BEAN_ID);
if (mBeanId.equals(updatedBeanId)) {
serverUpdated = true;
} else {
serverUpdated = false;
}
break;
}
}
switch (mCommand) {
case Util.INSERT:
for (String key : mUpdateNameValueMap.keySet()) {
values.put(key, mUpdateNameValueMap.get(key));
}
if (serverUpdated) {
values.put(SugarCRMContent.SUGAR_BEAN_ID, updatedBeanId);
Uri insertResultUri = mContext.getContentResolver().insert(mUri, values);
Log.i(TAG, "insertResultURi - " + insertResultUri);
updatedRows = 1;
} else {
values.put(SugarCRMContent.SUGAR_BEAN_ID, "Sync" + UUID.randomUUID());
Uri insertResultUri = mContext.getContentResolver().insert(mUri, values);
updatedRows = 1;
Log.i(TAG, "insertResultURi - " + insertResultUri);
insertSyncRecord(insertResultUri);
}
break;
case Util.UPDATE:
for (String key : mUpdateNameValueMap.keySet()) {
values.put(key, mUpdateNameValueMap.get(key));
}
if (serverUpdated)
updatedRows = mContext.getContentResolver().update(mUri, values, null, null);
if (!serverUpdated && updatedRows > 0) {
updateSyncRecord();
}
break;
case Util.DELETE:
if (serverUpdated) {
updatedRows = mContext.getContentResolver().delete(mUri, null, null);
} else {
values.put(ModuleFields.DELETED, Util.DELETED_ITEM);
updatedRows = mContext.getContentResolver().update(mUri, values, null, null);
if (updatedRows > 0)
updateSyncRecord();
}
break;
}
} catch (Exception e) {
Log.e(TAG, e.getMessage(), e);
sendUpdateStatus(netOn, serverUpdated, updatedRows);
}
mDbHelper.close();
sendUpdateStatus(netOn, serverUpdated, updatedRows);
return null;
}
|
private Object addConstraint(IntVariable v1, BinaryOp op, Object o2) {
switch (op) {
case BITAND:
if (o2 instanceof IntVariable) {
v1.bitand((IntVariable) o2);
} else if (o2 instanceof Integer) {
v1.bitand((Integer) o2);
} else {
break;
}
case EQ:
if (o2 instanceof IntVariable) {
v1.equals((IntVariable) o2);
} else if (o2 instanceof Integer) {
v1.equals((Integer) o2);
} else {
break;
}
return v1;
case GE:
if (o2 instanceof IntVariable) {
v1.ge((IntVariable) o2);
} else if (o2 instanceof Integer) {
v1.ge((Integer) o2);
} else {
break;
}
return v1;
case GT:
if (o2 instanceof IntVariable) {
v1.gt((IntVariable) o2);
} else if (o2 instanceof Integer) {
v1.gt((Integer) o2);
} else {
break;
}
return v1;
case LE:
if (o2 instanceof IntVariable) {
v1.le((IntVariable) o2);
} else if (o2 instanceof Integer) {
v1.le((Integer) o2);
} else {
break;
}
return v1;
case LT:
if (o2 instanceof IntVariable) {
v1.lt((IntVariable) o2);
} else if (o2 instanceof Integer) {
v1.lt((Integer) o2);
} else {
break;
}
return v1;
case NE:
if (o2 instanceof IntVariable) {
v1.notEquals((IntVariable) o2);
} else if (o2 instanceof Integer) {
v1.notEquals((Integer) o2);
} else {
break;
}
return v1;
}
return null;
}
| private Object addConstraint(IntVariable v1, BinaryOp op, Object o2) {
switch (op) {
case BITAND:
if (o2 instanceof IntVariable) {
v1.bitand((IntVariable) o2);
} else if (o2 instanceof Integer) {
v1.bitand((Integer) o2);
} else {
break;
}
case EQ:
if (o2 instanceof IntVariable) {
v1.equals((IntVariable) o2);
} else if (o2 instanceof Integer) {
v1.equals(((Integer) o2).intValue());
} else {
break;
}
return v1;
case GE:
if (o2 instanceof IntVariable) {
v1.ge((IntVariable) o2);
} else if (o2 instanceof Integer) {
v1.ge((Integer) o2);
} else {
break;
}
return v1;
case GT:
if (o2 instanceof IntVariable) {
v1.gt((IntVariable) o2);
} else if (o2 instanceof Integer) {
v1.gt((Integer) o2);
} else {
break;
}
return v1;
case LE:
if (o2 instanceof IntVariable) {
v1.le((IntVariable) o2);
} else if (o2 instanceof Integer) {
v1.le((Integer) o2);
} else {
break;
}
return v1;
case LT:
if (o2 instanceof IntVariable) {
v1.lt((IntVariable) o2);
} else if (o2 instanceof Integer) {
v1.lt((Integer) o2);
} else {
break;
}
return v1;
case NE:
if (o2 instanceof IntVariable) {
v1.notEquals((IntVariable) o2);
} else if (o2 instanceof Integer) {
v1.notEquals((Integer) o2);
} else {
break;
}
return v1;
}
return null;
}
|
public void process(MApplication application, EModelService modelService) {
MCommand command = null;
for (MCommand cmd : application.getCommands()) {
if (E4_TOOLING_LIVEMODEL.equals(cmd.getElementId())) {
command = cmd;
}
}
if (command == null) {
command = modelService.createModelElement(MCommand.class);
command.setElementId(E4_TOOLING_LIVEMODEL);
command.setCommandName("Show running app model");
command.setDescription("Show the running application model");
application.getCommands().add(command);
}
MHandler handler = null;
for (MHandler hdl : application.getHandlers()) {
if (E4_TOOLING_LIVEMODEL_HANDLER.equals(handler.getElementId())) {
handler = hdl;
}
}
if (handler == null) {
handler = modelService.createModelElement(MHandler.class);
handler.setElementId(E4_TOOLING_LIVEMODEL_HANDLER);
handler.setContributionURI("bundleclass://org.eclipse.e4.tools.emf.liveeditor/org.eclipse.e4.tools.emf.liveeditor.OpenLiveDialogHandler");
application.getHandlers().add(handler);
}
handler.setCommand(command);
MKeyBinding binding = null;
if (application.getBindingTables().size() <= 0) {
MBindingContext bc = null;
final List<MBindingContext> bindingContexts = application
.getBindingContexts();
if (bindingContexts.size() == 0) {
bc = modelService.createModelElement(MBindingContext.class);
bc.setElementId("org.eclipse.ui.contexts.window");
} else {
for (MBindingContext aBindingContext : bindingContexts) {
bc = aBindingContext;
if ("org.eclipse.ui.contexts.dialogAndWindow"
.equals(aBindingContext.getElementId())) {
break;
}
}
}
MBindingTable bt = modelService
.createModelElement(MBindingTable.class);
bt.setElementId("e4.tooling.livemodel.bindingTable");
bt.setBindingContext(bc);
application.getBindingTables().add(bt);
}
List<MKeyBinding> keyBindings = modelService.findElements(application,
"e4.tooling.livemodel.binding", MKeyBinding.class, null);
if (keyBindings.size() == 0) {
binding = modelService.createModelElement(MKeyBinding.class);
binding.setElementId("e4.tooling.livemodel.binding");
binding.setKeySequence("M2+M3+F9");
if (application.getBindingTables().size() > 0) {
application.getBindingTables().get(0).getBindings()
.add(binding);
}
} else {
binding = keyBindings.get(0);
}
binding.setCommand(command);
MPartDescriptor descriptor = null;
List<MPartDescriptor> descriptors = modelService.findElements(
application, "org.eclipse.e4.tools.emf.liveeditor.view",
MPartDescriptor.class, null);
if (descriptors.size() == 0) {
descriptor = modelService.createModelElement(MPartDescriptor.class);
descriptor.setCategory("org.eclipse.e4.secondaryDataStack");
descriptor.setElementId("org.eclipse.e4.tools.emf.liveeditor.view");
descriptor.getTags().add("View");
descriptor.getTags().add("categoryTag:General");
descriptor.setLabel("Live Application Model");
descriptor
.setContributionURI("bundleclass://org.eclipse.e4.tools.emf.liveeditor/org.eclipse.e4.tools.emf.liveeditor.LivePartDelegator");
descriptor
.setContributorURI("bundleclass://org.eclipse.e4.tools.emf.liveeditor");
descriptor
.setIconURI("platform:/plugin/org.eclipse.e4.tools.emf.liveeditor/icons/full/obj16/application_lightning.png");
application.getDescriptors().add(descriptor);
}
}
| public void process(MApplication application, EModelService modelService) {
MCommand command = null;
for (MCommand cmd : application.getCommands()) {
if (E4_TOOLING_LIVEMODEL.equals(cmd.getElementId())) {
command = cmd;
}
}
if (command == null) {
command = modelService.createModelElement(MCommand.class);
command.setElementId(E4_TOOLING_LIVEMODEL);
command.setCommandName("Show running app model");
command.setDescription("Show the running application model");
application.getCommands().add(command);
}
MHandler handler = null;
for (MHandler hdl : application.getHandlers()) {
if (E4_TOOLING_LIVEMODEL_HANDLER.equals(hdl.getElementId())) {
handler = hdl;
}
}
if (handler == null) {
handler = modelService.createModelElement(MHandler.class);
handler.setElementId(E4_TOOLING_LIVEMODEL_HANDLER);
handler.setContributionURI("bundleclass://org.eclipse.e4.tools.emf.liveeditor/org.eclipse.e4.tools.emf.liveeditor.OpenLiveDialogHandler");
application.getHandlers().add(handler);
}
handler.setCommand(command);
MKeyBinding binding = null;
if (application.getBindingTables().size() <= 0) {
MBindingContext bc = null;
final List<MBindingContext> bindingContexts = application
.getBindingContexts();
if (bindingContexts.size() == 0) {
bc = modelService.createModelElement(MBindingContext.class);
bc.setElementId("org.eclipse.ui.contexts.window");
} else {
for (MBindingContext aBindingContext : bindingContexts) {
bc = aBindingContext;
if ("org.eclipse.ui.contexts.dialogAndWindow"
.equals(aBindingContext.getElementId())) {
break;
}
}
}
MBindingTable bt = modelService
.createModelElement(MBindingTable.class);
bt.setElementId("e4.tooling.livemodel.bindingTable");
bt.setBindingContext(bc);
application.getBindingTables().add(bt);
}
List<MKeyBinding> keyBindings = modelService.findElements(application,
"e4.tooling.livemodel.binding", MKeyBinding.class, null);
if (keyBindings.size() == 0) {
binding = modelService.createModelElement(MKeyBinding.class);
binding.setElementId("e4.tooling.livemodel.binding");
binding.setKeySequence("M2+M3+F9");
if (application.getBindingTables().size() > 0) {
application.getBindingTables().get(0).getBindings()
.add(binding);
}
} else {
binding = keyBindings.get(0);
}
binding.setCommand(command);
MPartDescriptor descriptor = null;
List<MPartDescriptor> descriptors = modelService.findElements(
application, "org.eclipse.e4.tools.emf.liveeditor.view",
MPartDescriptor.class, null);
if (descriptors.size() == 0) {
descriptor = modelService.createModelElement(MPartDescriptor.class);
descriptor.setCategory("org.eclipse.e4.secondaryDataStack");
descriptor.setElementId("org.eclipse.e4.tools.emf.liveeditor.view");
descriptor.getTags().add("View");
descriptor.getTags().add("categoryTag:General");
descriptor.setLabel("Live Application Model");
descriptor
.setContributionURI("bundleclass://org.eclipse.e4.tools.emf.liveeditor/org.eclipse.e4.tools.emf.liveeditor.LivePartDelegator");
descriptor
.setContributorURI("bundleclass://org.eclipse.e4.tools.emf.liveeditor");
descriptor
.setIconURI("platform:/plugin/org.eclipse.e4.tools.emf.liveeditor/icons/full/obj16/application_lightning.png");
application.getDescriptors().add(descriptor);
}
}
|
private ConstrettoConfiguration buildConfig(Element element, ConfigurationContextResolver configurationContextResolver) {
ConstrettoBuilder builder = new ConstrettoBuilder(configurationContextResolver, true);
Element storeElement = DomUtils.getChildElementByTagName(element, "stores");
if (storeElement != null) {
List<Element> stores = getAllChildElements(storeElement);
for (Element store : stores) {
String tagName = store.getLocalName();
if ("properties-store".equals(tagName)) {
ConstrettoBuilder.PropertiesStoreBuilder propertiesBuilder = builder.createPropertiesStore();
List<Element> resources = DomUtils.getChildElementsByTagName(store, "resource");
for (Element resource : resources) {
String location = resource.getAttribute("location");
propertiesBuilder.addResource(Resource.create(location));
}
propertiesBuilder.done();
} else if ("encrypted-properties-store".equals(tagName)) {
ConstrettoBuilder.EncryptedPropertiesStoreBuilder propertiesBuilder = builder.createEncryptedPropertiesStore(store.getAttribute("password-property"));
List<Element> resources = DomUtils.getChildElementsByTagName(store, "resource");
for (Element resource : resources) {
String location = resource.getAttribute("location");
propertiesBuilder.addResource(Resource.create(location));
}
propertiesBuilder.done();
} else if ("ini-store".equals(tagName)) {
ConstrettoBuilder.IniFileConfigurationStoreBuilder iniBuilder = builder.createIniFileConfigurationStore();
List<Element> resources = DomUtils.getChildElementsByTagName(store, "resource");
for (Element resource : resources) {
String location = resource.getAttribute("location");
iniBuilder.addResource(Resource.create(location));
}
iniBuilder.done();
} else if ("system-properties-store".equals(tagName)) {
builder.createSystemPropertiesStore();
} else if ("object-store".equals(tagName)) {
ConstrettoBuilder.ObjectConfigurationStoreBuilder objectBuilder = builder.createObjectConfigurationStore();
List<Element> objects = DomUtils.getChildElementsByTagName(store, "object");
for (Element object : objects) {
String clazz = object.getAttribute("class");
try {
objectBuilder.addObject(Class.forName(clazz).newInstance());
} catch (Exception e) {
throw new IllegalStateException("Could not instansiate configuration source object with class [" + clazz + "]");
}
}
objectBuilder.done();
}
}
}
return builder.getConfiguration();
}
| private ConstrettoConfiguration buildConfig(Element element, ConfigurationContextResolver configurationContextResolver) {
ConstrettoBuilder builder = new ConstrettoBuilder(configurationContextResolver, true);
Element storeElement = DomUtils.getChildElementByTagName(element, "stores");
if (storeElement != null) {
List<Element> stores = getAllChildElements(storeElement);
for (Element store : stores) {
String tagName = store.getLocalName();
if ("properties-store".equals(tagName)) {
ConstrettoBuilder.PropertiesStoreBuilder propertiesBuilder = builder.createPropertiesStore();
List<Element> resources = DomUtils.getChildElementsByTagName(store, "resource");
for (Element resource : resources) {
String location = resource.getAttribute("location");
propertiesBuilder.addResource(Resource.create(location));
}
propertiesBuilder.done();
} else if ("encrypted-properties-store".equals(tagName)) {
ConstrettoBuilder.EncryptedPropertiesStoreBuilder propertiesBuilder = builder.createEncryptedPropertiesStore(store.getAttribute("password-property"));
List<Element> resources = DomUtils.getChildElementsByTagName(store, "resource");
for (Element resource : resources) {
String location = resource.getAttribute("location");
propertiesBuilder.addResource(Resource.create(location));
}
propertiesBuilder.done();
} else if ("ini-store".equals(tagName)) {
ConstrettoBuilder.IniFileConfigurationStoreBuilder iniBuilder = builder.createIniFileConfigurationStore();
List<Element> resources = DomUtils.getChildElementsByTagName(store, "resource");
for (Element resource : resources) {
String location = resource.getAttribute("location");
iniBuilder.addResource(Resource.create(location));
}
iniBuilder.done();
} else if ("system-properties-store".equals(tagName)) {
builder.createSystemPropertiesStore();
} else if ("object-store".equals(tagName)) {
ConstrettoBuilder.ObjectConfigurationStoreBuilder objectBuilder = builder.createObjectConfigurationStore();
List<Element> objects = DomUtils.getChildElementsByTagName(store, "object");
for (Element object : objects) {
String clazz = object.getAttribute("class");
try {
objectBuilder.addObject(Class.forName(clazz).newInstance());
} catch (Exception e) {
throw new IllegalStateException("Could not instantiate configuration source object with class [" + clazz + "]");
}
}
objectBuilder.done();
}
}
}
return builder.getConfiguration();
}
|
protected <T> T get(String key, ValueCreator<T> creator, T defaultValue)
{
T value = (T)cachedAttributes.get(key);
if (value == null)
{
Parameter parameter = parameters.get(key);
if (parameter != null)
{
Object paramValue = parameter.getValue();
if(parameter.isCollection())
{
if (creator instanceof CollectionValueCreator)
{
CollectionValueCreator<T> cvc = (CollectionValueCreator<T>)creator;
value = cvc.createValue((Collection<String>)paramValue);
}
else
{
log.warn("Unable to create proper value from " + creator + " for parameter: " + parameter);
}
}
else
{
value = creator.createValue(paramValue.toString());
}
cachedAttributes.put(key, value);
}
else if (defaultValue != null)
{
value = defaultValue;
cachedAttributes.put(key, value);
}
}
return value;
}
| protected <T> T get(String key, ValueCreator<T> creator, T defaultValue)
{
T value = (T)cachedAttributes.get(key);
if (value == null)
{
Parameter parameter = parameters.get(key);
if (parameter != null)
{
Object paramValue = parameter.getValue();
if(parameter.isCollection())
{
if (creator instanceof CollectionValueCreator)
{
CollectionValueCreator<T> cvc = (CollectionValueCreator<T>)creator;
value = cvc.createValue((Collection<String>)paramValue);
}
else
{
log.warn("Unable to create proper value from " + creator + " for parameter: " + parameter);
return null;
}
}
else
{
value = creator.createValue(paramValue.toString());
}
cachedAttributes.put(key, value);
}
else if (defaultValue != null)
{
value = defaultValue;
cachedAttributes.put(key, value);
}
}
return value;
}
|
private void complete(ClassOrInterface klass, ClassMirror classMirror) {
Map<MethodMirror, List<MethodMirror>> variables = new HashMap<MethodMirror, List<MethodMirror>>();
boolean isFromJDK = isFromJDK(classMirror);
boolean isCeylon = (classMirror.getAnnotation(CEYLON_CEYLON_ANNOTATION) != null);
if(klass instanceof Class == false || !((Class)klass).isOverloaded()){
addInnerClasses(klass, classMirror);
}
MethodMirror constructor = null;
if (klass instanceof LazyClass) {
constructor = ((LazyClass)klass).getConstructor();
}
Map<String, List<MethodMirror>> methods = new LinkedHashMap<String, List<MethodMirror>>();
for(MethodMirror methodMirror : classMirror.getDirectMethods()){
if(methodMirror.getAnnotation(CEYLON_IGNORE_ANNOTATION) != null)
continue;
if(methodMirror.isStaticInit())
continue;
if(isCeylon && methodMirror.isStatic())
continue;
if(isFromJDK && !methodMirror.isPublic())
continue;
String methodName = methodMirror.getName();
List<MethodMirror> homonyms = methods.get(methodName);
if (homonyms == null) {
homonyms = new LinkedList<MethodMirror>();
methods.put(methodName, homonyms);
}
homonyms.add(methodMirror);
}
for(List<MethodMirror> methodMirrors : methods.values()){
boolean isOverloaded = methodMirrors.size() > 1;
List<Declaration> overloads = (isOverloaded) ? new ArrayList<Declaration>(methodMirrors.size()) : null;
for (MethodMirror methodMirror : methodMirrors) {
String methodName = methodMirror.getName();
if(methodMirror.isConstructor()) {
if (methodMirror == constructor) {
if(!(klass instanceof LazyClass) || !((LazyClass)klass).isTopLevelObjectType())
setParameters((Class)klass, methodMirror, isCeylon, klass);
}
} else if(isGetter(methodMirror)) {
addValue(klass, methodMirror, getJavaAttributeName(methodName), isCeylon);
} else if(isSetter(methodMirror)) {
variables.put(methodMirror, methodMirrors);
} else if(isHashAttribute(methodMirror)) {
addValue(klass, methodMirror, "hash", isCeylon);
} else if(isStringAttribute(methodMirror)) {
addValue(klass, methodMirror, "string", isCeylon);
} else {
Method m = addMethod(klass, methodMirror, isCeylon, isOverloaded);
if (isOverloaded) {
overloads.add(m);
}
}
}
if (overloads != null && !overloads.isEmpty()) {
Method abstractionMethod = addMethod(klass, methodMirrors.get(0), false, false);
abstractionMethod.setAbstraction(true);
abstractionMethod.setOverloads(overloads);
abstractionMethod.setType(new UnknownType(typeFactory).getType());
}
}
for(FieldMirror fieldMirror : classMirror.getDirectFields()){
if(fieldMirror.getAnnotation(CEYLON_IGNORE_ANNOTATION) != null)
continue;
if(isCeylon && fieldMirror.isStatic())
continue;
if(isFromJDK && !fieldMirror.isPublic())
continue;
String name = fieldMirror.getName();
if(klass.getDirectMember(name, null) != null)
continue;
addValue(klass, fieldMirror, isCeylon);
}
for(Entry<MethodMirror, List<MethodMirror>> setterEntry : variables.entrySet()){
MethodMirror setter = setterEntry.getKey();
String name = getJavaAttributeName(setter.getName());
Declaration decl = klass.getMember(name, null);
boolean foundGetter = false;
if (decl != null && decl instanceof Value) {
Value value = (Value)decl;
VariableMirror setterParam = setter.getParameters().get(0);
try{
ProducedType paramType = obtainType(setterParam.getType(), setterParam, klass, VarianceLocation.INVARIANT);
if(paramType.isExactly(value.getType())){
foundGetter = true;
value.setVariable(true);
if(decl instanceof JavaBeanValue)
((JavaBeanValue)decl).setSetterName(setter.getName());
}else
logWarning("Setter parameter type for "+name+" does not match corresponding getter type, adding setter as a method");
}catch(TypeParserException x){
logError("Invalid type signature for setter of "+klass.getQualifiedNameString()+"."+setter.getName()+": "+x.getMessage());
throw x;
}
}
if(!foundGetter){
addMethod(klass, setter, isCeylon, false);
}
}
klass.setStaticallyImportable(!isCeylon && classMirror.isStatic());
setExtendedType(klass, classMirror);
setSatisfiedTypes(klass, classMirror);
setCaseTypes(klass, classMirror);
fillRefinedDeclarations(klass);
setAnnotations(klass, classMirror);
}
| private void complete(ClassOrInterface klass, ClassMirror classMirror) {
Map<MethodMirror, List<MethodMirror>> variables = new HashMap<MethodMirror, List<MethodMirror>>();
boolean isFromJDK = isFromJDK(classMirror);
boolean isCeylon = (classMirror.getAnnotation(CEYLON_CEYLON_ANNOTATION) != null);
if(klass instanceof Class == false || !((Class)klass).isOverloaded()){
addInnerClasses(klass, classMirror);
}
MethodMirror constructor = null;
if (klass instanceof LazyClass) {
constructor = ((LazyClass)klass).getConstructor();
}
Map<String, List<MethodMirror>> methods = new LinkedHashMap<String, List<MethodMirror>>();
for(MethodMirror methodMirror : classMirror.getDirectMethods()){
if(methodMirror.getAnnotation(CEYLON_IGNORE_ANNOTATION) != null)
continue;
if(methodMirror.isStaticInit())
continue;
if(isCeylon && methodMirror.isStatic())
continue;
if(isFromJDK && !methodMirror.isPublic())
continue;
String methodName = methodMirror.getName();
List<MethodMirror> homonyms = methods.get(methodName);
if (homonyms == null) {
homonyms = new LinkedList<MethodMirror>();
methods.put(methodName, homonyms);
}
homonyms.add(methodMirror);
}
for(List<MethodMirror> methodMirrors : methods.values()){
boolean isOverloaded = methodMirrors.size() > 1;
List<Declaration> overloads = (isOverloaded) ? new ArrayList<Declaration>(methodMirrors.size()) : null;
for (MethodMirror methodMirror : methodMirrors) {
String methodName = methodMirror.getName();
if(methodMirror.isConstructor()) {
if (methodMirror == constructor) {
if(!(klass instanceof LazyClass) || !((LazyClass)klass).isTopLevelObjectType())
setParameters((Class)klass, methodMirror, isCeylon, klass);
}
} else if(isGetter(methodMirror)) {
addValue(klass, methodMirror, getJavaAttributeName(methodName), isCeylon);
} else if(isSetter(methodMirror)) {
variables.put(methodMirror, methodMirrors);
} else if(isHashAttribute(methodMirror)) {
addValue(klass, methodMirror, "hash", isCeylon);
} else if(isStringAttribute(methodMirror)) {
addValue(klass, methodMirror, "string", isCeylon);
} else {
Method m = addMethod(klass, methodMirror, isCeylon, isOverloaded);
if (isOverloaded) {
overloads.add(m);
}
}
}
if (overloads != null && !overloads.isEmpty()) {
Method abstractionMethod = addMethod(klass, methodMirrors.get(0), false, false);
abstractionMethod.setAbstraction(true);
abstractionMethod.setOverloads(overloads);
abstractionMethod.setType(new UnknownType(typeFactory).getType());
}
}
for(FieldMirror fieldMirror : classMirror.getDirectFields()){
if(fieldMirror.getAnnotation(CEYLON_IGNORE_ANNOTATION) != null)
continue;
if(isCeylon && fieldMirror.isStatic())
continue;
if(isFromJDK && !fieldMirror.isPublic())
continue;
String name = fieldMirror.getName();
if(klass.getDirectMember(name, null) != null)
continue;
addValue(klass, fieldMirror, isCeylon);
}
for(Entry<MethodMirror, List<MethodMirror>> setterEntry : variables.entrySet()){
MethodMirror setter = setterEntry.getKey();
String name = getJavaAttributeName(setter.getName());
Declaration decl = klass.getMember(name, null);
boolean foundGetter = false;
if (decl != null && decl instanceof Value) {
Value value = (Value)decl;
VariableMirror setterParam = setter.getParameters().get(0);
try{
ProducedType paramType = obtainType(setterParam.getType(), setterParam, klass, VarianceLocation.INVARIANT);
if(paramType.isExactly(value.getType())){
foundGetter = true;
value.setVariable(true);
if(decl instanceof JavaBeanValue)
((JavaBeanValue)decl).setSetterName(setter.getName());
}else
logVerbose("Setter parameter type for "+name+" does not match corresponding getter type, adding setter as a method");
}catch(TypeParserException x){
logError("Invalid type signature for setter of "+klass.getQualifiedNameString()+"."+setter.getName()+": "+x.getMessage());
throw x;
}
}
if(!foundGetter){
addMethod(klass, setter, isCeylon, false);
}
}
klass.setStaticallyImportable(!isCeylon && classMirror.isStatic());
setExtendedType(klass, classMirror);
setSatisfiedTypes(klass, classMirror);
setCaseTypes(klass, classMirror);
fillRefinedDeclarations(klass);
setAnnotations(klass, classMirror);
}
|
private void initComponents() {
bindingGroup = new org.jdesktop.beansbinding.BindingGroup();
appBean = getApplicationBean();
partySummaryList = createPartySummaryList();
applicationDocumentsHelper = new org.sola.clients.beans.application.ApplicationDocumentsHelperBean();
validationResultListBean = new org.sola.clients.beans.validation.ValidationResultListBean();
popUpServices = new javax.swing.JPopupMenu();
menuAddService = new javax.swing.JMenuItem();
menuRemoveService = new javax.swing.JMenuItem();
jSeparator3 = new javax.swing.JPopupMenu.Separator();
menuMoveServiceUp = new javax.swing.JMenuItem();
menuMoveServiceDown = new javax.swing.JMenuItem();
jSeparator4 = new javax.swing.JPopupMenu.Separator();
menuViewService = new javax.swing.JMenuItem();
menuStartService = new javax.swing.JMenuItem();
menuCompleteService = new javax.swing.JMenuItem();
menuRevertService = new javax.swing.JMenuItem();
menuCancelService = new javax.swing.JMenuItem();
communicationTypes = createCommunicationTypes();
popupApplicationActions = new javax.swing.JPopupMenu();
menuApprove = new javax.swing.JMenuItem();
menuCancel = new javax.swing.JMenuItem();
menuWithdraw = new javax.swing.JMenuItem();
menuLapse = new javax.swing.JMenuItem();
menuRequisition = new javax.swing.JMenuItem();
menuResubmit = new javax.swing.JMenuItem();
menuDispatch = new javax.swing.JMenuItem();
menuArchive = new javax.swing.JMenuItem();
pnlHeader = new org.sola.clients.swing.ui.HeaderPanel();
jToolBar3 = new javax.swing.JToolBar();
btnSave = new javax.swing.JButton();
btnCalculateFee = new javax.swing.JButton();
btnValidate = new javax.swing.JButton();
jSeparator6 = new javax.swing.JToolBar.Separator();
btnPrintFee = new javax.swing.JButton();
btnPrintStatusReport = new javax.swing.JButton();
jSeparator5 = new javax.swing.JToolBar.Separator();
dropDownButton1 = new org.sola.clients.swing.common.controls.DropDownButton();
jScrollPane1 = new javax.swing.JScrollPane();
jPanel22 = new javax.swing.JPanel();
tabbedControlMain = new javax.swing.JTabbedPane();
contactPanel = new javax.swing.JPanel();
jPanel12 = new javax.swing.JPanel();
jPanel6 = new javax.swing.JPanel();
jPanel3 = new javax.swing.JPanel();
txtFirstName = new javax.swing.JTextField();
labName = new javax.swing.JLabel();
jPanel4 = new javax.swing.JPanel();
labLastName = new javax.swing.JLabel();
txtLastName = new javax.swing.JTextField();
jPanel5 = new javax.swing.JPanel();
txtAddress = new javax.swing.JTextField();
labAddress = new javax.swing.JLabel();
jPanel11 = new javax.swing.JPanel();
jPanel7 = new javax.swing.JPanel();
labPhone = new javax.swing.JLabel();
txtPhone = new javax.swing.JTextField();
jPanel8 = new javax.swing.JPanel();
labFax = new javax.swing.JLabel();
txtFax = new javax.swing.JTextField();
jPanel9 = new javax.swing.JPanel();
labEmail = new javax.swing.JLabel();
txtEmail = new javax.swing.JTextField();
jPanel10 = new javax.swing.JPanel();
labPreferredWay = new javax.swing.JLabel();
cbxCommunicationWay = new javax.swing.JComboBox();
groupPanel1 = new org.sola.clients.swing.ui.GroupPanel();
jPanel23 = new javax.swing.JPanel();
jPanel14 = new javax.swing.JPanel();
labAgents = new javax.swing.JLabel();
cbxAgents = new javax.swing.JComboBox();
jPanel15 = new javax.swing.JPanel();
labStatus = new javax.swing.JLabel();
txtStatus = new javax.swing.JTextField();
jPanel25 = new javax.swing.JPanel();
jPanel24 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
txtAppNumber = new javax.swing.JTextField();
jPanel13 = new javax.swing.JPanel();
labDate = new javax.swing.JLabel();
txtDate = new javax.swing.JTextField();
jPanel26 = new javax.swing.JPanel();
jLabel2 = new javax.swing.JLabel();
txtCompleteBy = new javax.swing.JTextField();
servicesPanel = new javax.swing.JPanel();
scrollFeeDetails1 = new javax.swing.JScrollPane();
tabServices = new org.sola.clients.swing.common.controls.JTableWithDefaultStyles();
tbServices = new javax.swing.JToolBar();
btnAddService = new javax.swing.JButton();
btnRemoveService = new javax.swing.JButton();
jSeparator1 = new javax.swing.JToolBar.Separator();
btnUPService = new javax.swing.JButton();
btnDownService = new javax.swing.JButton();
jSeparator2 = new javax.swing.JToolBar.Separator();
btnViewService = new javax.swing.JButton();
btnStartService = new javax.swing.JButton();
btnCompleteService = new javax.swing.JButton();
btnRevertService = new javax.swing.JButton();
btnCancelService = new javax.swing.JButton();
propertyPanel = new javax.swing.JPanel();
tbPropertyDetails = new javax.swing.JToolBar();
btnRemoveProperty = new javax.swing.JButton();
btnVerifyProperty = new javax.swing.JButton();
scrollPropertyDetails = new javax.swing.JScrollPane();
tabPropertyDetails = new org.sola.clients.swing.common.controls.JTableWithDefaultStyles();
jPanel20 = new javax.swing.JPanel();
propertypartPanel = new javax.swing.JPanel();
jPanel16 = new javax.swing.JPanel();
labFirstPart = new javax.swing.JLabel();
txtFirstPart = new javax.swing.JTextField();
jPanel17 = new javax.swing.JPanel();
txtLastPart = new javax.swing.JTextField();
labLastPart = new javax.swing.JLabel();
jPanel18 = new javax.swing.JPanel();
labArea = new javax.swing.JLabel();
txtArea = new javax.swing.JTextField();
jPanel19 = new javax.swing.JPanel();
labValue = new javax.swing.JLabel();
txtValue = new javax.swing.JTextField();
jPanel21 = new javax.swing.JPanel();
btnAddProperty = new javax.swing.JButton();
documentPanel = new javax.swing.JPanel();
scrollDocuments = new javax.swing.JScrollPane();
tabDocuments = new org.sola.clients.swing.common.controls.JTableWithDefaultStyles();
labDocRequired = new javax.swing.JLabel();
scrollDocRequired = new javax.swing.JScrollPane();
tblDocTypesHelper = new org.sola.clients.swing.common.controls.JTableWithDefaultStyles();
jPanel1 = new javax.swing.JPanel();
addDocumentPanel = new org.sola.clients.swing.ui.source.DocumentPanel();
jToolBar1 = new javax.swing.JToolBar();
btnAddExistingDocument = new javax.swing.JButton();
btnDeleteDoc = new javax.swing.JButton();
btnOpenAttachment = new javax.swing.JButton();
mapPanel = new javax.swing.JPanel();
feesPanel = new javax.swing.JPanel();
scrollFeeDetails = new javax.swing.JScrollPane();
tabFeeDetails = new org.sola.clients.swing.common.controls.JTableWithDefaultStyles();
jPanel2 = new javax.swing.JPanel();
formTxtServiceFee = new javax.swing.JFormattedTextField();
formTxtTaxes = new javax.swing.JFormattedTextField();
formTxtFee = new javax.swing.JFormattedTextField();
formTxtPaid = new javax.swing.JFormattedTextField();
cbxPaid = new javax.swing.JCheckBox();
labTotalFee3 = new javax.swing.JLabel();
labTotalFee2 = new javax.swing.JLabel();
labTotalFee = new javax.swing.JLabel();
labTotalFee1 = new javax.swing.JLabel();
labFixedFee = new javax.swing.JLabel();
validationPanel = new javax.swing.JPanel();
validationsPanel = new javax.swing.JScrollPane();
tabValidations = new org.sola.clients.swing.common.controls.JTableWithDefaultStyles();
historyPanel = new javax.swing.JPanel();
actionLogPanel = new javax.swing.JScrollPane();
tabActionLog = new org.sola.clients.swing.common.controls.JTableWithDefaultStyles();
popUpServices.setName("popUpServices");
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("org/sola/clients/swing/desktop/application/Bundle");
menuAddService.setText(bundle.getString("ApplicationPanel.menuAddService.text"));
menuAddService.setName("menuAddService");
menuAddService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuAddServiceActionPerformed(evt);
}
});
popUpServices.add(menuAddService);
menuRemoveService.setText(bundle.getString("ApplicationPanel.menuRemoveService.text"));
menuRemoveService.setName("menuRemoveService");
menuRemoveService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuRemoveServiceActionPerformed(evt);
}
});
popUpServices.add(menuRemoveService);
jSeparator3.setName("jSeparator3");
popUpServices.add(jSeparator3);
menuMoveServiceUp.setText(bundle.getString("ApplicationPanel.menuMoveServiceUp.text"));
menuMoveServiceUp.setName("menuMoveServiceUp");
menuMoveServiceUp.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuMoveServiceUpActionPerformed(evt);
}
});
popUpServices.add(menuMoveServiceUp);
menuMoveServiceDown.setText(bundle.getString("ApplicationPanel.menuMoveServiceDown.text"));
menuMoveServiceDown.setName("menuMoveServiceDown");
menuMoveServiceDown.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuMoveServiceDownActionPerformed(evt);
}
});
popUpServices.add(menuMoveServiceDown);
jSeparator4.setName("jSeparator4");
popUpServices.add(jSeparator4);
menuViewService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/view.png")));
menuViewService.setText(bundle.getString("ApplicationPanel.menuViewService.text"));
menuViewService.setName("menuViewService");
menuViewService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuViewServiceActionPerformed(evt);
}
});
popUpServices.add(menuViewService);
menuStartService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/start.png")));
menuStartService.setText(bundle.getString("ApplicationPanel.menuStartService.text"));
menuStartService.setName("menuStartService");
menuStartService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuStartServiceActionPerformed(evt);
}
});
popUpServices.add(menuStartService);
menuCompleteService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/confirm.png")));
menuCompleteService.setText(bundle.getString("ApplicationPanel.menuCompleteService.text"));
menuCompleteService.setName("menuCompleteService");
menuCompleteService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuCompleteServiceActionPerformed(evt);
}
});
popUpServices.add(menuCompleteService);
menuRevertService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/revert.png")));
menuRevertService.setText(bundle.getString("ApplicationPanel.menuRevertService.text"));
menuRevertService.setName("menuRevertService");
menuRevertService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuRevertServiceActionPerformed(evt);
}
});
popUpServices.add(menuRevertService);
menuCancelService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/cancel.png")));
menuCancelService.setText(bundle.getString("ApplicationPanel.menuCancelService.text"));
menuCancelService.setName("menuCancelService");
menuCancelService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuCancelServiceActionPerformed(evt);
}
});
popUpServices.add(menuCancelService);
popupApplicationActions.setName("popupApplicationActions");
menuApprove.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/approve.png")));
menuApprove.setText(bundle.getString("ApplicationPanel.menuApprove.text"));
menuApprove.setName("menuApprove");
menuApprove.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuApproveActionPerformed(evt);
}
});
popupApplicationActions.add(menuApprove);
menuCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/reject.png")));
menuCancel.setText(bundle.getString("ApplicationPanel.menuCancel.text"));
menuCancel.setName("menuCancel");
menuCancel.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuCancelActionPerformed(evt);
}
});
popupApplicationActions.add(menuCancel);
menuWithdraw.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/withdraw.png")));
menuWithdraw.setText(bundle.getString("ApplicationPanel.menuWithdraw.text"));
menuWithdraw.setName("menuWithdraw");
menuWithdraw.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuWithdrawActionPerformed(evt);
}
});
popupApplicationActions.add(menuWithdraw);
menuLapse.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/lapse.png")));
menuLapse.setText(bundle.getString("ApplicationPanel.menuLapse.text"));
menuLapse.setName("menuLapse");
menuLapse.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuLapseActionPerformed(evt);
}
});
popupApplicationActions.add(menuLapse);
menuRequisition.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/requisition.png")));
menuRequisition.setText(bundle.getString("ApplicationPanel.menuRequisition.text"));
menuRequisition.setName("menuRequisition");
menuRequisition.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuRequisitionActionPerformed(evt);
}
});
popupApplicationActions.add(menuRequisition);
menuResubmit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/resubmit.png")));
menuResubmit.setText(bundle.getString("ApplicationPanel.menuResubmit.text"));
menuResubmit.setName("menuResubmit");
menuResubmit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuResubmitActionPerformed(evt);
}
});
popupApplicationActions.add(menuResubmit);
menuDispatch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/envelope.png")));
menuDispatch.setText(bundle.getString("ApplicationPanel.menuDispatch.text"));
menuDispatch.setName("menuDispatch");
menuDispatch.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuDispatchActionPerformed(evt);
}
});
popupApplicationActions.add(menuDispatch);
menuArchive.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/archive.png")));
menuArchive.setText(bundle.getString("ApplicationPanel.menuArchive.text"));
menuArchive.setName("menuArchive");
menuArchive.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuArchiveActionPerformed(evt);
}
});
popupApplicationActions.add(menuArchive);
setHeaderPanel(pnlHeader);
setHelpTopic(bundle.getString("ApplicationPanel.helpTopic"));
setMinimumSize(new java.awt.Dimension(660, 458));
setName("Form");
setPreferredSize(new java.awt.Dimension(660, 458));
addComponentListener(new java.awt.event.ComponentAdapter() {
public void componentShown(java.awt.event.ComponentEvent evt) {
formComponentShown(evt);
}
});
pnlHeader.setName("pnlHeader");
pnlHeader.setTitleText(bundle.getString("ApplicationPanel.pnlHeader.titleText"));
jToolBar3.setFloatable(false);
jToolBar3.setRollover(true);
jToolBar3.setName("jToolBar3");
LafManager.getInstance().setBtnProperties(btnSave);
btnSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/save.png")));
btnSave.setText(bundle.getString("ApplicationPanel.btnSave.text"));
btnSave.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
btnSave.setName("btnSave");
btnSave.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
btnSave.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnSaveActionPerformed(evt);
}
});
jToolBar3.add(btnSave);
LafManager.getInstance().setBtnProperties(btnCalculateFee);
btnCalculateFee.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/calculate.png")));
btnCalculateFee.setText(bundle.getString("ApplicationPanel.btnCalculateFee.text"));
btnCalculateFee.setName("btnCalculateFee");
btnCalculateFee.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnCalculateFeeActionPerformed(evt);
}
});
jToolBar3.add(btnCalculateFee);
btnValidate.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/validation.png")));
btnValidate.setText(bundle.getString("ApplicationPanel.btnValidate.text"));
btnValidate.setName("btnValidate");
btnValidate.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
btnValidate.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnValidateActionPerformed(evt);
}
});
jToolBar3.add(btnValidate);
jSeparator6.setName("jSeparator6");
jToolBar3.add(jSeparator6);
btnPrintFee.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/print.png")));
btnPrintFee.setText(bundle.getString("ApplicationPanel.btnPrintFee.text"));
btnPrintFee.setName("btnPrintFee");
btnPrintFee.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnPrintFeeActionPerformed(evt);
}
});
jToolBar3.add(btnPrintFee);
btnPrintStatusReport.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/print.png")));
btnPrintStatusReport.setText(bundle.getString("ApplicationPanel.btnPrintStatusReport.text"));
btnPrintStatusReport.setFocusable(false);
btnPrintStatusReport.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
btnPrintStatusReport.setName("btnPrintStatusReport");
btnPrintStatusReport.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
btnPrintStatusReport.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnPrintStatusReportActionPerformed(evt);
}
});
jToolBar3.add(btnPrintStatusReport);
jSeparator5.setName("jSeparator5");
jToolBar3.add(jSeparator5);
dropDownButton1.setText(bundle.getString("ApplicationPanel.dropDownButton1.text"));
dropDownButton1.setComponentPopupMenu(popupApplicationActions);
dropDownButton1.setFocusable(false);
dropDownButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
dropDownButton1.setName("dropDownButton1");
dropDownButton1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
jToolBar3.add(dropDownButton1);
jScrollPane1.setBorder(null);
jScrollPane1.setName("jScrollPane1");
jScrollPane1.setPreferredSize(new java.awt.Dimension(642, 352));
jPanel22.setName("jPanel22");
jPanel22.setPreferredSize(new java.awt.Dimension(640, 435));
jPanel22.setRequestFocusEnabled(false);
tabbedControlMain.setName("tabbedControlMain");
tabbedControlMain.setPreferredSize(new java.awt.Dimension(440, 370));
tabbedControlMain.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
contactPanel.setName("contactPanel");
contactPanel.setPreferredSize(new java.awt.Dimension(645, 331));
contactPanel.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
contactPanel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
contactPanelMouseClicked(evt);
}
});
jPanel12.setName("jPanel12");
jPanel6.setName("jPanel6");
jPanel6.setLayout(new java.awt.GridLayout(1, 2, 15, 0));
jPanel3.setName("jPanel3");
txtFirstName.setName("txtFirstName");
org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${contactPerson.name}"), txtFirstName, org.jdesktop.beansbinding.BeanProperty.create("text"));
bindingGroup.addBinding(binding);
LafManager.getInstance().setTxtProperties(txtFirstName);
LafManager.getInstance().setLabProperties(labName);
labName.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/red_asterisk.gif")));
labName.setLabelFor(txtFirstName);
labName.setText(bundle.getString("ApplicationPanel.labName.text"));
labName.setIconTextGap(1);
labName.setName("labName");
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(labName, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(189, Short.MAX_VALUE))
.addComponent(txtFirstName, javax.swing.GroupLayout.DEFAULT_SIZE, 328, Short.MAX_VALUE)
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(labName)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtFirstName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel6.add(jPanel3);
jPanel4.setName("jPanel4");
LafManager.getInstance().setLabProperties(labLastName);
labLastName.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/red_asterisk.gif")));
labLastName.setText(bundle.getString("ApplicationPanel.labLastName.text"));
labLastName.setIconTextGap(1);
labLastName.setName("labLastName");
txtLastName.setName("txtLastName");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${contactPerson.lastName}"), txtLastName, org.jdesktop.beansbinding.BeanProperty.create("text"));
bindingGroup.addBinding(binding);
txtLastName.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
txtLastName.setHorizontalAlignment(JTextField.LEADING);
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(labLastName)
.addContainerGap(236, Short.MAX_VALUE))
.addComponent(txtLastName, javax.swing.GroupLayout.DEFAULT_SIZE, 328, Short.MAX_VALUE)
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(labLastName)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtLastName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel6.add(jPanel4);
jPanel5.setName("jPanel5");
txtAddress.setName("txtAddress");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${contactPerson.address.description}"), txtAddress, org.jdesktop.beansbinding.BeanProperty.create("text"));
bindingGroup.addBinding(binding);
txtAddress.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
txtAddress.setHorizontalAlignment(JTextField.LEADING);
LafManager.getInstance().setLabProperties(labAddress);
labAddress.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/red_asterisk.gif")));
labAddress.setText(bundle.getString("ApplicationPanel.labAddress.text"));
labAddress.setIconTextGap(1);
labAddress.setName("labAddress");
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
jPanel5.setLayout(jPanel5Layout);
jPanel5Layout.setHorizontalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(labAddress)
.addContainerGap())
.addComponent(txtAddress)
);
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(labAddress)
.addGap(4, 4, 4)
.addComponent(txtAddress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel11.setName("jPanel11");
jPanel11.setLayout(new java.awt.GridLayout(2, 2, 15, 0));
jPanel7.setName("jPanel7");
LafManager.getInstance().setLabProperties(labPhone);
labPhone.setText(bundle.getString("ApplicationPanel.labPhone.text"));
labPhone.setName("labPhone");
txtPhone.setName("txtPhone");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${contactPerson.phone}"), txtPhone, org.jdesktop.beansbinding.BeanProperty.create("text"));
bindingGroup.addBinding(binding);
txtPhone.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
txtPhone.setHorizontalAlignment(JTextField.LEADING);
txtPhone.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
txtPhoneFocusLost(evt);
}
});
javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
jPanel7.setLayout(jPanel7Layout);
jPanel7Layout.setHorizontalGroup(
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel7Layout.createSequentialGroup()
.addComponent(labPhone)
.addContainerGap(266, Short.MAX_VALUE))
.addComponent(txtPhone, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 328, Short.MAX_VALUE)
);
jPanel7Layout.setVerticalGroup(
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel7Layout.createSequentialGroup()
.addComponent(labPhone)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtPhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(22, Short.MAX_VALUE))
);
jPanel11.add(jPanel7);
jPanel8.setName("jPanel8");
LafManager.getInstance().setLabProperties(labFax);
labFax.setText(bundle.getString("ApplicationPanel.labFax.text"));
labFax.setName("labFax");
txtFax.setName("txtFax");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${contactPerson.fax}"), txtFax, org.jdesktop.beansbinding.BeanProperty.create("text"));
bindingGroup.addBinding(binding);
txtFax.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
txtFax.setHorizontalAlignment(JTextField.LEADING);
txtFax.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
txtFaxFocusLost(evt);
}
});
javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
jPanel8.setLayout(jPanel8Layout);
jPanel8Layout.setHorizontalGroup(
jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtFax, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
.addGroup(jPanel8Layout.createSequentialGroup()
.addComponent(labFax)
.addContainerGap())
);
jPanel8Layout.setVerticalGroup(
jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel8Layout.createSequentialGroup()
.addComponent(labFax, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtFax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(21, Short.MAX_VALUE))
);
jPanel11.add(jPanel8);
jPanel9.setName("jPanel9");
LafManager.getInstance().setLabProperties(labEmail);
labEmail.setText(bundle.getString("ApplicationPanel.labEmail.text"));
labEmail.setName("labEmail");
txtEmail.setName("txtEmail");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${contactPerson.email}"), txtEmail, org.jdesktop.beansbinding.BeanProperty.create("text"));
bindingGroup.addBinding(binding);
txtEmail.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
txtEmail.setHorizontalAlignment(JTextField.LEADING);
txtEmail.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
txtEmailFocusLost(evt);
}
});
javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
jPanel9.setLayout(jPanel9Layout);
jPanel9Layout.setHorizontalGroup(
jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel9Layout.createSequentialGroup()
.addComponent(labEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(160, Short.MAX_VALUE))
.addComponent(txtEmail, javax.swing.GroupLayout.DEFAULT_SIZE, 328, Short.MAX_VALUE)
);
jPanel9Layout.setVerticalGroup(
jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel9Layout.createSequentialGroup()
.addComponent(labEmail)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(22, Short.MAX_VALUE))
);
jPanel11.add(jPanel9);
jPanel10.setName("jPanel10");
LafManager.getInstance().setLabProperties(labPreferredWay);
labPreferredWay.setText(bundle.getString("ApplicationPanel.labPreferredWay.text"));
labPreferredWay.setName("labPreferredWay");
LafManager.getInstance().setCmbProperties(cbxCommunicationWay);
cbxCommunicationWay.setMaximumRowCount(9);
cbxCommunicationWay.setName("cbxCommunicationWay");
cbxCommunicationWay.setRenderer(new SimpleComboBoxRenderer("getDisplayValue"));
org.jdesktop.beansbinding.ELProperty eLProperty = org.jdesktop.beansbinding.ELProperty.create("${communicationTypeList}");
org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, communicationTypes, eLProperty, cbxCommunicationWay);
bindingGroup.addBinding(jComboBoxBinding);
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${contactPerson.preferredCommunication}"), cbxCommunicationWay, org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
bindingGroup.addBinding(binding);
cbxCommunicationWay.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
jPanel10.setLayout(jPanel10Layout);
jPanel10Layout.setHorizontalGroup(
jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel10Layout.createSequentialGroup()
.addComponent(labPreferredWay)
.addContainerGap(141, Short.MAX_VALUE))
.addComponent(cbxCommunicationWay, 0, 328, Short.MAX_VALUE)
);
jPanel10Layout.setVerticalGroup(
jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel10Layout.createSequentialGroup()
.addComponent(labPreferredWay)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cbxCommunicationWay, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(22, Short.MAX_VALUE))
);
jPanel11.add(jPanel10);
javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
jPanel12.setLayout(jPanel12Layout);
jPanel12Layout.setHorizontalGroup(
jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
.addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
);
jPanel12Layout.setVerticalGroup(
jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel12Layout.createSequentialGroup()
.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, 125, Short.MAX_VALUE))
);
groupPanel1.setName("groupPanel1");
groupPanel1.setTitleText(bundle.getString("ApplicationPanel.groupPanel1.titleText"));
jPanel23.setName("jPanel23");
jPanel23.setLayout(new java.awt.GridLayout(1, 4, 15, 0));
jPanel14.setName("jPanel14");
LafManager.getInstance().setLabProperties(labAgents);
labAgents.setText(bundle.getString("ApplicationPanel.labAgents.text"));
labAgents.setIconTextGap(1);
labAgents.setName("labAgents");
LafManager.getInstance().setCmbProperties(cbxAgents);
cbxAgents.setName("cbxAgents");
cbxAgents.setRenderer(new SimpleComboBoxRenderer("getName"));
cbxAgents.setRequestFocusEnabled(false);
eLProperty = org.jdesktop.beansbinding.ELProperty.create("${partySummaryList}");
jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, partySummaryList, eLProperty, cbxAgents);
bindingGroup.addBinding(jComboBoxBinding);
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${agent}"), cbxAgents, org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
bindingGroup.addBinding(binding);
cbxAgents.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
jPanel14.setLayout(jPanel14Layout);
jPanel14Layout.setHorizontalGroup(
jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(cbxAgents, 0, 328, Short.MAX_VALUE)
.addGroup(jPanel14Layout.createSequentialGroup()
.addComponent(labAgents)
.addContainerGap(267, Short.MAX_VALUE))
);
jPanel14Layout.setVerticalGroup(
jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel14Layout.createSequentialGroup()
.addComponent(labAgents)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cbxAgents, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel23.add(jPanel14);
jPanel15.setName("jPanel15");
LafManager.getInstance().setLabProperties(labStatus);
labStatus.setText(bundle.getString("ApplicationPanel.labStatus.text"));
labStatus.setName("labStatus");
txtStatus.setEditable(false);
txtStatus.setName("txtStatus");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${status.displayValue}"), txtStatus, org.jdesktop.beansbinding.BeanProperty.create("text"));
bindingGroup.addBinding(binding);
txtStatus.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
txtStatus.setHorizontalAlignment(JTextField.LEADING);
javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);
jPanel15.setLayout(jPanel15Layout);
jPanel15Layout.setHorizontalGroup(
jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtStatus, javax.swing.GroupLayout.DEFAULT_SIZE, 328, Short.MAX_VALUE)
.addGroup(jPanel15Layout.createSequentialGroup()
.addComponent(labStatus)
.addContainerGap(265, Short.MAX_VALUE))
);
jPanel15Layout.setVerticalGroup(
jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel15Layout.createSequentialGroup()
.addComponent(labStatus)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel23.add(jPanel15);
jPanel25.setName("jPanel25");
jPanel25.setLayout(new java.awt.GridLayout(1, 3, 15, 0));
jPanel24.setName("jPanel24");
jLabel1.setText(bundle.getString("ApplicationPanel.jLabel1.text"));
jLabel1.setName("jLabel1");
txtAppNumber.setEditable(false);
txtAppNumber.setName("txtAppNumber");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${nr}"), txtAppNumber, org.jdesktop.beansbinding.BeanProperty.create("text"));
bindingGroup.addBinding(binding);
javax.swing.GroupLayout jPanel24Layout = new javax.swing.GroupLayout(jPanel24);
jPanel24.setLayout(jPanel24Layout);
jPanel24Layout.setHorizontalGroup(
jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel24Layout.createSequentialGroup()
.addComponent(jLabel1)
.addContainerGap(128, Short.MAX_VALUE))
.addComponent(txtAppNumber, javax.swing.GroupLayout.DEFAULT_SIZE, 214, Short.MAX_VALUE)
);
jPanel24Layout.setVerticalGroup(
jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel24Layout.createSequentialGroup()
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtAppNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel25.add(jPanel24);
jPanel13.setName("jPanel13");
LafManager.getInstance().setLabProperties(labDate);
labDate.setText(bundle.getString("ApplicationPanel.labDate.text"));
labDate.setName("labDate");
txtDate.setEditable(false);
txtDate.setName("txtDate");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${lodgingDatetime}"), txtDate, org.jdesktop.beansbinding.BeanProperty.create("text"));
binding.setConverter(new DateConverter());
bindingGroup.addBinding(binding);
txtDate.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
txtDate.setHorizontalAlignment(JTextField.LEADING);
javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
jPanel13.setLayout(jPanel13Layout);
jPanel13Layout.setHorizontalGroup(
jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtDate, javax.swing.GroupLayout.DEFAULT_SIZE, 214, Short.MAX_VALUE)
.addGroup(jPanel13Layout.createSequentialGroup()
.addComponent(labDate)
.addContainerGap(113, Short.MAX_VALUE))
);
jPanel13Layout.setVerticalGroup(
jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel13Layout.createSequentialGroup()
.addComponent(labDate)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel25.add(jPanel13);
jPanel26.setName("jPanel26");
jLabel2.setText(bundle.getString("ApplicationPanel.jLabel2.text"));
jLabel2.setName("jLabel2");
txtCompleteBy.setEditable(false);
txtCompleteBy.setName("txtCompleteBy");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${expectedCompletionDate}"), txtCompleteBy, org.jdesktop.beansbinding.BeanProperty.create("text"));
binding.setConverter(new DateConverter());
bindingGroup.addBinding(binding);
javax.swing.GroupLayout jPanel26Layout = new javax.swing.GroupLayout(jPanel26);
jPanel26.setLayout(jPanel26Layout);
jPanel26Layout.setHorizontalGroup(
jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel26Layout.createSequentialGroup()
.addComponent(jLabel2)
.addContainerGap(131, Short.MAX_VALUE))
.addComponent(txtCompleteBy, javax.swing.GroupLayout.DEFAULT_SIZE, 214, Short.MAX_VALUE)
);
jPanel26Layout.setVerticalGroup(
jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel26Layout.createSequentialGroup()
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtCompleteBy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel25.add(jPanel26);
javax.swing.GroupLayout contactPanelLayout = new javax.swing.GroupLayout(contactPanel);
contactPanel.setLayout(contactPanelLayout);
contactPanelLayout.setHorizontalGroup(
contactPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, contactPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(contactPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jPanel12, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel25, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
.addComponent(jPanel23, javax.swing.GroupLayout.DEFAULT_SIZE, 615, Short.MAX_VALUE)
.addComponent(groupPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
contactPanelLayout.setVerticalGroup(
contactPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(contactPanelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanel25, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel23, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(groupPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(20, Short.MAX_VALUE))
);
tabbedControlMain.addTab(bundle.getString("ApplicationPanel.contactPanel.TabConstraints.tabTitle"), contactPanel);
servicesPanel.setName("servicesPanel");
scrollFeeDetails1.setBackground(new java.awt.Color(255, 255, 255));
scrollFeeDetails1.setName("scrollFeeDetails1");
scrollFeeDetails1.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
tabServices.setComponentPopupMenu(popUpServices);
tabServices.setName("tabServices");
tabServices.setNextFocusableComponent(btnSave);
tabServices.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
tabServices.getTableHeader().setReorderingAllowed(false);
eLProperty = org.jdesktop.beansbinding.ELProperty.create("${serviceList}");
org.jdesktop.swingbinding.JTableBinding jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, eLProperty, tabServices);
org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${serviceOrder}"));
columnBinding.setColumnName("Service Order");
columnBinding.setColumnClass(Integer.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${requestType.displayValue}"));
columnBinding.setColumnName("Request Type.display Value");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${status.displayValue}"));
columnBinding.setColumnName("Status.display Value");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
bindingGroup.addBinding(jTableBinding);
jTableBinding.bind();binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${selectedService}"), tabServices, org.jdesktop.beansbinding.BeanProperty.create("selectedElement"));
bindingGroup.addBinding(binding);
scrollFeeDetails1.setViewportView(tabServices);
tabServices.getColumnModel().getColumn(0).setMinWidth(70);
tabServices.getColumnModel().getColumn(0).setPreferredWidth(70);
tabServices.getColumnModel().getColumn(0).setMaxWidth(70);
tabServices.getColumnModel().getColumn(0).setHeaderValue(bundle.getString("ApplicationPanel.tabFeeDetails1.columnModel.title0"));
tabServices.getColumnModel().getColumn(1).setHeaderValue(bundle.getString("ApplicationPanel.tabFeeDetails1.columnModel.title1"));
tabServices.getColumnModel().getColumn(2).setHeaderValue(bundle.getString("ApplicationPanel.tabFeeDetails1.columnModel.title2"));
tbServices.setFloatable(false);
tbServices.setRollover(true);
tbServices.setName("tbServices");
btnAddService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/add.png")));
btnAddService.setText(bundle.getString("ApplicationPanel.btnAddService.text"));
btnAddService.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
btnAddService.setName("btnAddService");
btnAddService.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
btnAddService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnAddServiceActionPerformed(evt);
}
});
tbServices.add(btnAddService);
btnRemoveService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/remove.png")));
btnRemoveService.setText(bundle.getString("ApplicationPanel.btnRemoveService.text"));
btnRemoveService.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
btnRemoveService.setName("btnRemoveService");
btnRemoveService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnRemoveServiceActionPerformed(evt);
}
});
tbServices.add(btnRemoveService);
jSeparator1.setName("jSeparator1");
tbServices.add(jSeparator1);
btnUPService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/up.png")));
btnUPService.setText(bundle.getString("ApplicationPanel.btnUPService.text"));
btnUPService.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
btnUPService.setName("btnUPService");
btnUPService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnUPServiceActionPerformed(evt);
}
});
tbServices.add(btnUPService);
btnDownService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/down.png")));
btnDownService.setText(bundle.getString("ApplicationPanel.btnDownService.text"));
btnDownService.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
btnDownService.setName("btnDownService");
btnDownService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnDownServiceActionPerformed(evt);
}
});
tbServices.add(btnDownService);
jSeparator2.setName("jSeparator2");
tbServices.add(jSeparator2);
btnViewService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/view.png")));
btnViewService.setText(bundle.getString("ApplicationPanel.btnViewService.text"));
btnViewService.setFocusable(false);
btnViewService.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
btnViewService.setName("btnViewService");
btnViewService.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
btnViewService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnViewServiceActionPerformed(evt);
}
});
tbServices.add(btnViewService);
btnStartService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/start.png")));
btnStartService.setText(bundle.getString("ApplicationPanel.btnStartService.text"));
btnStartService.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
btnStartService.setName("btnStartService");
btnStartService.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
btnStartService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnStartServiceActionPerformed(evt);
}
});
tbServices.add(btnStartService);
btnCompleteService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/confirm.png")));
btnCompleteService.setText(bundle.getString("ApplicationPanel.btnCompleteService.text"));
btnCompleteService.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
btnCompleteService.setName("btnCompleteService");
btnCompleteService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnCompleteServiceActionPerformed(evt);
}
});
tbServices.add(btnCompleteService);
btnRevertService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/revert.png")));
btnRevertService.setText(bundle.getString("ApplicationPanel.btnRevertService.text"));
btnRevertService.setFocusable(false);
btnRevertService.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
btnRevertService.setName("btnRevertService");
btnRevertService.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
btnRevertService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnRevertServiceActionPerformed(evt);
}
});
tbServices.add(btnRevertService);
btnCancelService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/cancel.png")));
btnCancelService.setText(bundle.getString("ApplicationPanel.btnCancelService.text"));
btnCancelService.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
btnCancelService.setName("btnCancelService");
btnCancelService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnCancelServiceActionPerformed(evt);
}
});
tbServices.add(btnCancelService);
javax.swing.GroupLayout servicesPanelLayout = new javax.swing.GroupLayout(servicesPanel);
servicesPanel.setLayout(servicesPanelLayout);
servicesPanelLayout.setHorizontalGroup(
servicesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, servicesPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(servicesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(scrollFeeDetails1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 672, Short.MAX_VALUE)
.addComponent(tbServices, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 615, Short.MAX_VALUE))
.addContainerGap())
);
servicesPanelLayout.setVerticalGroup(
servicesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(servicesPanelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(tbServices, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(scrollFeeDetails1, javax.swing.GroupLayout.DEFAULT_SIZE, 354, Short.MAX_VALUE)
.addContainerGap())
);
tabbedControlMain.addTab(bundle.getString("ApplicationPanel.servicesPanel.TabConstraints.tabTitle"), servicesPanel);
propertyPanel.setName("propertyPanel");
propertyPanel.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
propertyPanel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
propertyPanelMouseClicked(evt);
}
});
tbPropertyDetails.setFloatable(false);
tbPropertyDetails.setRollover(true);
tbPropertyDetails.setToolTipText(bundle.getString("ApplicationPanel.tbPropertyDetails.toolTipText"));
tbPropertyDetails.setName("tbPropertyDetails");
btnRemoveProperty.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/remove.png")));
btnRemoveProperty.setText(bundle.getString("ApplicationPanel.btnRemoveProperty.text"));
btnRemoveProperty.setName("btnRemoveProperty");
btnRemoveProperty.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnRemovePropertyActionPerformed(evt);
}
});
tbPropertyDetails.add(btnRemoveProperty);
btnVerifyProperty.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/verify.png")));
btnVerifyProperty.setText(bundle.getString("ApplicationPanel.btnVerifyProperty.text"));
btnVerifyProperty.setName("btnVerifyProperty");
btnVerifyProperty.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnVerifyPropertyActionPerformed(evt);
}
});
tbPropertyDetails.add(btnVerifyProperty);
scrollPropertyDetails.setFont(new java.awt.Font("Tahoma", 0, 12));
scrollPropertyDetails.setName("scrollPropertyDetails");
scrollPropertyDetails.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
tabPropertyDetails.setName("tabPropertyDetails");
tabPropertyDetails.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
eLProperty = org.jdesktop.beansbinding.ELProperty.create("${filteredPropertyList}");
jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, eLProperty, tabPropertyDetails, "");
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${nameFirstpart}"));
columnBinding.setColumnName("Name Firstpart");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${nameLastpart}"));
columnBinding.setColumnName("Name Lastpart");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${area}"));
columnBinding.setColumnName("Area");
columnBinding.setColumnClass(java.math.BigDecimal.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${totalValue}"));
columnBinding.setColumnName("Total Value");
columnBinding.setColumnClass(java.math.BigDecimal.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${verifiedExists}"));
columnBinding.setColumnName("Verified Exists");
columnBinding.setColumnClass(Boolean.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${verifiedLocation}"));
columnBinding.setColumnName("Verified Location");
columnBinding.setColumnClass(Boolean.class);
columnBinding.setEditable(false);
bindingGroup.addBinding(jTableBinding);
jTableBinding.bind();binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${selectedProperty}"), tabPropertyDetails, org.jdesktop.beansbinding.BeanProperty.create("selectedElement"));
bindingGroup.addBinding(binding);
scrollPropertyDetails.setViewportView(tabPropertyDetails);
tabPropertyDetails.getColumnModel().getColumn(0).setHeaderValue(bundle.getString("ApplicationPanel.tabPropertyDetails.columnModel.title0"));
tabPropertyDetails.getColumnModel().getColumn(1).setHeaderValue(bundle.getString("ApplicationPanel.tabPropertyDetails.columnModel.title1"));
tabPropertyDetails.getColumnModel().getColumn(2).setHeaderValue(bundle.getString("ApplicationPanel.tabPropertyDetails.columnModel.title2"));
tabPropertyDetails.getColumnModel().getColumn(3).setHeaderValue(bundle.getString("ApplicationPanel.tabPropertyDetails.columnModel.title3"));
tabPropertyDetails.getColumnModel().getColumn(4).setHeaderValue(bundle.getString("ApplicationPanel.tabPropertyDetails.columnModel.title4"));
tabPropertyDetails.getColumnModel().getColumn(5).setHeaderValue(bundle.getString("ApplicationPanel.tabPropertyDetails.columnModel.title6"));
jPanel20.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
jPanel20.setName("jPanel20");
propertypartPanel.setFont(new java.awt.Font("Tahoma", 0, 12));
propertypartPanel.setName("propertypartPanel");
propertypartPanel.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
propertypartPanel.setLayout(new java.awt.GridLayout(1, 4, 15, 0));
jPanel16.setName("jPanel16");
LafManager.getInstance().setLabProperties(labFirstPart);
labFirstPart.setText(bundle.getString("ApplicationPanel.labFirstPart.text"));
labFirstPart.setName("labFirstPart");
LafManager.getInstance().setTxtProperties(txtFirstPart);
txtFirstPart.setText(bundle.getString("ApplicationPanel.txtFirstPart.text"));
txtFirstPart.setName("txtFirstPart");
txtFirstPart.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
txtFirstPart.setHorizontalAlignment(JTextField.LEADING);
javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);
jPanel16.setLayout(jPanel16Layout);
jPanel16Layout.setHorizontalGroup(
jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel16Layout.createSequentialGroup()
.addComponent(labFirstPart)
.addContainerGap(60, Short.MAX_VALUE))
.addComponent(txtFirstPart, javax.swing.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE)
);
jPanel16Layout.setVerticalGroup(
jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel16Layout.createSequentialGroup()
.addComponent(labFirstPart)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(txtFirstPart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(55, 55, 55))
);
propertypartPanel.add(jPanel16);
jPanel17.setName("jPanel17");
txtLastPart.setText(bundle.getString("ApplicationPanel.txtLastPart.text"));
txtLastPart.setName("txtLastPart");
txtLastPart.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
txtLastPart.setHorizontalAlignment(JTextField.LEADING);
LafManager.getInstance().setLabProperties(labLastPart);
labLastPart.setText(bundle.getString("ApplicationPanel.labLastPart.text"));
labLastPart.setName("labLastPart");
javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17);
jPanel17.setLayout(jPanel17Layout);
jPanel17Layout.setHorizontalGroup(
jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel17Layout.createSequentialGroup()
.addComponent(labLastPart)
.addContainerGap(61, Short.MAX_VALUE))
.addComponent(txtLastPart, javax.swing.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE)
);
jPanel17Layout.setVerticalGroup(
jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel17Layout.createSequentialGroup()
.addComponent(labLastPart)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtLastPart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(23, Short.MAX_VALUE))
);
propertypartPanel.add(jPanel17);
jPanel18.setName("jPanel18");
LafManager.getInstance().setLabProperties(labArea);
labArea.setText(bundle.getString("ApplicationPanel.labArea.text"));
labArea.setName("labArea");
txtArea.setText(bundle.getString("ApplicationPanel.txtArea.text"));
txtArea.setName("txtArea");
txtArea.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
txtArea.setHorizontalAlignment(JTextField.LEADING);
javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);
jPanel18.setLayout(jPanel18Layout);
jPanel18Layout.setHorizontalGroup(
jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel18Layout.createSequentialGroup()
.addComponent(labArea)
.addContainerGap(56, Short.MAX_VALUE))
.addComponent(txtArea, javax.swing.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE)
);
jPanel18Layout.setVerticalGroup(
jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel18Layout.createSequentialGroup()
.addComponent(labArea)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtArea, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(23, Short.MAX_VALUE))
);
propertypartPanel.add(jPanel18);
jPanel19.setName("jPanel19");
LafManager.getInstance().setLabProperties(labValue);
labValue.setText(bundle.getString("ApplicationPanel.labValue.text"));
labValue.setName("labValue");
txtValue.setText(bundle.getString("ApplicationPanel.txtValue.text"));
txtValue.setName("txtValue");
txtValue.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
txtValue.setHorizontalAlignment(JTextField.LEADING);
javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19);
jPanel19.setLayout(jPanel19Layout);
jPanel19Layout.setHorizontalGroup(
jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel19Layout.createSequentialGroup()
.addComponent(labValue)
.addContainerGap(78, Short.MAX_VALUE))
.addComponent(txtValue, javax.swing.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE)
);
jPanel19Layout.setVerticalGroup(
jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel19Layout.createSequentialGroup()
.addComponent(labValue)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(23, Short.MAX_VALUE))
);
propertypartPanel.add(jPanel19);
jPanel21.setName("jPanel21");
jPanel21.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 5, 18));
LafManager.getInstance().setBtnProperties(btnAddProperty);
btnAddProperty.setText(bundle.getString("ApplicationPanel.btnAddProperty.text"));
btnAddProperty.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnAddProperty.setName("btnAddProperty");
btnAddProperty.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnAddPropertyActionPerformed(evt);
}
});
jPanel21.add(btnAddProperty);
javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20);
jPanel20.setLayout(jPanel20Layout);
jPanel20Layout.setHorizontalGroup(
jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel20Layout.createSequentialGroup()
.addContainerGap()
.addComponent(propertypartPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel21, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
jPanel20Layout.setVerticalGroup(
jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel20Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel21, javax.swing.GroupLayout.DEFAULT_SIZE, 63, Short.MAX_VALUE)
.addComponent(propertypartPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 63, Short.MAX_VALUE)))
);
javax.swing.GroupLayout propertyPanelLayout = new javax.swing.GroupLayout(propertyPanel);
propertyPanel.setLayout(propertyPanelLayout);
propertyPanelLayout.setHorizontalGroup(
propertyPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, propertyPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(propertyPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(scrollPropertyDetails, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 615, Short.MAX_VALUE)
.addComponent(jPanel20, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(tbPropertyDetails, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
propertyPanelLayout.setVerticalGroup(
propertyPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(propertyPanelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanel20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tbPropertyDetails, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(scrollPropertyDetails, javax.swing.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE)
.addContainerGap())
);
tabbedControlMain.addTab(bundle.getString("ApplicationPanel.propertyPanel.TabConstraints.tabTitle"), propertyPanel);
documentPanel.setName("documentPanel");
documentPanel.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
documentPanel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
documentPanelMouseClicked(evt);
}
});
scrollDocuments.setFont(new java.awt.Font("Tahoma", 0, 12));
scrollDocuments.setName("scrollDocuments");
scrollDocuments.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
tabDocuments.setName("tabDocuments");
tabDocuments.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
eLProperty = org.jdesktop.beansbinding.ELProperty.create("${sourceFilteredList}");
jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, eLProperty, tabDocuments);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${sourceType.displayValue}"));
columnBinding.setColumnName("Source Type.display Value");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${acceptance}"));
columnBinding.setColumnName("Acceptance");
columnBinding.setColumnClass(java.util.Date.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${laNr}"));
columnBinding.setColumnName("La Nr");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${referenceNr}"));
columnBinding.setColumnName("Reference Nr");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${recordation}"));
columnBinding.setColumnName("Recordation");
columnBinding.setColumnClass(java.util.Date.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${submission}"));
columnBinding.setColumnName("Submission");
columnBinding.setColumnClass(java.util.Date.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${archiveDocumentId}"));
columnBinding.setColumnName("Archive Document Id");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
bindingGroup.addBinding(jTableBinding);
jTableBinding.bind();binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${selectedSource}"), tabDocuments, org.jdesktop.beansbinding.BeanProperty.create("selectedElement"));
bindingGroup.addBinding(binding);
tabDocuments.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
tabDocumentsMouseClicked(evt);
}
});
scrollDocuments.setViewportView(tabDocuments);
tabDocuments.getColumnModel().getColumn(0).setHeaderValue(bundle.getString("ApplicationPanel.tabDocuments.columnModel.title0_1"));
tabDocuments.getColumnModel().getColumn(0).setCellRenderer(new ReferenceCodeCellConverter(CacheManager.getSourceTypesMap()));
tabDocuments.getColumnModel().getColumn(1).setHeaderValue(bundle.getString("ApplicationPanel.tabDocuments.columnModel.title1_1"));
tabDocuments.getColumnModel().getColumn(2).setHeaderValue(bundle.getString("ApplicationPanel.tabDocuments.columnModel.title2_1"));
tabDocuments.getColumnModel().getColumn(3).setHeaderValue(bundle.getString("ApplicationPanel.tabDocuments.columnModel.title3_1"));
tabDocuments.getColumnModel().getColumn(4).setHeaderValue(bundle.getString("ApplicationPanel.tabDocuments.columnModel.title4_1"));
tabDocuments.getColumnModel().getColumn(5).setHeaderValue(bundle.getString("ApplicationPanel.tabDocuments.columnModel.title5"));
tabDocuments.getColumnModel().getColumn(6).setPreferredWidth(30);
tabDocuments.getColumnModel().getColumn(6).setMaxWidth(30);
tabDocuments.getColumnModel().getColumn(6).setHeaderValue(bundle.getString("ApplicationPanel.tabDocuments.columnModel.title6"));
tabDocuments.getColumnModel().getColumn(6).setCellRenderer(new AttachedDocumentCellRenderer());
labDocRequired.setBackground(new java.awt.Color(255, 255, 204));
labDocRequired.setText(bundle.getString("ApplicationPanel.labDocRequired.text"));
labDocRequired.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 102)));
labDocRequired.setName("labDocRequired");
labDocRequired.setOpaque(true);
scrollDocRequired.setBackground(new java.awt.Color(255, 255, 255));
scrollDocRequired.setName("scrollDocRequired");
scrollDocRequired.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
tblDocTypesHelper.setBackground(new java.awt.Color(255, 255, 255));
tblDocTypesHelper.setGridColor(new java.awt.Color(255, 255, 255));
tblDocTypesHelper.setName("tblDocTypesHelper");
tblDocTypesHelper.setOpaque(false);
tblDocTypesHelper.setShowHorizontalLines(false);
tblDocTypesHelper.setShowVerticalLines(false);
tblDocTypesHelper.getTableHeader().setResizingAllowed(false);
tblDocTypesHelper.getTableHeader().setReorderingAllowed(false);
eLProperty = org.jdesktop.beansbinding.ELProperty.create("${checkList}");
jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, applicationDocumentsHelper, eLProperty, tblDocTypesHelper);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${isInList}"));
columnBinding.setColumnName("Is In List");
columnBinding.setColumnClass(Boolean.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${displayValue}"));
columnBinding.setColumnName("Display Value");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
bindingGroup.addBinding(jTableBinding);
jTableBinding.bind();
scrollDocRequired.setViewportView(tblDocTypesHelper);
tblDocTypesHelper.getColumnModel().getColumn(0).setMinWidth(20);
tblDocTypesHelper.getColumnModel().getColumn(0).setPreferredWidth(20);
tblDocTypesHelper.getColumnModel().getColumn(0).setMaxWidth(20);
tblDocTypesHelper.getColumnModel().getColumn(0).setHeaderValue(bundle.getString("ApplicationPanel.tblDocTypesHelper.columnModel.title0_1"));
tblDocTypesHelper.getColumnModel().getColumn(1).setHeaderValue(bundle.getString("ApplicationPanel.tblDocTypesHelper.columnModel.title1_1"));
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
jPanel1.setName("jPanel1");
addDocumentPanel.setName("addDocumentPanel");
addDocumentPanel.setOkButtonText(bundle.getString("ApplicationPanel.addDocumentPanel.okButtonText"));
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(addDocumentPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 406, Short.MAX_VALUE)
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(addDocumentPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 116, Short.MAX_VALUE))
);
jToolBar1.setFloatable(false);
jToolBar1.setRollover(true);
jToolBar1.setToolTipText(bundle.getString("ApplicationPanel.jToolBar1.toolTipText"));
jToolBar1.setName("jToolBar1");
btnAddExistingDocument.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/add.png")));
btnAddExistingDocument.setText(bundle.getString("ApplicationPanel.btnAddExistingDocument.text"));
btnAddExistingDocument.setFocusable(false);
btnAddExistingDocument.setName(bundle.getString("ApplicationPanel.btnAddExistingDocument.name"));
btnAddExistingDocument.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
btnAddExistingDocument.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnAddExistingDocumentActionPerformed(evt);
}
});
jToolBar1.add(btnAddExistingDocument);
btnDeleteDoc.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/remove.png")));
btnDeleteDoc.setText(bundle.getString("ApplicationPanel.btnDeleteDoc.text"));
btnDeleteDoc.setName("btnDeleteDoc");
btnDeleteDoc.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnDeleteDocActionPerformed(evt);
}
});
jToolBar1.add(btnDeleteDoc);
btnOpenAttachment.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/document-view.png")));
btnOpenAttachment.setText(bundle.getString("ApplicationPanel.btnOpenAttachment.text"));
btnOpenAttachment.setActionCommand(bundle.getString("ApplicationPanel.btnOpenAttachment.actionCommand"));
btnOpenAttachment.setName("btnOpenAttachment");
btnOpenAttachment.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnOpenAttachmentActionPerformed(evt);
}
});
jToolBar1.add(btnOpenAttachment);
javax.swing.GroupLayout documentPanelLayout = new javax.swing.GroupLayout(documentPanel);
documentPanel.setLayout(documentPanelLayout);
documentPanelLayout.setHorizontalGroup(
documentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(documentPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(documentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(scrollDocuments, javax.swing.GroupLayout.DEFAULT_SIZE, 430, Short.MAX_VALUE)
.addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 373, Short.MAX_VALUE)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(documentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(labDocRequired, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(scrollDocRequired, javax.swing.GroupLayout.DEFAULT_SIZE, 236, Short.MAX_VALUE))
.addContainerGap())
);
documentPanelLayout.setVerticalGroup(
documentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(documentPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(documentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(documentPanelLayout.createSequentialGroup()
.addComponent(labDocRequired, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(scrollDocRequired, javax.swing.GroupLayout.DEFAULT_SIZE, 357, Short.MAX_VALUE))
.addGroup(documentPanelLayout.createSequentialGroup()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(scrollDocuments, javax.swing.GroupLayout.DEFAULT_SIZE, 211, Short.MAX_VALUE)))
.addContainerGap())
);
tabbedControlMain.addTab(bundle.getString("ApplicationPanel.documentPanel.TabConstraints.tabTitle"), documentPanel);
mapPanel.setName("mapPanel");
javax.swing.GroupLayout mapPanelLayout = new javax.swing.GroupLayout(mapPanel);
mapPanel.setLayout(mapPanelLayout);
mapPanelLayout.setHorizontalGroup(
mapPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 635, Short.MAX_VALUE)
);
mapPanelLayout.setVerticalGroup(
mapPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 407, Short.MAX_VALUE)
);
tabbedControlMain.addTab(bundle.getString("ApplicationPanel.mapPanel.TabConstraints.tabTitle"), mapPanel);
feesPanel.setName("feesPanel");
feesPanel.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
feesPanel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
feesPanelMouseClicked(evt);
}
});
scrollFeeDetails.setFont(new java.awt.Font("Tahoma", 0, 12));
scrollFeeDetails.setName("scrollFeeDetails");
tabFeeDetails.setColumnSelectionAllowed(true);
tabFeeDetails.setName("tabFeeDetails");
tabFeeDetails.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
eLProperty = org.jdesktop.beansbinding.ELProperty.create("${serviceList}");
jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, eLProperty, tabFeeDetails);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${requestType.displayValue}"));
columnBinding.setColumnName("Request Type.display Value");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${baseFee}"));
columnBinding.setColumnName("Base Fee");
columnBinding.setColumnClass(java.math.BigDecimal.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${areaFee}"));
columnBinding.setColumnName("Area Fee");
columnBinding.setColumnClass(java.math.BigDecimal.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${valueFee}"));
columnBinding.setColumnName("Value Fee");
columnBinding.setColumnClass(java.math.BigDecimal.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${expectedCompletionDate}"));
columnBinding.setColumnName("Expected Completion Date");
columnBinding.setColumnClass(java.util.Date.class);
columnBinding.setEditable(false);
bindingGroup.addBinding(jTableBinding);
jTableBinding.bind();
scrollFeeDetails.setViewportView(tabFeeDetails);
tabFeeDetails.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
tabFeeDetails.getColumnModel().getColumn(0).setHeaderValue(bundle.getString("ApplicationPanel.tabFeeDetails.columnModel.title0"));
tabFeeDetails.getColumnModel().getColumn(1).setHeaderValue(bundle.getString("ApplicationPanel.tabFeeDetails.columnModel.title1_1"));
tabFeeDetails.getColumnModel().getColumn(2).setHeaderValue(bundle.getString("ApplicationPanel.tabFeeDetails.columnModel.title2_2"));
tabFeeDetails.getColumnModel().getColumn(3).setHeaderValue(bundle.getString("ApplicationPanel.tabFeeDetails.columnModel.title3"));
tabFeeDetails.getColumnModel().getColumn(4).setHeaderValue(bundle.getString("ApplicationPanel.tabFeeDetails.columnModel.title4"));
jPanel2.setName("jPanel2");
formTxtServiceFee.setEditable(false);
formTxtServiceFee.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(java.text.NumberFormat.getCurrencyInstance())));
formTxtServiceFee.setInheritsPopupMenu(true);
formTxtServiceFee.setName("formTxtServiceFee");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${servicesFee}"), formTxtServiceFee, org.jdesktop.beansbinding.BeanProperty.create("value"));
bindingGroup.addBinding(binding);
formTxtServiceFee.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
formTxtServiceFee.setHorizontalAlignment(JFormattedTextField.LEADING);
formTxtTaxes.setEditable(false);
formTxtTaxes.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(java.text.NumberFormat.getCurrencyInstance())));
formTxtTaxes.setInheritsPopupMenu(true);
formTxtTaxes.setName("formTxtTaxes");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${tax}"), formTxtTaxes, org.jdesktop.beansbinding.BeanProperty.create("value"));
bindingGroup.addBinding(binding);
formTxtTaxes.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
formTxtTaxes.setHorizontalAlignment(JFormattedTextField.LEADING);
formTxtFee.setEditable(false);
formTxtFee.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(java.text.NumberFormat.getCurrencyInstance())));
formTxtFee.setName("formTxtFee");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${totalFee}"), formTxtFee, org.jdesktop.beansbinding.BeanProperty.create("value"));
bindingGroup.addBinding(binding);
formTxtFee.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
formTxtFee.setHorizontalAlignment(JFormattedTextField.LEADING);
formTxtPaid.setEditable(false);
formTxtPaid.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(java.text.NumberFormat.getCurrencyInstance())));
formTxtPaid.setName("formTxtPaid");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${totalAmountPaid}"), formTxtPaid, org.jdesktop.beansbinding.BeanProperty.create("value"));
bindingGroup.addBinding(binding);
formTxtPaid.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
formTxtPaid.setHorizontalAlignment(JFormattedTextField.LEADING);
cbxPaid.setText(bundle.getString("ApplicationPanel.cbxPaid.text"));
cbxPaid.setActionCommand(bundle.getString("ApplicationPanel.cbxPaid.actionCommand"));
cbxPaid.setMargin(new java.awt.Insets(2, 0, 2, 2));
cbxPaid.setName("cbxPaid");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${feePaid}"), cbxPaid, org.jdesktop.beansbinding.BeanProperty.create("selected"));
bindingGroup.addBinding(binding);
labTotalFee3.setText(bundle.getString("ApplicationPanel.labTotalFee3.text"));
labTotalFee3.setName("labTotalFee3");
LafManager.getInstance().setLabProperties(labTotalFee2);
labTotalFee2.setText(bundle.getString("ApplicationPanel.labTotalFee2.text"));
labTotalFee2.setName("labTotalFee2");
LafManager.getInstance().setLabProperties(labTotalFee);
labTotalFee.setText(bundle.getString("ApplicationPanel.labTotalFee.text"));
labTotalFee.setName("labTotalFee");
LafManager.getInstance().setLabProperties(labTotalFee1);
labTotalFee1.setText(bundle.getString("ApplicationPanel.labTotalFee1.text"));
labTotalFee1.setName("labTotalFee1");
labFixedFee.setBackground(new java.awt.Color(255, 255, 255));
LafManager.getInstance().setLabProperties(labFixedFee);
labFixedFee.setText(bundle.getString("ApplicationPanel.labFixedFee.text"));
labFixedFee.setName("labFixedFee");
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(labTotalFee1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGap(48, 48, 48))
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(formTxtServiceFee, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 15, Short.MAX_VALUE)))
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(formTxtTaxes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(21, 21, 21))
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(labFixedFee, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)))
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(formTxtFee, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(labTotalFee, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(labTotalFee2)
.addComponent(formTxtPaid, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addComponent(labTotalFee3, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cbxPaid)
.addGap(39, 39, 39))
);
jPanel2Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {formTxtFee, formTxtPaid, formTxtServiceFee, formTxtTaxes});
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(formTxtTaxes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(labTotalFee, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(labFixedFee))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(formTxtFee, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(labTotalFee1, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(formTxtServiceFee, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(labTotalFee2, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(labTotalFee3, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(cbxPaid))
.addComponent(formTxtPaid, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGap(32, 32, 32))
);
javax.swing.GroupLayout feesPanelLayout = new javax.swing.GroupLayout(feesPanel);
feesPanel.setLayout(feesPanelLayout);
feesPanelLayout.setHorizontalGroup(
feesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(feesPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(feesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(scrollFeeDetails, javax.swing.GroupLayout.DEFAULT_SIZE, 615, Short.MAX_VALUE)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
);
feesPanelLayout.setVerticalGroup(
feesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, feesPanelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(scrollFeeDetails, javax.swing.GroupLayout.DEFAULT_SIZE, 316, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
tabbedControlMain.addTab(bundle.getString("ApplicationPanel.feesPanel.TabConstraints.tabTitle"), feesPanel);
validationPanel.setFont(new java.awt.Font("Tahoma", 0, 12));
validationPanel.setName("validationPanel");
validationPanel.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
validationsPanel.setBackground(new java.awt.Color(255, 255, 255));
validationsPanel.setName("validationsPanel");
validationsPanel.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
tabValidations.setName("tabValidations");
eLProperty = org.jdesktop.beansbinding.ELProperty.create("${validationResutlList}");
jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, validationResultListBean, eLProperty, tabValidations);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${feedback}"));
columnBinding.setColumnName("Feedback");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${severity}"));
columnBinding.setColumnName("Severity");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${successful}"));
columnBinding.setColumnName("Successful");
columnBinding.setColumnClass(Boolean.class);
columnBinding.setEditable(false);
bindingGroup.addBinding(jTableBinding);
jTableBinding.bind();
validationsPanel.setViewportView(tabValidations);
tabValidations.getColumnModel().getColumn(0).setHeaderValue(bundle.getString("ApplicationPanel.tabValidations.columnModel.title1"));
tabValidations.getColumnModel().getColumn(0).setCellRenderer(new TableCellTextAreaRenderer());
tabValidations.getColumnModel().getColumn(1).setPreferredWidth(100);
tabValidations.getColumnModel().getColumn(1).setMaxWidth(100);
tabValidations.getColumnModel().getColumn(1).setHeaderValue(bundle.getString("ApplicationPanel.tabValidations.columnModel.title2"));
tabValidations.getColumnModel().getColumn(2).setPreferredWidth(45);
tabValidations.getColumnModel().getColumn(2).setMaxWidth(45);
tabValidations.getColumnModel().getColumn(2).setHeaderValue(bundle.getString("ApplicationPanel.tabValidations.columnModel.title3"));
tabValidations.getColumnModel().getColumn(2).setCellRenderer(new ViolationCellRenderer());
tabValidations.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
javax.swing.GroupLayout validationPanelLayout = new javax.swing.GroupLayout(validationPanel);
validationPanel.setLayout(validationPanelLayout);
validationPanelLayout.setHorizontalGroup(
validationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(validationPanelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(validationsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 615, Short.MAX_VALUE)
.addContainerGap())
);
validationPanelLayout.setVerticalGroup(
validationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(validationPanelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(validationsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 385, Short.MAX_VALUE)
.addContainerGap())
);
tabbedControlMain.addTab(bundle.getString("ApplicationPanel.validationPanel.TabConstraints.tabTitle"), validationPanel);
historyPanel.setFont(new java.awt.Font("Tahoma", 0, 12));
historyPanel.setName("historyPanel");
historyPanel.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
historyPanel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
historyPanelMouseClicked(evt);
}
});
actionLogPanel.setBorder(null);
actionLogPanel.setName("actionLogPanel");
actionLogPanel.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
tabActionLog.setName("tabActionLog");
eLProperty = org.jdesktop.beansbinding.ELProperty.create("${appLogList}");
jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, eLProperty, tabActionLog);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${changeTime}"));
columnBinding.setColumnName("Change Time");
columnBinding.setColumnClass(java.util.Date.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${userFullname}"));
columnBinding.setColumnName("User Fullname");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${description}"));
columnBinding.setColumnName("Description");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${notation}"));
columnBinding.setColumnName("Notation");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
bindingGroup.addBinding(jTableBinding);
jTableBinding.bind();
actionLogPanel.setViewportView(tabActionLog);
tabActionLog.getColumnModel().getColumn(0).setHeaderValue(bundle.getString("ApplicationPanel.tabActionLog.columnModel.title0"));
tabActionLog.getColumnModel().getColumn(0).setCellRenderer(new DateTimeRenderer());
tabActionLog.getColumnModel().getColumn(1).setHeaderValue(bundle.getString("ApplicationPanel.tabActionLog.columnModel.title1_1"));
tabActionLog.getColumnModel().getColumn(2).setHeaderValue(bundle.getString("ApplicationPanel.tabActionLog.columnModel.title2_1"));
tabActionLog.getColumnModel().getColumn(3).setHeaderValue(bundle.getString("ApplicationPanel.tabActionLog.columnModel.title3_1"));
tabActionLog.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
javax.swing.GroupLayout historyPanelLayout = new javax.swing.GroupLayout(historyPanel);
historyPanel.setLayout(historyPanelLayout);
historyPanelLayout.setHorizontalGroup(
historyPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(historyPanelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(actionLogPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 615, Short.MAX_VALUE)
.addContainerGap())
);
historyPanelLayout.setVerticalGroup(
historyPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(historyPanelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(actionLogPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 385, Short.MAX_VALUE)
.addContainerGap())
);
tabbedControlMain.addTab(bundle.getString("ApplicationPanel.historyPanel.TabConstraints.tabTitle"), historyPanel);
javax.swing.GroupLayout jPanel22Layout = new javax.swing.GroupLayout(jPanel22);
jPanel22.setLayout(jPanel22Layout);
jPanel22Layout.setHorizontalGroup(
jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(tabbedControlMain, javax.swing.GroupLayout.DEFAULT_SIZE, 640, Short.MAX_VALUE)
);
jPanel22Layout.setVerticalGroup(
jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(tabbedControlMain, javax.swing.GroupLayout.DEFAULT_SIZE, 435, Short.MAX_VALUE)
);
jScrollPane1.setViewportView(jPanel22);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(pnlHeader, javax.swing.GroupLayout.DEFAULT_SIZE, 717, Short.MAX_VALUE)
.addComponent(jToolBar3, javax.swing.GroupLayout.DEFAULT_SIZE, 660, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 697, Short.MAX_VALUE)
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(pnlHeader, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jToolBar3, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)
.addContainerGap())
);
bindingGroup.bind();
}
| private void initComponents() {
bindingGroup = new org.jdesktop.beansbinding.BindingGroup();
appBean = getApplicationBean();
partySummaryList = createPartySummaryList();
applicationDocumentsHelper = new org.sola.clients.beans.application.ApplicationDocumentsHelperBean();
validationResultListBean = new org.sola.clients.beans.validation.ValidationResultListBean();
popUpServices = new javax.swing.JPopupMenu();
menuAddService = new javax.swing.JMenuItem();
menuRemoveService = new javax.swing.JMenuItem();
jSeparator3 = new javax.swing.JPopupMenu.Separator();
menuMoveServiceUp = new javax.swing.JMenuItem();
menuMoveServiceDown = new javax.swing.JMenuItem();
jSeparator4 = new javax.swing.JPopupMenu.Separator();
menuViewService = new javax.swing.JMenuItem();
menuStartService = new javax.swing.JMenuItem();
menuCompleteService = new javax.swing.JMenuItem();
menuRevertService = new javax.swing.JMenuItem();
menuCancelService = new javax.swing.JMenuItem();
communicationTypes = createCommunicationTypes();
popupApplicationActions = new javax.swing.JPopupMenu();
menuApprove = new javax.swing.JMenuItem();
menuCancel = new javax.swing.JMenuItem();
menuWithdraw = new javax.swing.JMenuItem();
menuLapse = new javax.swing.JMenuItem();
menuRequisition = new javax.swing.JMenuItem();
menuResubmit = new javax.swing.JMenuItem();
menuDispatch = new javax.swing.JMenuItem();
menuArchive = new javax.swing.JMenuItem();
pnlHeader = new org.sola.clients.swing.ui.HeaderPanel();
jToolBar3 = new javax.swing.JToolBar();
btnSave = new javax.swing.JButton();
btnCalculateFee = new javax.swing.JButton();
btnValidate = new javax.swing.JButton();
jSeparator6 = new javax.swing.JToolBar.Separator();
btnPrintFee = new javax.swing.JButton();
btnPrintStatusReport = new javax.swing.JButton();
jSeparator5 = new javax.swing.JToolBar.Separator();
dropDownButton1 = new org.sola.clients.swing.common.controls.DropDownButton();
jScrollPane1 = new javax.swing.JScrollPane();
jPanel22 = new javax.swing.JPanel();
tabbedControlMain = new javax.swing.JTabbedPane();
contactPanel = new javax.swing.JPanel();
jPanel12 = new javax.swing.JPanel();
jPanel6 = new javax.swing.JPanel();
jPanel3 = new javax.swing.JPanel();
txtFirstName = new javax.swing.JTextField();
labName = new javax.swing.JLabel();
jPanel4 = new javax.swing.JPanel();
labLastName = new javax.swing.JLabel();
txtLastName = new javax.swing.JTextField();
jPanel5 = new javax.swing.JPanel();
txtAddress = new javax.swing.JTextField();
labAddress = new javax.swing.JLabel();
jPanel11 = new javax.swing.JPanel();
jPanel7 = new javax.swing.JPanel();
labPhone = new javax.swing.JLabel();
txtPhone = new javax.swing.JTextField();
jPanel8 = new javax.swing.JPanel();
labFax = new javax.swing.JLabel();
txtFax = new javax.swing.JTextField();
jPanel9 = new javax.swing.JPanel();
labEmail = new javax.swing.JLabel();
txtEmail = new javax.swing.JTextField();
jPanel10 = new javax.swing.JPanel();
labPreferredWay = new javax.swing.JLabel();
cbxCommunicationWay = new javax.swing.JComboBox();
groupPanel1 = new org.sola.clients.swing.ui.GroupPanel();
jPanel23 = new javax.swing.JPanel();
jPanel14 = new javax.swing.JPanel();
labAgents = new javax.swing.JLabel();
cbxAgents = new javax.swing.JComboBox();
jPanel15 = new javax.swing.JPanel();
labStatus = new javax.swing.JLabel();
txtStatus = new javax.swing.JTextField();
jPanel25 = new javax.swing.JPanel();
jPanel24 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
txtAppNumber = new javax.swing.JTextField();
jPanel13 = new javax.swing.JPanel();
labDate = new javax.swing.JLabel();
txtDate = new javax.swing.JTextField();
jPanel26 = new javax.swing.JPanel();
jLabel2 = new javax.swing.JLabel();
txtCompleteBy = new javax.swing.JTextField();
servicesPanel = new javax.swing.JPanel();
scrollFeeDetails1 = new javax.swing.JScrollPane();
tabServices = new org.sola.clients.swing.common.controls.JTableWithDefaultStyles();
tbServices = new javax.swing.JToolBar();
btnAddService = new javax.swing.JButton();
btnRemoveService = new javax.swing.JButton();
jSeparator1 = new javax.swing.JToolBar.Separator();
btnUPService = new javax.swing.JButton();
btnDownService = new javax.swing.JButton();
jSeparator2 = new javax.swing.JToolBar.Separator();
btnViewService = new javax.swing.JButton();
btnStartService = new javax.swing.JButton();
btnCompleteService = new javax.swing.JButton();
btnRevertService = new javax.swing.JButton();
btnCancelService = new javax.swing.JButton();
propertyPanel = new javax.swing.JPanel();
tbPropertyDetails = new javax.swing.JToolBar();
btnRemoveProperty = new javax.swing.JButton();
btnVerifyProperty = new javax.swing.JButton();
scrollPropertyDetails = new javax.swing.JScrollPane();
tabPropertyDetails = new org.sola.clients.swing.common.controls.JTableWithDefaultStyles();
jPanel20 = new javax.swing.JPanel();
propertypartPanel = new javax.swing.JPanel();
jPanel16 = new javax.swing.JPanel();
labFirstPart = new javax.swing.JLabel();
txtFirstPart = new javax.swing.JTextField();
jPanel17 = new javax.swing.JPanel();
txtLastPart = new javax.swing.JTextField();
labLastPart = new javax.swing.JLabel();
jPanel18 = new javax.swing.JPanel();
labArea = new javax.swing.JLabel();
txtArea = new javax.swing.JTextField();
jPanel19 = new javax.swing.JPanel();
labValue = new javax.swing.JLabel();
txtValue = new javax.swing.JTextField();
jPanel21 = new javax.swing.JPanel();
btnAddProperty = new javax.swing.JButton();
documentPanel = new javax.swing.JPanel();
scrollDocuments = new javax.swing.JScrollPane();
tabDocuments = new org.sola.clients.swing.common.controls.JTableWithDefaultStyles();
labDocRequired = new javax.swing.JLabel();
scrollDocRequired = new javax.swing.JScrollPane();
tblDocTypesHelper = new org.sola.clients.swing.common.controls.JTableWithDefaultStyles();
jPanel1 = new javax.swing.JPanel();
addDocumentPanel = new org.sola.clients.swing.ui.source.DocumentPanel();
jToolBar1 = new javax.swing.JToolBar();
btnAddExistingDocument = new javax.swing.JButton();
btnDeleteDoc = new javax.swing.JButton();
btnOpenAttachment = new javax.swing.JButton();
mapPanel = new javax.swing.JPanel();
feesPanel = new javax.swing.JPanel();
scrollFeeDetails = new javax.swing.JScrollPane();
tabFeeDetails = new org.sola.clients.swing.common.controls.JTableWithDefaultStyles();
jPanel2 = new javax.swing.JPanel();
formTxtServiceFee = new javax.swing.JFormattedTextField();
formTxtTaxes = new javax.swing.JFormattedTextField();
formTxtFee = new javax.swing.JFormattedTextField();
formTxtPaid = new javax.swing.JFormattedTextField();
cbxPaid = new javax.swing.JCheckBox();
labTotalFee3 = new javax.swing.JLabel();
labTotalFee2 = new javax.swing.JLabel();
labTotalFee = new javax.swing.JLabel();
labTotalFee1 = new javax.swing.JLabel();
labFixedFee = new javax.swing.JLabel();
validationPanel = new javax.swing.JPanel();
validationsPanel = new javax.swing.JScrollPane();
tabValidations = new org.sola.clients.swing.common.controls.JTableWithDefaultStyles();
historyPanel = new javax.swing.JPanel();
actionLogPanel = new javax.swing.JScrollPane();
tabActionLog = new org.sola.clients.swing.common.controls.JTableWithDefaultStyles();
popUpServices.setName("popUpServices");
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("org/sola/clients/swing/desktop/application/Bundle");
menuAddService.setText(bundle.getString("ApplicationPanel.menuAddService.text"));
menuAddService.setName("menuAddService");
menuAddService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuAddServiceActionPerformed(evt);
}
});
popUpServices.add(menuAddService);
menuRemoveService.setText(bundle.getString("ApplicationPanel.menuRemoveService.text"));
menuRemoveService.setName("menuRemoveService");
menuRemoveService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuRemoveServiceActionPerformed(evt);
}
});
popUpServices.add(menuRemoveService);
jSeparator3.setName("jSeparator3");
popUpServices.add(jSeparator3);
menuMoveServiceUp.setText(bundle.getString("ApplicationPanel.menuMoveServiceUp.text"));
menuMoveServiceUp.setName("menuMoveServiceUp");
menuMoveServiceUp.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuMoveServiceUpActionPerformed(evt);
}
});
popUpServices.add(menuMoveServiceUp);
menuMoveServiceDown.setText(bundle.getString("ApplicationPanel.menuMoveServiceDown.text"));
menuMoveServiceDown.setName("menuMoveServiceDown");
menuMoveServiceDown.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuMoveServiceDownActionPerformed(evt);
}
});
popUpServices.add(menuMoveServiceDown);
jSeparator4.setName("jSeparator4");
popUpServices.add(jSeparator4);
menuViewService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/view.png")));
menuViewService.setText(bundle.getString("ApplicationPanel.menuViewService.text"));
menuViewService.setName("menuViewService");
menuViewService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuViewServiceActionPerformed(evt);
}
});
popUpServices.add(menuViewService);
menuStartService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/start.png")));
menuStartService.setText(bundle.getString("ApplicationPanel.menuStartService.text"));
menuStartService.setName("menuStartService");
menuStartService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuStartServiceActionPerformed(evt);
}
});
popUpServices.add(menuStartService);
menuCompleteService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/confirm.png")));
menuCompleteService.setText(bundle.getString("ApplicationPanel.menuCompleteService.text"));
menuCompleteService.setName("menuCompleteService");
menuCompleteService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuCompleteServiceActionPerformed(evt);
}
});
popUpServices.add(menuCompleteService);
menuRevertService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/revert.png")));
menuRevertService.setText(bundle.getString("ApplicationPanel.menuRevertService.text"));
menuRevertService.setName("menuRevertService");
menuRevertService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuRevertServiceActionPerformed(evt);
}
});
popUpServices.add(menuRevertService);
menuCancelService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/cancel.png")));
menuCancelService.setText(bundle.getString("ApplicationPanel.menuCancelService.text"));
menuCancelService.setName("menuCancelService");
menuCancelService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuCancelServiceActionPerformed(evt);
}
});
popUpServices.add(menuCancelService);
popupApplicationActions.setName("popupApplicationActions");
menuApprove.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/approve.png")));
menuApprove.setText(bundle.getString("ApplicationPanel.menuApprove.text"));
menuApprove.setName("menuApprove");
menuApprove.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuApproveActionPerformed(evt);
}
});
popupApplicationActions.add(menuApprove);
menuCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/reject.png")));
menuCancel.setText(bundle.getString("ApplicationPanel.menuCancel.text"));
menuCancel.setName("menuCancel");
menuCancel.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuCancelActionPerformed(evt);
}
});
popupApplicationActions.add(menuCancel);
menuWithdraw.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/withdraw.png")));
menuWithdraw.setText(bundle.getString("ApplicationPanel.menuWithdraw.text"));
menuWithdraw.setName("menuWithdraw");
menuWithdraw.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuWithdrawActionPerformed(evt);
}
});
popupApplicationActions.add(menuWithdraw);
menuLapse.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/lapse.png")));
menuLapse.setText(bundle.getString("ApplicationPanel.menuLapse.text"));
menuLapse.setName("menuLapse");
menuLapse.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuLapseActionPerformed(evt);
}
});
popupApplicationActions.add(menuLapse);
menuRequisition.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/requisition.png")));
menuRequisition.setText(bundle.getString("ApplicationPanel.menuRequisition.text"));
menuRequisition.setName("menuRequisition");
menuRequisition.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuRequisitionActionPerformed(evt);
}
});
popupApplicationActions.add(menuRequisition);
menuResubmit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/resubmit.png")));
menuResubmit.setText(bundle.getString("ApplicationPanel.menuResubmit.text"));
menuResubmit.setName("menuResubmit");
menuResubmit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuResubmitActionPerformed(evt);
}
});
popupApplicationActions.add(menuResubmit);
menuDispatch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/envelope.png")));
menuDispatch.setText(bundle.getString("ApplicationPanel.menuDispatch.text"));
menuDispatch.setName("menuDispatch");
menuDispatch.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuDispatchActionPerformed(evt);
}
});
popupApplicationActions.add(menuDispatch);
menuArchive.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/archive.png")));
menuArchive.setText(bundle.getString("ApplicationPanel.menuArchive.text"));
menuArchive.setName("menuArchive");
menuArchive.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuArchiveActionPerformed(evt);
}
});
popupApplicationActions.add(menuArchive);
setHeaderPanel(pnlHeader);
setHelpTopic(bundle.getString("ApplicationPanel.helpTopic"));
setMinimumSize(new java.awt.Dimension(660, 458));
setName("Form");
setPreferredSize(new java.awt.Dimension(660, 458));
addComponentListener(new java.awt.event.ComponentAdapter() {
public void componentShown(java.awt.event.ComponentEvent evt) {
formComponentShown(evt);
}
});
pnlHeader.setName("pnlHeader");
pnlHeader.setTitleText(bundle.getString("ApplicationPanel.pnlHeader.titleText"));
jToolBar3.setFloatable(false);
jToolBar3.setRollover(true);
jToolBar3.setName("jToolBar3");
LafManager.getInstance().setBtnProperties(btnSave);
btnSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/save.png")));
btnSave.setText(bundle.getString("ApplicationPanel.btnSave.text"));
btnSave.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
btnSave.setName("btnSave");
btnSave.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
btnSave.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnSaveActionPerformed(evt);
}
});
jToolBar3.add(btnSave);
LafManager.getInstance().setBtnProperties(btnCalculateFee);
btnCalculateFee.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/calculate.png")));
btnCalculateFee.setText(bundle.getString("ApplicationPanel.btnCalculateFee.text"));
btnCalculateFee.setName("btnCalculateFee");
btnCalculateFee.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnCalculateFeeActionPerformed(evt);
}
});
jToolBar3.add(btnCalculateFee);
btnValidate.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/validation.png")));
btnValidate.setText(bundle.getString("ApplicationPanel.btnValidate.text"));
btnValidate.setName("btnValidate");
btnValidate.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
btnValidate.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnValidateActionPerformed(evt);
}
});
jToolBar3.add(btnValidate);
jSeparator6.setName("jSeparator6");
jToolBar3.add(jSeparator6);
btnPrintFee.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/print.png")));
btnPrintFee.setText(bundle.getString("ApplicationPanel.btnPrintFee.text"));
btnPrintFee.setName("btnPrintFee");
btnPrintFee.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnPrintFeeActionPerformed(evt);
}
});
jToolBar3.add(btnPrintFee);
btnPrintStatusReport.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/print.png")));
btnPrintStatusReport.setText(bundle.getString("ApplicationPanel.btnPrintStatusReport.text"));
btnPrintStatusReport.setFocusable(false);
btnPrintStatusReport.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
btnPrintStatusReport.setName("btnPrintStatusReport");
btnPrintStatusReport.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
btnPrintStatusReport.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnPrintStatusReportActionPerformed(evt);
}
});
jToolBar3.add(btnPrintStatusReport);
jSeparator5.setName("jSeparator5");
jToolBar3.add(jSeparator5);
dropDownButton1.setText(bundle.getString("ApplicationPanel.dropDownButton1.text"));
dropDownButton1.setComponentPopupMenu(popupApplicationActions);
dropDownButton1.setFocusable(false);
dropDownButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
dropDownButton1.setName("dropDownButton1");
dropDownButton1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
jToolBar3.add(dropDownButton1);
jScrollPane1.setBorder(null);
jScrollPane1.setName("jScrollPane1");
jScrollPane1.setPreferredSize(new java.awt.Dimension(642, 352));
jPanel22.setName("jPanel22");
jPanel22.setPreferredSize(new java.awt.Dimension(640, 435));
jPanel22.setRequestFocusEnabled(false);
tabbedControlMain.setName("tabbedControlMain");
tabbedControlMain.setPreferredSize(new java.awt.Dimension(440, 370));
tabbedControlMain.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
contactPanel.setName("contactPanel");
contactPanel.setPreferredSize(new java.awt.Dimension(645, 331));
contactPanel.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
contactPanel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
contactPanelMouseClicked(evt);
}
});
jPanel12.setName("jPanel12");
jPanel6.setName("jPanel6");
jPanel6.setLayout(new java.awt.GridLayout(1, 2, 15, 0));
jPanel3.setName("jPanel3");
txtFirstName.setName("txtFirstName");
org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${contactPerson.name}"), txtFirstName, org.jdesktop.beansbinding.BeanProperty.create("text"));
bindingGroup.addBinding(binding);
LafManager.getInstance().setTxtProperties(txtFirstName);
LafManager.getInstance().setLabProperties(labName);
labName.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/red_asterisk.gif")));
labName.setLabelFor(txtFirstName);
labName.setText(bundle.getString("ApplicationPanel.labName.text"));
labName.setIconTextGap(1);
labName.setName("labName");
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(labName, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(189, Short.MAX_VALUE))
.addComponent(txtFirstName, javax.swing.GroupLayout.DEFAULT_SIZE, 328, Short.MAX_VALUE)
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(labName)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtFirstName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel6.add(jPanel3);
jPanel4.setName("jPanel4");
LafManager.getInstance().setLabProperties(labLastName);
labLastName.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/red_asterisk.gif")));
labLastName.setText(bundle.getString("ApplicationPanel.labLastName.text"));
labLastName.setIconTextGap(1);
labLastName.setName("labLastName");
txtLastName.setName("txtLastName");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${contactPerson.lastName}"), txtLastName, org.jdesktop.beansbinding.BeanProperty.create("text"));
bindingGroup.addBinding(binding);
txtLastName.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
txtLastName.setHorizontalAlignment(JTextField.LEADING);
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(labLastName)
.addContainerGap(236, Short.MAX_VALUE))
.addComponent(txtLastName, javax.swing.GroupLayout.DEFAULT_SIZE, 328, Short.MAX_VALUE)
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(labLastName)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtLastName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel6.add(jPanel4);
jPanel5.setName("jPanel5");
txtAddress.setName("txtAddress");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${contactPerson.address.description}"), txtAddress, org.jdesktop.beansbinding.BeanProperty.create("text"));
bindingGroup.addBinding(binding);
txtAddress.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
txtAddress.setHorizontalAlignment(JTextField.LEADING);
LafManager.getInstance().setLabProperties(labAddress);
labAddress.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/red_asterisk.gif")));
labAddress.setText(bundle.getString("ApplicationPanel.labAddress.text"));
labAddress.setIconTextGap(1);
labAddress.setName("labAddress");
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
jPanel5.setLayout(jPanel5Layout);
jPanel5Layout.setHorizontalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(labAddress)
.addContainerGap())
.addComponent(txtAddress)
);
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(labAddress)
.addGap(4, 4, 4)
.addComponent(txtAddress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel11.setName("jPanel11");
jPanel11.setLayout(new java.awt.GridLayout(2, 2, 15, 0));
jPanel7.setName("jPanel7");
LafManager.getInstance().setLabProperties(labPhone);
labPhone.setText(bundle.getString("ApplicationPanel.labPhone.text"));
labPhone.setName("labPhone");
txtPhone.setName("txtPhone");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${contactPerson.phone}"), txtPhone, org.jdesktop.beansbinding.BeanProperty.create("text"));
bindingGroup.addBinding(binding);
txtPhone.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
txtPhone.setHorizontalAlignment(JTextField.LEADING);
txtPhone.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
txtPhoneFocusLost(evt);
}
});
javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
jPanel7.setLayout(jPanel7Layout);
jPanel7Layout.setHorizontalGroup(
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel7Layout.createSequentialGroup()
.addComponent(labPhone)
.addContainerGap(266, Short.MAX_VALUE))
.addComponent(txtPhone, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 328, Short.MAX_VALUE)
);
jPanel7Layout.setVerticalGroup(
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel7Layout.createSequentialGroup()
.addComponent(labPhone)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtPhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(22, Short.MAX_VALUE))
);
jPanel11.add(jPanel7);
jPanel8.setName("jPanel8");
LafManager.getInstance().setLabProperties(labFax);
labFax.setText(bundle.getString("ApplicationPanel.labFax.text"));
labFax.setName("labFax");
txtFax.setName("txtFax");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${contactPerson.fax}"), txtFax, org.jdesktop.beansbinding.BeanProperty.create("text"));
bindingGroup.addBinding(binding);
txtFax.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
txtFax.setHorizontalAlignment(JTextField.LEADING);
txtFax.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
txtFaxFocusLost(evt);
}
});
javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
jPanel8.setLayout(jPanel8Layout);
jPanel8Layout.setHorizontalGroup(
jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtFax, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
.addGroup(jPanel8Layout.createSequentialGroup()
.addComponent(labFax)
.addContainerGap())
);
jPanel8Layout.setVerticalGroup(
jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel8Layout.createSequentialGroup()
.addComponent(labFax, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtFax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(21, Short.MAX_VALUE))
);
jPanel11.add(jPanel8);
jPanel9.setName("jPanel9");
LafManager.getInstance().setLabProperties(labEmail);
labEmail.setText(bundle.getString("ApplicationPanel.labEmail.text"));
labEmail.setName("labEmail");
txtEmail.setName("txtEmail");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${contactPerson.email}"), txtEmail, org.jdesktop.beansbinding.BeanProperty.create("text"));
bindingGroup.addBinding(binding);
txtEmail.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
txtEmail.setHorizontalAlignment(JTextField.LEADING);
txtEmail.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
txtEmailFocusLost(evt);
}
});
javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
jPanel9.setLayout(jPanel9Layout);
jPanel9Layout.setHorizontalGroup(
jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel9Layout.createSequentialGroup()
.addComponent(labEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(160, Short.MAX_VALUE))
.addComponent(txtEmail, javax.swing.GroupLayout.DEFAULT_SIZE, 328, Short.MAX_VALUE)
);
jPanel9Layout.setVerticalGroup(
jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel9Layout.createSequentialGroup()
.addComponent(labEmail)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(22, Short.MAX_VALUE))
);
jPanel11.add(jPanel9);
jPanel10.setName("jPanel10");
LafManager.getInstance().setLabProperties(labPreferredWay);
labPreferredWay.setText(bundle.getString("ApplicationPanel.labPreferredWay.text"));
labPreferredWay.setName("labPreferredWay");
LafManager.getInstance().setCmbProperties(cbxCommunicationWay);
cbxCommunicationWay.setMaximumRowCount(9);
cbxCommunicationWay.setName("cbxCommunicationWay");
cbxCommunicationWay.setRenderer(new SimpleComboBoxRenderer("getDisplayValue"));
org.jdesktop.beansbinding.ELProperty eLProperty = org.jdesktop.beansbinding.ELProperty.create("${communicationTypeList}");
org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, communicationTypes, eLProperty, cbxCommunicationWay);
bindingGroup.addBinding(jComboBoxBinding);
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${contactPerson.preferredCommunication}"), cbxCommunicationWay, org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
bindingGroup.addBinding(binding);
cbxCommunicationWay.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
jPanel10.setLayout(jPanel10Layout);
jPanel10Layout.setHorizontalGroup(
jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel10Layout.createSequentialGroup()
.addComponent(labPreferredWay)
.addContainerGap(141, Short.MAX_VALUE))
.addComponent(cbxCommunicationWay, 0, 328, Short.MAX_VALUE)
);
jPanel10Layout.setVerticalGroup(
jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel10Layout.createSequentialGroup()
.addComponent(labPreferredWay)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cbxCommunicationWay, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(22, Short.MAX_VALUE))
);
jPanel11.add(jPanel10);
javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
jPanel12.setLayout(jPanel12Layout);
jPanel12Layout.setHorizontalGroup(
jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
.addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
);
jPanel12Layout.setVerticalGroup(
jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel12Layout.createSequentialGroup()
.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, 125, Short.MAX_VALUE))
);
groupPanel1.setName("groupPanel1");
groupPanel1.setTitleText(bundle.getString("ApplicationPanel.groupPanel1.titleText"));
jPanel23.setName("jPanel23");
jPanel23.setLayout(new java.awt.GridLayout(1, 4, 15, 0));
jPanel14.setName("jPanel14");
LafManager.getInstance().setLabProperties(labAgents);
labAgents.setText(bundle.getString("ApplicationPanel.labAgents.text"));
labAgents.setIconTextGap(1);
labAgents.setName("labAgents");
LafManager.getInstance().setCmbProperties(cbxAgents);
cbxAgents.setName("cbxAgents");
cbxAgents.setRenderer(new SimpleComboBoxRenderer("getName"));
cbxAgents.setRequestFocusEnabled(false);
eLProperty = org.jdesktop.beansbinding.ELProperty.create("${partySummaryList}");
jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, partySummaryList, eLProperty, cbxAgents);
bindingGroup.addBinding(jComboBoxBinding);
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${agent}"), cbxAgents, org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
bindingGroup.addBinding(binding);
cbxAgents.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
jPanel14.setLayout(jPanel14Layout);
jPanel14Layout.setHorizontalGroup(
jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(cbxAgents, 0, 328, Short.MAX_VALUE)
.addGroup(jPanel14Layout.createSequentialGroup()
.addComponent(labAgents)
.addContainerGap(267, Short.MAX_VALUE))
);
jPanel14Layout.setVerticalGroup(
jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel14Layout.createSequentialGroup()
.addComponent(labAgents)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cbxAgents, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel23.add(jPanel14);
jPanel15.setName("jPanel15");
LafManager.getInstance().setLabProperties(labStatus);
labStatus.setText(bundle.getString("ApplicationPanel.labStatus.text"));
labStatus.setName("labStatus");
txtStatus.setEditable(false);
txtStatus.setName("txtStatus");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${status.displayValue}"), txtStatus, org.jdesktop.beansbinding.BeanProperty.create("text"));
bindingGroup.addBinding(binding);
txtStatus.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
txtStatus.setHorizontalAlignment(JTextField.LEADING);
javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);
jPanel15.setLayout(jPanel15Layout);
jPanel15Layout.setHorizontalGroup(
jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtStatus, javax.swing.GroupLayout.DEFAULT_SIZE, 328, Short.MAX_VALUE)
.addGroup(jPanel15Layout.createSequentialGroup()
.addComponent(labStatus)
.addContainerGap(265, Short.MAX_VALUE))
);
jPanel15Layout.setVerticalGroup(
jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel15Layout.createSequentialGroup()
.addComponent(labStatus)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel23.add(jPanel15);
jPanel25.setName("jPanel25");
jPanel25.setLayout(new java.awt.GridLayout(1, 3, 15, 0));
jPanel24.setEnabled(false);
jPanel24.setFocusable(false);
jPanel24.setName("jPanel24");
jPanel24.setRequestFocusEnabled(false);
jLabel1.setText(bundle.getString("ApplicationPanel.jLabel1.text"));
jLabel1.setName("jLabel1");
txtAppNumber.setEditable(false);
txtAppNumber.setEnabled(false);
txtAppNumber.setFocusable(false);
txtAppNumber.setName("txtAppNumber");
txtAppNumber.setRequestFocusEnabled(false);
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${nr}"), txtAppNumber, org.jdesktop.beansbinding.BeanProperty.create("text"));
bindingGroup.addBinding(binding);
javax.swing.GroupLayout jPanel24Layout = new javax.swing.GroupLayout(jPanel24);
jPanel24.setLayout(jPanel24Layout);
jPanel24Layout.setHorizontalGroup(
jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel24Layout.createSequentialGroup()
.addComponent(jLabel1)
.addContainerGap(128, Short.MAX_VALUE))
.addComponent(txtAppNumber, javax.swing.GroupLayout.DEFAULT_SIZE, 214, Short.MAX_VALUE)
);
jPanel24Layout.setVerticalGroup(
jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel24Layout.createSequentialGroup()
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtAppNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel25.add(jPanel24);
jPanel13.setEnabled(false);
jPanel13.setFocusable(false);
jPanel13.setName("jPanel13");
jPanel13.setRequestFocusEnabled(false);
LafManager.getInstance().setLabProperties(labDate);
labDate.setText(bundle.getString("ApplicationPanel.labDate.text"));
labDate.setName("labDate");
txtDate.setEditable(false);
txtDate.setEnabled(false);
txtDate.setFocusable(false);
txtDate.setName("txtDate");
txtDate.setRequestFocusEnabled(false);
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${lodgingDatetime}"), txtDate, org.jdesktop.beansbinding.BeanProperty.create("text"));
binding.setConverter(new DateConverter());
bindingGroup.addBinding(binding);
txtDate.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
txtDate.setHorizontalAlignment(JTextField.LEADING);
javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
jPanel13.setLayout(jPanel13Layout);
jPanel13Layout.setHorizontalGroup(
jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtDate, javax.swing.GroupLayout.DEFAULT_SIZE, 214, Short.MAX_VALUE)
.addGroup(jPanel13Layout.createSequentialGroup()
.addComponent(labDate)
.addContainerGap(113, Short.MAX_VALUE))
);
jPanel13Layout.setVerticalGroup(
jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel13Layout.createSequentialGroup()
.addComponent(labDate)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel25.add(jPanel13);
jPanel26.setEnabled(false);
jPanel26.setFocusable(false);
jPanel26.setName("jPanel26");
jPanel26.setRequestFocusEnabled(false);
jLabel2.setText(bundle.getString("ApplicationPanel.jLabel2.text"));
jLabel2.setName("jLabel2");
txtCompleteBy.setEditable(false);
txtCompleteBy.setEnabled(false);
txtCompleteBy.setFocusable(false);
txtCompleteBy.setName("txtCompleteBy");
txtCompleteBy.setRequestFocusEnabled(false);
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${expectedCompletionDate}"), txtCompleteBy, org.jdesktop.beansbinding.BeanProperty.create("text"));
binding.setConverter(new DateConverter());
bindingGroup.addBinding(binding);
javax.swing.GroupLayout jPanel26Layout = new javax.swing.GroupLayout(jPanel26);
jPanel26.setLayout(jPanel26Layout);
jPanel26Layout.setHorizontalGroup(
jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel26Layout.createSequentialGroup()
.addComponent(jLabel2)
.addContainerGap(131, Short.MAX_VALUE))
.addComponent(txtCompleteBy, javax.swing.GroupLayout.DEFAULT_SIZE, 214, Short.MAX_VALUE)
);
jPanel26Layout.setVerticalGroup(
jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel26Layout.createSequentialGroup()
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtCompleteBy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel25.add(jPanel26);
javax.swing.GroupLayout contactPanelLayout = new javax.swing.GroupLayout(contactPanel);
contactPanel.setLayout(contactPanelLayout);
contactPanelLayout.setHorizontalGroup(
contactPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, contactPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(contactPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jPanel12, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel25, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
.addComponent(jPanel23, javax.swing.GroupLayout.DEFAULT_SIZE, 615, Short.MAX_VALUE)
.addComponent(groupPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
contactPanelLayout.setVerticalGroup(
contactPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(contactPanelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanel25, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel23, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(groupPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(20, Short.MAX_VALUE))
);
tabbedControlMain.addTab(bundle.getString("ApplicationPanel.contactPanel.TabConstraints.tabTitle"), contactPanel);
servicesPanel.setName("servicesPanel");
scrollFeeDetails1.setBackground(new java.awt.Color(255, 255, 255));
scrollFeeDetails1.setName("scrollFeeDetails1");
scrollFeeDetails1.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
tabServices.setComponentPopupMenu(popUpServices);
tabServices.setName("tabServices");
tabServices.setNextFocusableComponent(btnSave);
tabServices.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
tabServices.getTableHeader().setReorderingAllowed(false);
eLProperty = org.jdesktop.beansbinding.ELProperty.create("${serviceList}");
org.jdesktop.swingbinding.JTableBinding jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, eLProperty, tabServices);
org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${serviceOrder}"));
columnBinding.setColumnName("Service Order");
columnBinding.setColumnClass(Integer.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${requestType.displayValue}"));
columnBinding.setColumnName("Request Type.display Value");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${status.displayValue}"));
columnBinding.setColumnName("Status.display Value");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
bindingGroup.addBinding(jTableBinding);
jTableBinding.bind();binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${selectedService}"), tabServices, org.jdesktop.beansbinding.BeanProperty.create("selectedElement"));
bindingGroup.addBinding(binding);
scrollFeeDetails1.setViewportView(tabServices);
tabServices.getColumnModel().getColumn(0).setMinWidth(70);
tabServices.getColumnModel().getColumn(0).setPreferredWidth(70);
tabServices.getColumnModel().getColumn(0).setMaxWidth(70);
tabServices.getColumnModel().getColumn(0).setHeaderValue(bundle.getString("ApplicationPanel.tabFeeDetails1.columnModel.title0"));
tabServices.getColumnModel().getColumn(1).setHeaderValue(bundle.getString("ApplicationPanel.tabFeeDetails1.columnModel.title1"));
tabServices.getColumnModel().getColumn(2).setHeaderValue(bundle.getString("ApplicationPanel.tabFeeDetails1.columnModel.title2"));
tbServices.setFloatable(false);
tbServices.setRollover(true);
tbServices.setName("tbServices");
btnAddService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/add.png")));
btnAddService.setText(bundle.getString("ApplicationPanel.btnAddService.text"));
btnAddService.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
btnAddService.setName("btnAddService");
btnAddService.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
btnAddService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnAddServiceActionPerformed(evt);
}
});
tbServices.add(btnAddService);
btnRemoveService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/remove.png")));
btnRemoveService.setText(bundle.getString("ApplicationPanel.btnRemoveService.text"));
btnRemoveService.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
btnRemoveService.setName("btnRemoveService");
btnRemoveService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnRemoveServiceActionPerformed(evt);
}
});
tbServices.add(btnRemoveService);
jSeparator1.setName("jSeparator1");
tbServices.add(jSeparator1);
btnUPService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/up.png")));
btnUPService.setText(bundle.getString("ApplicationPanel.btnUPService.text"));
btnUPService.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
btnUPService.setName("btnUPService");
btnUPService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnUPServiceActionPerformed(evt);
}
});
tbServices.add(btnUPService);
btnDownService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/down.png")));
btnDownService.setText(bundle.getString("ApplicationPanel.btnDownService.text"));
btnDownService.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
btnDownService.setName("btnDownService");
btnDownService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnDownServiceActionPerformed(evt);
}
});
tbServices.add(btnDownService);
jSeparator2.setName("jSeparator2");
tbServices.add(jSeparator2);
btnViewService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/view.png")));
btnViewService.setText(bundle.getString("ApplicationPanel.btnViewService.text"));
btnViewService.setFocusable(false);
btnViewService.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
btnViewService.setName("btnViewService");
btnViewService.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
btnViewService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnViewServiceActionPerformed(evt);
}
});
tbServices.add(btnViewService);
btnStartService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/start.png")));
btnStartService.setText(bundle.getString("ApplicationPanel.btnStartService.text"));
btnStartService.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
btnStartService.setName("btnStartService");
btnStartService.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
btnStartService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnStartServiceActionPerformed(evt);
}
});
tbServices.add(btnStartService);
btnCompleteService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/confirm.png")));
btnCompleteService.setText(bundle.getString("ApplicationPanel.btnCompleteService.text"));
btnCompleteService.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
btnCompleteService.setName("btnCompleteService");
btnCompleteService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnCompleteServiceActionPerformed(evt);
}
});
tbServices.add(btnCompleteService);
btnRevertService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/revert.png")));
btnRevertService.setText(bundle.getString("ApplicationPanel.btnRevertService.text"));
btnRevertService.setFocusable(false);
btnRevertService.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
btnRevertService.setName("btnRevertService");
btnRevertService.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
btnRevertService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnRevertServiceActionPerformed(evt);
}
});
tbServices.add(btnRevertService);
btnCancelService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/cancel.png")));
btnCancelService.setText(bundle.getString("ApplicationPanel.btnCancelService.text"));
btnCancelService.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
btnCancelService.setName("btnCancelService");
btnCancelService.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnCancelServiceActionPerformed(evt);
}
});
tbServices.add(btnCancelService);
javax.swing.GroupLayout servicesPanelLayout = new javax.swing.GroupLayout(servicesPanel);
servicesPanel.setLayout(servicesPanelLayout);
servicesPanelLayout.setHorizontalGroup(
servicesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, servicesPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(servicesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(scrollFeeDetails1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 672, Short.MAX_VALUE)
.addComponent(tbServices, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 615, Short.MAX_VALUE))
.addContainerGap())
);
servicesPanelLayout.setVerticalGroup(
servicesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(servicesPanelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(tbServices, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(scrollFeeDetails1, javax.swing.GroupLayout.DEFAULT_SIZE, 354, Short.MAX_VALUE)
.addContainerGap())
);
tabbedControlMain.addTab(bundle.getString("ApplicationPanel.servicesPanel.TabConstraints.tabTitle"), servicesPanel);
propertyPanel.setName("propertyPanel");
propertyPanel.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
propertyPanel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
propertyPanelMouseClicked(evt);
}
});
tbPropertyDetails.setFloatable(false);
tbPropertyDetails.setRollover(true);
tbPropertyDetails.setToolTipText(bundle.getString("ApplicationPanel.tbPropertyDetails.toolTipText"));
tbPropertyDetails.setName("tbPropertyDetails");
btnRemoveProperty.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/remove.png")));
btnRemoveProperty.setText(bundle.getString("ApplicationPanel.btnRemoveProperty.text"));
btnRemoveProperty.setName("btnRemoveProperty");
btnRemoveProperty.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnRemovePropertyActionPerformed(evt);
}
});
tbPropertyDetails.add(btnRemoveProperty);
btnVerifyProperty.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/verify.png")));
btnVerifyProperty.setText(bundle.getString("ApplicationPanel.btnVerifyProperty.text"));
btnVerifyProperty.setName("btnVerifyProperty");
btnVerifyProperty.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnVerifyPropertyActionPerformed(evt);
}
});
tbPropertyDetails.add(btnVerifyProperty);
scrollPropertyDetails.setFont(new java.awt.Font("Tahoma", 0, 12));
scrollPropertyDetails.setName("scrollPropertyDetails");
scrollPropertyDetails.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
tabPropertyDetails.setName("tabPropertyDetails");
tabPropertyDetails.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
eLProperty = org.jdesktop.beansbinding.ELProperty.create("${filteredPropertyList}");
jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, eLProperty, tabPropertyDetails, "");
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${nameFirstpart}"));
columnBinding.setColumnName("Name Firstpart");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${nameLastpart}"));
columnBinding.setColumnName("Name Lastpart");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${area}"));
columnBinding.setColumnName("Area");
columnBinding.setColumnClass(java.math.BigDecimal.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${totalValue}"));
columnBinding.setColumnName("Total Value");
columnBinding.setColumnClass(java.math.BigDecimal.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${verifiedExists}"));
columnBinding.setColumnName("Verified Exists");
columnBinding.setColumnClass(Boolean.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${verifiedLocation}"));
columnBinding.setColumnName("Verified Location");
columnBinding.setColumnClass(Boolean.class);
columnBinding.setEditable(false);
bindingGroup.addBinding(jTableBinding);
jTableBinding.bind();binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${selectedProperty}"), tabPropertyDetails, org.jdesktop.beansbinding.BeanProperty.create("selectedElement"));
bindingGroup.addBinding(binding);
scrollPropertyDetails.setViewportView(tabPropertyDetails);
tabPropertyDetails.getColumnModel().getColumn(0).setHeaderValue(bundle.getString("ApplicationPanel.tabPropertyDetails.columnModel.title0"));
tabPropertyDetails.getColumnModel().getColumn(1).setHeaderValue(bundle.getString("ApplicationPanel.tabPropertyDetails.columnModel.title1"));
tabPropertyDetails.getColumnModel().getColumn(2).setHeaderValue(bundle.getString("ApplicationPanel.tabPropertyDetails.columnModel.title2"));
tabPropertyDetails.getColumnModel().getColumn(3).setHeaderValue(bundle.getString("ApplicationPanel.tabPropertyDetails.columnModel.title3"));
tabPropertyDetails.getColumnModel().getColumn(4).setHeaderValue(bundle.getString("ApplicationPanel.tabPropertyDetails.columnModel.title4"));
tabPropertyDetails.getColumnModel().getColumn(5).setHeaderValue(bundle.getString("ApplicationPanel.tabPropertyDetails.columnModel.title6"));
jPanel20.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
jPanel20.setName("jPanel20");
propertypartPanel.setFont(new java.awt.Font("Tahoma", 0, 12));
propertypartPanel.setName("propertypartPanel");
propertypartPanel.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
propertypartPanel.setLayout(new java.awt.GridLayout(1, 4, 15, 0));
jPanel16.setName("jPanel16");
LafManager.getInstance().setLabProperties(labFirstPart);
labFirstPart.setText(bundle.getString("ApplicationPanel.labFirstPart.text"));
labFirstPart.setName("labFirstPart");
LafManager.getInstance().setTxtProperties(txtFirstPart);
txtFirstPart.setText(bundle.getString("ApplicationPanel.txtFirstPart.text"));
txtFirstPart.setName("txtFirstPart");
txtFirstPart.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
txtFirstPart.setHorizontalAlignment(JTextField.LEADING);
javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);
jPanel16.setLayout(jPanel16Layout);
jPanel16Layout.setHorizontalGroup(
jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel16Layout.createSequentialGroup()
.addComponent(labFirstPart)
.addContainerGap(60, Short.MAX_VALUE))
.addComponent(txtFirstPart, javax.swing.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE)
);
jPanel16Layout.setVerticalGroup(
jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel16Layout.createSequentialGroup()
.addComponent(labFirstPart)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(txtFirstPart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(55, 55, 55))
);
propertypartPanel.add(jPanel16);
jPanel17.setName("jPanel17");
txtLastPart.setText(bundle.getString("ApplicationPanel.txtLastPart.text"));
txtLastPart.setName("txtLastPart");
txtLastPart.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
txtLastPart.setHorizontalAlignment(JTextField.LEADING);
LafManager.getInstance().setLabProperties(labLastPart);
labLastPart.setText(bundle.getString("ApplicationPanel.labLastPart.text"));
labLastPart.setName("labLastPart");
javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17);
jPanel17.setLayout(jPanel17Layout);
jPanel17Layout.setHorizontalGroup(
jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel17Layout.createSequentialGroup()
.addComponent(labLastPart)
.addContainerGap(61, Short.MAX_VALUE))
.addComponent(txtLastPart, javax.swing.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE)
);
jPanel17Layout.setVerticalGroup(
jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel17Layout.createSequentialGroup()
.addComponent(labLastPart)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtLastPart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(23, Short.MAX_VALUE))
);
propertypartPanel.add(jPanel17);
jPanel18.setName("jPanel18");
LafManager.getInstance().setLabProperties(labArea);
labArea.setText(bundle.getString("ApplicationPanel.labArea.text"));
labArea.setName("labArea");
txtArea.setText(bundle.getString("ApplicationPanel.txtArea.text"));
txtArea.setName("txtArea");
txtArea.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
txtArea.setHorizontalAlignment(JTextField.LEADING);
javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);
jPanel18.setLayout(jPanel18Layout);
jPanel18Layout.setHorizontalGroup(
jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel18Layout.createSequentialGroup()
.addComponent(labArea)
.addContainerGap(56, Short.MAX_VALUE))
.addComponent(txtArea, javax.swing.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE)
);
jPanel18Layout.setVerticalGroup(
jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel18Layout.createSequentialGroup()
.addComponent(labArea)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtArea, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(23, Short.MAX_VALUE))
);
propertypartPanel.add(jPanel18);
jPanel19.setName("jPanel19");
LafManager.getInstance().setLabProperties(labValue);
labValue.setText(bundle.getString("ApplicationPanel.labValue.text"));
labValue.setName("labValue");
txtValue.setText(bundle.getString("ApplicationPanel.txtValue.text"));
txtValue.setName("txtValue");
txtValue.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
txtValue.setHorizontalAlignment(JTextField.LEADING);
javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19);
jPanel19.setLayout(jPanel19Layout);
jPanel19Layout.setHorizontalGroup(
jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel19Layout.createSequentialGroup()
.addComponent(labValue)
.addContainerGap(78, Short.MAX_VALUE))
.addComponent(txtValue, javax.swing.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE)
);
jPanel19Layout.setVerticalGroup(
jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel19Layout.createSequentialGroup()
.addComponent(labValue)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(23, Short.MAX_VALUE))
);
propertypartPanel.add(jPanel19);
jPanel21.setName("jPanel21");
jPanel21.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 5, 18));
LafManager.getInstance().setBtnProperties(btnAddProperty);
btnAddProperty.setText(bundle.getString("ApplicationPanel.btnAddProperty.text"));
btnAddProperty.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
btnAddProperty.setName("btnAddProperty");
btnAddProperty.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnAddPropertyActionPerformed(evt);
}
});
jPanel21.add(btnAddProperty);
javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20);
jPanel20.setLayout(jPanel20Layout);
jPanel20Layout.setHorizontalGroup(
jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel20Layout.createSequentialGroup()
.addContainerGap()
.addComponent(propertypartPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel21, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
jPanel20Layout.setVerticalGroup(
jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel20Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel21, javax.swing.GroupLayout.DEFAULT_SIZE, 63, Short.MAX_VALUE)
.addComponent(propertypartPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 63, Short.MAX_VALUE)))
);
javax.swing.GroupLayout propertyPanelLayout = new javax.swing.GroupLayout(propertyPanel);
propertyPanel.setLayout(propertyPanelLayout);
propertyPanelLayout.setHorizontalGroup(
propertyPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, propertyPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(propertyPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(scrollPropertyDetails, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 615, Short.MAX_VALUE)
.addComponent(jPanel20, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(tbPropertyDetails, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
propertyPanelLayout.setVerticalGroup(
propertyPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(propertyPanelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanel20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(tbPropertyDetails, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(scrollPropertyDetails, javax.swing.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE)
.addContainerGap())
);
tabbedControlMain.addTab(bundle.getString("ApplicationPanel.propertyPanel.TabConstraints.tabTitle"), propertyPanel);
documentPanel.setName("documentPanel");
documentPanel.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
documentPanel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
documentPanelMouseClicked(evt);
}
});
scrollDocuments.setFont(new java.awt.Font("Tahoma", 0, 12));
scrollDocuments.setName("scrollDocuments");
scrollDocuments.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
tabDocuments.setName("tabDocuments");
tabDocuments.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
eLProperty = org.jdesktop.beansbinding.ELProperty.create("${sourceFilteredList}");
jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, eLProperty, tabDocuments);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${sourceType.displayValue}"));
columnBinding.setColumnName("Source Type.display Value");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${acceptance}"));
columnBinding.setColumnName("Acceptance");
columnBinding.setColumnClass(java.util.Date.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${laNr}"));
columnBinding.setColumnName("La Nr");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${referenceNr}"));
columnBinding.setColumnName("Reference Nr");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${recordation}"));
columnBinding.setColumnName("Recordation");
columnBinding.setColumnClass(java.util.Date.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${submission}"));
columnBinding.setColumnName("Submission");
columnBinding.setColumnClass(java.util.Date.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${archiveDocumentId}"));
columnBinding.setColumnName("Archive Document Id");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
bindingGroup.addBinding(jTableBinding);
jTableBinding.bind();binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${selectedSource}"), tabDocuments, org.jdesktop.beansbinding.BeanProperty.create("selectedElement"));
bindingGroup.addBinding(binding);
tabDocuments.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
tabDocumentsMouseClicked(evt);
}
});
scrollDocuments.setViewportView(tabDocuments);
tabDocuments.getColumnModel().getColumn(0).setHeaderValue(bundle.getString("ApplicationPanel.tabDocuments.columnModel.title0_1"));
tabDocuments.getColumnModel().getColumn(0).setCellRenderer(new ReferenceCodeCellConverter(CacheManager.getSourceTypesMap()));
tabDocuments.getColumnModel().getColumn(1).setHeaderValue(bundle.getString("ApplicationPanel.tabDocuments.columnModel.title1_1"));
tabDocuments.getColumnModel().getColumn(2).setHeaderValue(bundle.getString("ApplicationPanel.tabDocuments.columnModel.title2_1"));
tabDocuments.getColumnModel().getColumn(3).setHeaderValue(bundle.getString("ApplicationPanel.tabDocuments.columnModel.title3_1"));
tabDocuments.getColumnModel().getColumn(4).setHeaderValue(bundle.getString("ApplicationPanel.tabDocuments.columnModel.title4_1"));
tabDocuments.getColumnModel().getColumn(5).setHeaderValue(bundle.getString("ApplicationPanel.tabDocuments.columnModel.title5"));
tabDocuments.getColumnModel().getColumn(6).setPreferredWidth(30);
tabDocuments.getColumnModel().getColumn(6).setMaxWidth(30);
tabDocuments.getColumnModel().getColumn(6).setHeaderValue(bundle.getString("ApplicationPanel.tabDocuments.columnModel.title6"));
tabDocuments.getColumnModel().getColumn(6).setCellRenderer(new AttachedDocumentCellRenderer());
labDocRequired.setBackground(new java.awt.Color(255, 255, 204));
labDocRequired.setText(bundle.getString("ApplicationPanel.labDocRequired.text"));
labDocRequired.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 102)));
labDocRequired.setName("labDocRequired");
labDocRequired.setOpaque(true);
scrollDocRequired.setBackground(new java.awt.Color(255, 255, 255));
scrollDocRequired.setName("scrollDocRequired");
scrollDocRequired.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
tblDocTypesHelper.setBackground(new java.awt.Color(255, 255, 255));
tblDocTypesHelper.setGridColor(new java.awt.Color(255, 255, 255));
tblDocTypesHelper.setName("tblDocTypesHelper");
tblDocTypesHelper.setOpaque(false);
tblDocTypesHelper.setShowHorizontalLines(false);
tblDocTypesHelper.setShowVerticalLines(false);
tblDocTypesHelper.getTableHeader().setResizingAllowed(false);
tblDocTypesHelper.getTableHeader().setReorderingAllowed(false);
eLProperty = org.jdesktop.beansbinding.ELProperty.create("${checkList}");
jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, applicationDocumentsHelper, eLProperty, tblDocTypesHelper);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${isInList}"));
columnBinding.setColumnName("Is In List");
columnBinding.setColumnClass(Boolean.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${displayValue}"));
columnBinding.setColumnName("Display Value");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
bindingGroup.addBinding(jTableBinding);
jTableBinding.bind();
scrollDocRequired.setViewportView(tblDocTypesHelper);
tblDocTypesHelper.getColumnModel().getColumn(0).setMinWidth(20);
tblDocTypesHelper.getColumnModel().getColumn(0).setPreferredWidth(20);
tblDocTypesHelper.getColumnModel().getColumn(0).setMaxWidth(20);
tblDocTypesHelper.getColumnModel().getColumn(0).setHeaderValue(bundle.getString("ApplicationPanel.tblDocTypesHelper.columnModel.title0_1"));
tblDocTypesHelper.getColumnModel().getColumn(1).setHeaderValue(bundle.getString("ApplicationPanel.tblDocTypesHelper.columnModel.title1_1"));
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
jPanel1.setName("jPanel1");
addDocumentPanel.setName("addDocumentPanel");
addDocumentPanel.setOkButtonText(bundle.getString("ApplicationPanel.addDocumentPanel.okButtonText"));
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(addDocumentPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 406, Short.MAX_VALUE)
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(addDocumentPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 116, Short.MAX_VALUE))
);
jToolBar1.setFloatable(false);
jToolBar1.setRollover(true);
jToolBar1.setToolTipText(bundle.getString("ApplicationPanel.jToolBar1.toolTipText"));
jToolBar1.setName("jToolBar1");
btnAddExistingDocument.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/add.png")));
btnAddExistingDocument.setText(bundle.getString("ApplicationPanel.btnAddExistingDocument.text"));
btnAddExistingDocument.setFocusable(false);
btnAddExistingDocument.setName(bundle.getString("ApplicationPanel.btnAddExistingDocument.name"));
btnAddExistingDocument.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
btnAddExistingDocument.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnAddExistingDocumentActionPerformed(evt);
}
});
jToolBar1.add(btnAddExistingDocument);
btnDeleteDoc.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/remove.png")));
btnDeleteDoc.setText(bundle.getString("ApplicationPanel.btnDeleteDoc.text"));
btnDeleteDoc.setName("btnDeleteDoc");
btnDeleteDoc.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnDeleteDocActionPerformed(evt);
}
});
jToolBar1.add(btnDeleteDoc);
btnOpenAttachment.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/common/document-view.png")));
btnOpenAttachment.setText(bundle.getString("ApplicationPanel.btnOpenAttachment.text"));
btnOpenAttachment.setActionCommand(bundle.getString("ApplicationPanel.btnOpenAttachment.actionCommand"));
btnOpenAttachment.setName("btnOpenAttachment");
btnOpenAttachment.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnOpenAttachmentActionPerformed(evt);
}
});
jToolBar1.add(btnOpenAttachment);
javax.swing.GroupLayout documentPanelLayout = new javax.swing.GroupLayout(documentPanel);
documentPanel.setLayout(documentPanelLayout);
documentPanelLayout.setHorizontalGroup(
documentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(documentPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(documentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(scrollDocuments, javax.swing.GroupLayout.DEFAULT_SIZE, 430, Short.MAX_VALUE)
.addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 373, Short.MAX_VALUE)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(documentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(labDocRequired, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(scrollDocRequired, javax.swing.GroupLayout.DEFAULT_SIZE, 236, Short.MAX_VALUE))
.addContainerGap())
);
documentPanelLayout.setVerticalGroup(
documentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(documentPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(documentPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(documentPanelLayout.createSequentialGroup()
.addComponent(labDocRequired, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(scrollDocRequired, javax.swing.GroupLayout.DEFAULT_SIZE, 357, Short.MAX_VALUE))
.addGroup(documentPanelLayout.createSequentialGroup()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(scrollDocuments, javax.swing.GroupLayout.DEFAULT_SIZE, 211, Short.MAX_VALUE)))
.addContainerGap())
);
tabbedControlMain.addTab(bundle.getString("ApplicationPanel.documentPanel.TabConstraints.tabTitle"), documentPanel);
mapPanel.setName("mapPanel");
javax.swing.GroupLayout mapPanelLayout = new javax.swing.GroupLayout(mapPanel);
mapPanel.setLayout(mapPanelLayout);
mapPanelLayout.setHorizontalGroup(
mapPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 635, Short.MAX_VALUE)
);
mapPanelLayout.setVerticalGroup(
mapPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 407, Short.MAX_VALUE)
);
tabbedControlMain.addTab(bundle.getString("ApplicationPanel.mapPanel.TabConstraints.tabTitle"), mapPanel);
feesPanel.setName("feesPanel");
feesPanel.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
feesPanel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
feesPanelMouseClicked(evt);
}
});
scrollFeeDetails.setFont(new java.awt.Font("Tahoma", 0, 12));
scrollFeeDetails.setName("scrollFeeDetails");
tabFeeDetails.setColumnSelectionAllowed(true);
tabFeeDetails.setName("tabFeeDetails");
tabFeeDetails.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
eLProperty = org.jdesktop.beansbinding.ELProperty.create("${serviceList}");
jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, eLProperty, tabFeeDetails);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${requestType.displayValue}"));
columnBinding.setColumnName("Request Type.display Value");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${baseFee}"));
columnBinding.setColumnName("Base Fee");
columnBinding.setColumnClass(java.math.BigDecimal.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${areaFee}"));
columnBinding.setColumnName("Area Fee");
columnBinding.setColumnClass(java.math.BigDecimal.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${valueFee}"));
columnBinding.setColumnName("Value Fee");
columnBinding.setColumnClass(java.math.BigDecimal.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${expectedCompletionDate}"));
columnBinding.setColumnName("Expected Completion Date");
columnBinding.setColumnClass(java.util.Date.class);
columnBinding.setEditable(false);
bindingGroup.addBinding(jTableBinding);
jTableBinding.bind();
scrollFeeDetails.setViewportView(tabFeeDetails);
tabFeeDetails.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
tabFeeDetails.getColumnModel().getColumn(0).setHeaderValue(bundle.getString("ApplicationPanel.tabFeeDetails.columnModel.title0"));
tabFeeDetails.getColumnModel().getColumn(1).setHeaderValue(bundle.getString("ApplicationPanel.tabFeeDetails.columnModel.title1_1"));
tabFeeDetails.getColumnModel().getColumn(2).setHeaderValue(bundle.getString("ApplicationPanel.tabFeeDetails.columnModel.title2_2"));
tabFeeDetails.getColumnModel().getColumn(3).setHeaderValue(bundle.getString("ApplicationPanel.tabFeeDetails.columnModel.title3"));
tabFeeDetails.getColumnModel().getColumn(4).setHeaderValue(bundle.getString("ApplicationPanel.tabFeeDetails.columnModel.title4"));
jPanel2.setName("jPanel2");
formTxtServiceFee.setEditable(false);
formTxtServiceFee.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(java.text.NumberFormat.getCurrencyInstance())));
formTxtServiceFee.setInheritsPopupMenu(true);
formTxtServiceFee.setName("formTxtServiceFee");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${servicesFee}"), formTxtServiceFee, org.jdesktop.beansbinding.BeanProperty.create("value"));
bindingGroup.addBinding(binding);
formTxtServiceFee.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
formTxtServiceFee.setHorizontalAlignment(JFormattedTextField.LEADING);
formTxtTaxes.setEditable(false);
formTxtTaxes.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(java.text.NumberFormat.getCurrencyInstance())));
formTxtTaxes.setInheritsPopupMenu(true);
formTxtTaxes.setName("formTxtTaxes");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${tax}"), formTxtTaxes, org.jdesktop.beansbinding.BeanProperty.create("value"));
bindingGroup.addBinding(binding);
formTxtTaxes.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
formTxtTaxes.setHorizontalAlignment(JFormattedTextField.LEADING);
formTxtFee.setEditable(false);
formTxtFee.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(java.text.NumberFormat.getCurrencyInstance())));
formTxtFee.setName("formTxtFee");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${totalFee}"), formTxtFee, org.jdesktop.beansbinding.BeanProperty.create("value"));
bindingGroup.addBinding(binding);
formTxtFee.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
formTxtFee.setHorizontalAlignment(JFormattedTextField.LEADING);
formTxtPaid.setEditable(false);
formTxtPaid.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(java.text.NumberFormat.getCurrencyInstance())));
formTxtPaid.setName("formTxtPaid");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${totalAmountPaid}"), formTxtPaid, org.jdesktop.beansbinding.BeanProperty.create("value"));
bindingGroup.addBinding(binding);
formTxtPaid.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
formTxtPaid.setHorizontalAlignment(JFormattedTextField.LEADING);
cbxPaid.setText(bundle.getString("ApplicationPanel.cbxPaid.text"));
cbxPaid.setActionCommand(bundle.getString("ApplicationPanel.cbxPaid.actionCommand"));
cbxPaid.setMargin(new java.awt.Insets(2, 0, 2, 2));
cbxPaid.setName("cbxPaid");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, org.jdesktop.beansbinding.ELProperty.create("${feePaid}"), cbxPaid, org.jdesktop.beansbinding.BeanProperty.create("selected"));
bindingGroup.addBinding(binding);
labTotalFee3.setText(bundle.getString("ApplicationPanel.labTotalFee3.text"));
labTotalFee3.setName("labTotalFee3");
LafManager.getInstance().setLabProperties(labTotalFee2);
labTotalFee2.setText(bundle.getString("ApplicationPanel.labTotalFee2.text"));
labTotalFee2.setName("labTotalFee2");
LafManager.getInstance().setLabProperties(labTotalFee);
labTotalFee.setText(bundle.getString("ApplicationPanel.labTotalFee.text"));
labTotalFee.setName("labTotalFee");
LafManager.getInstance().setLabProperties(labTotalFee1);
labTotalFee1.setText(bundle.getString("ApplicationPanel.labTotalFee1.text"));
labTotalFee1.setName("labTotalFee1");
labFixedFee.setBackground(new java.awt.Color(255, 255, 255));
LafManager.getInstance().setLabProperties(labFixedFee);
labFixedFee.setText(bundle.getString("ApplicationPanel.labFixedFee.text"));
labFixedFee.setName("labFixedFee");
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(labTotalFee1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGap(48, 48, 48))
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(formTxtServiceFee, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 15, Short.MAX_VALUE)))
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(formTxtTaxes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(21, 21, 21))
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(labFixedFee, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)))
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(formTxtFee, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(labTotalFee, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(labTotalFee2)
.addComponent(formTxtPaid, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addComponent(labTotalFee3, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(cbxPaid)
.addGap(39, 39, 39))
);
jPanel2Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {formTxtFee, formTxtPaid, formTxtServiceFee, formTxtTaxes});
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(formTxtTaxes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(labTotalFee, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(labFixedFee))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(formTxtFee, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(labTotalFee1, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(formTxtServiceFee, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(labTotalFee2, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(labTotalFee3, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(cbxPaid))
.addComponent(formTxtPaid, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGap(32, 32, 32))
);
javax.swing.GroupLayout feesPanelLayout = new javax.swing.GroupLayout(feesPanel);
feesPanel.setLayout(feesPanelLayout);
feesPanelLayout.setHorizontalGroup(
feesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(feesPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(feesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(scrollFeeDetails, javax.swing.GroupLayout.DEFAULT_SIZE, 615, Short.MAX_VALUE)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
);
feesPanelLayout.setVerticalGroup(
feesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, feesPanelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(scrollFeeDetails, javax.swing.GroupLayout.DEFAULT_SIZE, 316, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
tabbedControlMain.addTab(bundle.getString("ApplicationPanel.feesPanel.TabConstraints.tabTitle"), feesPanel);
validationPanel.setFont(new java.awt.Font("Tahoma", 0, 12));
validationPanel.setName("validationPanel");
validationPanel.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
validationsPanel.setBackground(new java.awt.Color(255, 255, 255));
validationsPanel.setName("validationsPanel");
validationsPanel.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
tabValidations.setName("tabValidations");
eLProperty = org.jdesktop.beansbinding.ELProperty.create("${validationResutlList}");
jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, validationResultListBean, eLProperty, tabValidations);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${feedback}"));
columnBinding.setColumnName("Feedback");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${severity}"));
columnBinding.setColumnName("Severity");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${successful}"));
columnBinding.setColumnName("Successful");
columnBinding.setColumnClass(Boolean.class);
columnBinding.setEditable(false);
bindingGroup.addBinding(jTableBinding);
jTableBinding.bind();
validationsPanel.setViewportView(tabValidations);
tabValidations.getColumnModel().getColumn(0).setHeaderValue(bundle.getString("ApplicationPanel.tabValidations.columnModel.title1"));
tabValidations.getColumnModel().getColumn(0).setCellRenderer(new TableCellTextAreaRenderer());
tabValidations.getColumnModel().getColumn(1).setPreferredWidth(100);
tabValidations.getColumnModel().getColumn(1).setMaxWidth(100);
tabValidations.getColumnModel().getColumn(1).setHeaderValue(bundle.getString("ApplicationPanel.tabValidations.columnModel.title2"));
tabValidations.getColumnModel().getColumn(2).setPreferredWidth(45);
tabValidations.getColumnModel().getColumn(2).setMaxWidth(45);
tabValidations.getColumnModel().getColumn(2).setHeaderValue(bundle.getString("ApplicationPanel.tabValidations.columnModel.title3"));
tabValidations.getColumnModel().getColumn(2).setCellRenderer(new ViolationCellRenderer());
tabValidations.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
javax.swing.GroupLayout validationPanelLayout = new javax.swing.GroupLayout(validationPanel);
validationPanel.setLayout(validationPanelLayout);
validationPanelLayout.setHorizontalGroup(
validationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(validationPanelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(validationsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 615, Short.MAX_VALUE)
.addContainerGap())
);
validationPanelLayout.setVerticalGroup(
validationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(validationPanelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(validationsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 385, Short.MAX_VALUE)
.addContainerGap())
);
tabbedControlMain.addTab(bundle.getString("ApplicationPanel.validationPanel.TabConstraints.tabTitle"), validationPanel);
historyPanel.setFont(new java.awt.Font("Tahoma", 0, 12));
historyPanel.setName("historyPanel");
historyPanel.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
historyPanel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
historyPanelMouseClicked(evt);
}
});
actionLogPanel.setBorder(null);
actionLogPanel.setName("actionLogPanel");
actionLogPanel.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
tabActionLog.setName("tabActionLog");
eLProperty = org.jdesktop.beansbinding.ELProperty.create("${appLogList}");
jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, appBean, eLProperty, tabActionLog);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${changeTime}"));
columnBinding.setColumnName("Change Time");
columnBinding.setColumnClass(java.util.Date.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${userFullname}"));
columnBinding.setColumnName("User Fullname");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${description}"));
columnBinding.setColumnName("Description");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${notation}"));
columnBinding.setColumnName("Notation");
columnBinding.setColumnClass(String.class);
columnBinding.setEditable(false);
bindingGroup.addBinding(jTableBinding);
jTableBinding.bind();
actionLogPanel.setViewportView(tabActionLog);
tabActionLog.getColumnModel().getColumn(0).setHeaderValue(bundle.getString("ApplicationPanel.tabActionLog.columnModel.title0"));
tabActionLog.getColumnModel().getColumn(0).setCellRenderer(new DateTimeRenderer());
tabActionLog.getColumnModel().getColumn(1).setHeaderValue(bundle.getString("ApplicationPanel.tabActionLog.columnModel.title1_1"));
tabActionLog.getColumnModel().getColumn(2).setHeaderValue(bundle.getString("ApplicationPanel.tabActionLog.columnModel.title2_1"));
tabActionLog.getColumnModel().getColumn(3).setHeaderValue(bundle.getString("ApplicationPanel.tabActionLog.columnModel.title3_1"));
tabActionLog.setComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
javax.swing.GroupLayout historyPanelLayout = new javax.swing.GroupLayout(historyPanel);
historyPanel.setLayout(historyPanelLayout);
historyPanelLayout.setHorizontalGroup(
historyPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(historyPanelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(actionLogPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 615, Short.MAX_VALUE)
.addContainerGap())
);
historyPanelLayout.setVerticalGroup(
historyPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(historyPanelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(actionLogPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 385, Short.MAX_VALUE)
.addContainerGap())
);
tabbedControlMain.addTab(bundle.getString("ApplicationPanel.historyPanel.TabConstraints.tabTitle"), historyPanel);
javax.swing.GroupLayout jPanel22Layout = new javax.swing.GroupLayout(jPanel22);
jPanel22.setLayout(jPanel22Layout);
jPanel22Layout.setHorizontalGroup(
jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(tabbedControlMain, javax.swing.GroupLayout.DEFAULT_SIZE, 640, Short.MAX_VALUE)
);
jPanel22Layout.setVerticalGroup(
jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(tabbedControlMain, javax.swing.GroupLayout.DEFAULT_SIZE, 435, Short.MAX_VALUE)
);
jScrollPane1.setViewportView(jPanel22);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(pnlHeader, javax.swing.GroupLayout.DEFAULT_SIZE, 717, Short.MAX_VALUE)
.addComponent(jToolBar3, javax.swing.GroupLayout.DEFAULT_SIZE, 660, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 697, Short.MAX_VALUE)
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(pnlHeader, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jToolBar3, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)
.addContainerGap())
);
bindingGroup.bind();
}
|
public Object exec(Tuple tuple) throws IOException {
getInputSchema();
RList result_list;
try {
List<RType> params = RUtils.pigTupleToR(tuple, inputSchema, 0).expand();
String paramStr = params.isEmpty() ? "" : params.get(0).toRString();
for(int i = 1; i < params.size(); i++) {
paramStr += ", " + params.get(i).toRString();
}
RType result = rEngine.eval(functionName + "(" + paramStr + ")");
if(result instanceof RDataFrame) {
throw new UnsupportedOperationException("rPig does not currently support DataFrames");
} else if(!(result instanceof RList)) {
result_list = new RList(getFieldNames(outputSchema.getFields()), result.asList());
} else {
result_list = (RList) result;
}
} catch (RException ex) {
throw new IOException("R Function Execution failed", ex);
}
Schema out = outputSchema;
if(out.size() == 1 && out.getField(0).type == DataType.TUPLE) {
out = out.getField(0).schema;
}
Tuple evalTuple = RUtils.rToPigTuple(result_list, out, 0);
Object eval = out.size() == 1 ? evalTuple.get(0) : evalTuple;
return eval;
}
| public Object exec(Tuple tuple) throws IOException {
getInputSchema();
RList result_list;
try {
List<RType> params = RUtils.pigTupleToR(tuple, inputSchema, 0).expand();
String paramStr = params.isEmpty() ? "" : params.get(0).toRString();
for(int i = 1; i < params.size(); i++) {
paramStr += ", " + params.get(i).toRString();
}
RType result = rEngine.eval(functionName + "(" + paramStr + ")");
if(result instanceof RDataFrame) {
throw new UnsupportedOperationException("rPig does not currently support DataFrames");
} else if(!(result instanceof RList)) {
result_list = new RList(getFieldNames(outputSchema.getFields()), result.asList());
} else {
result_list = (RList) result;
}
} catch (RException ex) {
throw new IOException("R Function Execution failed", ex);
}
Schema out = outputSchema;
if(out.size() == 1 && out.getField(0).type == DataType.TUPLE) {
out = out.getField(0).schema;
}
Tuple evalTuple = RUtils.rToPigTuple(result_list, out, 0);
Object eval = outputSchema.size() == 1 ? evalTuple.get(0) : evalTuple;
return eval;
}
|