Skip to content

Commit

Permalink
Increased version number to 2.1.0
Browse files Browse the repository at this point in the history
Applied IAP source code formatting to some files.
Additional changes and new features.
  • Loading branch information
cklukas committed Apr 10, 2017
1 parent 45779d9 commit 5a1337c
Show file tree
Hide file tree
Showing 305 changed files with 41,372 additions and 1,021 deletions.
Expand Up @@ -17,4 +17,8 @@ public interface BackgroundTaskStatusProviderSupportingExternalCall
public abstract void setCurrentStatusValueFineAdd(double smallProgressStep);

public abstract void setPrefix1(String prefix1);

default void reset() {
// empty
}
}
2 changes: 1 addition & 1 deletion Graffiti_Core/org/ReleaseInfo.java
Expand Up @@ -21,7 +21,7 @@
* @author klukas
*/
public class ReleaseInfo implements HelperClass {
public static String IAP_VERSION_STRING = "2.0.8";
public static String IAP_VERSION_STRING = "2.1.0";
private static Release currentRelease = Release.DEBUG;

public static Release getRunningReleaseStatus() {
Expand Down
38 changes: 19 additions & 19 deletions Graffiti_Core/org/SystemAnalysis.java
Expand Up @@ -348,25 +348,21 @@ public static boolean isMacRunning() {
* - if there is a
* problem determing the address
*/
public static InetAddress getLocalHost() throws
UnknownHostException {
public static InetAddress getLocalHost() throws UnknownHostException {
InetAddress localHost = InetAddress.getByAddress(new byte[] { 127, 0, 0, 1 });
try {
localHost =
InetAddress.getLocalHost();
localHost = InetAddress.getLocalHost();
if (!localHost.isLoopbackAddress())
return localHost;
InetAddress[] addrs =
getAllLocalUsingNetworkInterface();
InetAddress[] addrs = getAllLocalUsingNetworkInterface();
for (int i = 0; i < addrs.length; i++) {
if (!addrs[i].isLoopbackAddress())
return addrs[i];
}
} catch (Exception e) {
System.out.println(SystemAnalysis.getCurrentTime() + ">ERROR: " + e.getMessage());
}
InetAddress[] addrs =
getAllLocalUsingNetworkInterface();
InetAddress[] addrs = getAllLocalUsingNetworkInterface();
for (int i = 0; i < addrs.length; i++) {
if (!addrs[i].isLoopbackAddress())
return addrs[i];
Expand All @@ -389,10 +385,8 @@ public static InetAddress getLocalHost() throws
* - if there is a
* problem determining addresses
*/
public static InetAddress[] getAllLocal() throws
UnknownHostException {
InetAddress[] iAddresses =
InetAddress.getAllByName("127.0.0.1");
public static InetAddress[] getAllLocal() throws UnknownHostException {
InetAddress[] iAddresses = InetAddress.getAllByName("127.0.0.1");
if (iAddresses.length != 1)
return iAddresses;
if (!iAddresses[0].isLoopbackAddress())
Expand All @@ -412,20 +406,16 @@ public static InetAddress[] getAllLocal() throws
* - if there is a
* problem determining addresses
*/
private static InetAddress[]
getAllLocalUsingNetworkInterface() throws
UnknownHostException {
private static InetAddress[] getAllLocalUsingNetworkInterface() throws UnknownHostException {
ArrayList<InetAddress> addresses = new ArrayList<InetAddress>();
Enumeration<NetworkInterface> e = null;
try {
e =
NetworkInterface.getNetworkInterfaces();
e = NetworkInterface.getNetworkInterfaces();
} catch (SocketException ex) {
throw new UnknownHostException("127.0.0.1");
}
while (e.hasMoreElements()) {
NetworkInterface ni =
e.nextElement();
NetworkInterface ni = e.nextElement();
for (Enumeration<InetAddress> e2 = ni.getInetAddresses(); e2.hasMoreElements();) {
addresses.add(e2.nextElement());
}
Expand Down Expand Up @@ -559,4 +549,14 @@ public static float getHiDPIScaleFactor() {
}
return 1f;
}

private static void waitIfImportantProcessIsRunning() {
// TODO Auto-generated method stub

}

public static void exit(int returnCode) {
waitIfImportantProcessIsRunning();
System.exit(returnCode);
}
}
2 changes: 1 addition & 1 deletion Graffiti_Core/org/SystemOptions.java
Expand Up @@ -568,7 +568,7 @@ public void setStringRadioSelection(String group, String setting, String[] possi
else
newValues.add(k);
}
setString(group, setting, StringManipulationTools.getStringList(newValues, "//"));
setString(group, setting + "-radio-selection", StringManipulationTools.getStringList(newValues, "//"));
}

public void setColor(String group, String setting, Color value) {
Expand Down
26 changes: 13 additions & 13 deletions Graffiti_Editor/org/graffiti/editor/MainFrame.java
Expand Up @@ -9,9 +9,6 @@

package org.graffiti.editor;

import info.clearthought.layout.TableLayout;
import info.clearthought.layout.TableLayoutConstants;

import java.awt.AWTEvent;
import java.awt.BorderLayout;
import java.awt.Color;
Expand Down Expand Up @@ -104,8 +101,6 @@
import javax.swing.event.UndoableEditListener;
import javax.swing.undo.UndoableEditSupport;

import net.iharder.dnd.FileDrop;

import org.AttributeHelper;
import org.ErrorMsg;
import org.FolderPanel;
Expand Down Expand Up @@ -188,6 +183,9 @@
import org.graffiti.util.DesktopMenuManager;
import org.graffiti.util.InstanceCreationException;

import info.clearthought.layout.TableLayout;
import info.clearthought.layout.TableLayoutConstants;
import net.iharder.dnd.FileDrop;
import scenario.ScenarioService;

/**
Expand Down Expand Up @@ -1371,7 +1369,7 @@ public void loadGraphInBackground(final File[] proposedFiles, final ActionEvent
for (File f : proposedFiles)
if (!filesToBeIgnored.contains(f))
files.add(f);

if (files.size() > 0)
loader.submit(new Runnable() {
@Override
Expand Down Expand Up @@ -3405,24 +3403,26 @@ public void closeGravisto() {
names += "<li>" + g.getName() + (unsavedGraphs.indexOf(g) < unsavedGraphs.size() - 1 ? "<br>" : "");
int res = JOptionPane.showConfirmDialog(this,
"<html><b>Do you really want to close the application?</b><p><p>"
+ "The following graph(s) have not been saved, yet:<br><ol>" + names, unsavedGraphs.size()
+ " graph(s) not saved", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
+ "The following graph(s) have not been saved, yet:<br><ol>" + names,
unsavedGraphs.size()
+ " graph(s) not saved",
JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
if (res == JOptionPane.YES_OPTION) {
/*
* for (Iterator it = l.iterator(); it.hasNext();) {
* removeSession((Session) it.next()); } savePreferences();
*/
// HomeFolder.deleteTemporaryFolder();
if (!ReleaseInfo.isRunningAsApplet())
System.exit(0);
else
if (!ReleaseInfo.isRunningAsApplet()) {
SystemAnalysis.exit(0);
} else
setVisible(false);
}
} else {
// HomeFolder.deleteTemporaryFolder();
ReleaseInfo.setPreventSystemExitUponWindowClose(true);
if (!ReleaseInfo.isRunningAsApplet() && !ReleaseInfo.isPreventSystemExit())
System.exit(0);
SystemAnalysis.exit(0);
else
setVisible(false);
}
Expand Down Expand Up @@ -4058,7 +4058,7 @@ public static boolean isViewProvidingToolbar(View view) {
return view != null
&& (view.getViewToolbarComponentTop() != null || view.getViewToolbarComponentBottom() != null
|| view.getViewToolbarComponentLeft() != null || view.getViewToolbarComponentRight() != null || view
.getViewToolbarComponentBackground() != null);
.getViewToolbarComponentBackground() != null);
}

/**
Expand Down
Expand Up @@ -9,9 +9,6 @@

package org.graffiti.editor.dialog;

import info.clearthought.layout.TableLayout;
import info.clearthought.layout.TableLayoutConstants;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
Expand Down Expand Up @@ -63,6 +60,9 @@
import org.graffiti.selection.Selection;
import org.graffiti.session.Session;

import info.clearthought.layout.TableLayout;
import info.clearthought.layout.TableLayoutConstants;

/**
* The default implementation of a parameter dialog.
*
Expand Down Expand Up @@ -205,7 +205,7 @@ public DefaultParameterDialog(EditComponentManager editComponentManager,

if (okOnlyButtonText != null && okOnlyButtonText.length() > 0)
ok.setText(okOnlyButtonText);

// JPanel buttonsPanel = new JPanel();
//
// buttonsPanel.add(ok);
Expand Down Expand Up @@ -432,10 +432,10 @@ public void mouseClicked(MouseEvent e) {
TableLayout.getSplitVertical(null,
TableLayout.get3Split(ok, null, okOnly ? null : cancel, TableLayoutConstants.PREFERRED, border,
TableLayoutConstants.PREFERRED),
TableLayout.FILL, TableLayoutConstants.PREFERRED), null,
TableLayout.FILL, TableLayoutConstants.PREFERRED),
null,
TableLayout.FILL, TableLayoutConstants.PREFERRED, TableLayout.FILL, border, 0),
"1,3"
);
"1,3");
getContentPane().validate();
}

Expand Down Expand Up @@ -572,14 +572,14 @@ public static Object[] getInput(Object description, String title,

if (title != null && title.endsWith("..."))
title = title.substring(0, title.length() - "...".length());

// Buttons: OK => close and return input values
// Cancel => close and return null
// Reset => set to initial values
Parameter[] p = new Parameter[parameters.length / 2];
for (int i = 0; i < p.length; i++) {
Object desc = parameters[i * 2];
String nameTitle, nameTooltip;
String nameTitle, nameTooltip, defaultValue;
String nameDesc;
if (desc instanceof String)
nameDesc = (String) desc;
Expand All @@ -588,6 +588,11 @@ public static Object[] getInput(Object description, String title,
nameDesc = ((JLabel) desc).getText();
else
nameDesc = null;
defaultValue = null;
if (nameDesc != null && nameDesc.indexOf("@@@") > 0) {
nameTitle = nameDesc.substring(0, nameDesc.indexOf("@@@"));
defaultValue = nameDesc.substring(nameDesc.indexOf("@@@") + "@@@".length());
}
if (nameDesc != null && nameDesc.indexOf("@@") > 0) {
nameTitle = nameDesc.substring(0, nameDesc.indexOf("@@"));
nameTooltip = nameDesc.substring(nameDesc.indexOf("@@") + "@@".length());
Expand All @@ -603,7 +608,7 @@ public static Object[] getInput(Object description, String title,
} else
if (param instanceof String[]) {
String[] val = (String[]) param;
ObjectListParameter sp = new ObjectListParameter(val[0], nameTitle, nameTooltip, val);
ObjectListParameter sp = new ObjectListParameter(defaultValue != null ? defaultValue : val[0], nameTitle, nameTooltip, val);
p[i] = sp;
} else
if (param instanceof String) {
Expand Down Expand Up @@ -662,7 +667,7 @@ public static Object[] getInput(Object description, String title,
modal = false;
description = StringManipulationTools.stringReplace((String) description, "nonmodal", "");
}

boolean noButton = (description != null && description instanceof String && ((String) description).startsWith("[]"));
if (noButton) {
description = ((String) description).substring("[]".length());
Expand Down Expand Up @@ -696,10 +701,7 @@ public static Object[] getInput(Object description, String title,
MainFrame.getInstance() != null ? MainFrame.getInstance().getEditComponentManager() : null,
ref,
p,
(MainFrame.getInstance() != null && MainFrame.getInstance().getActiveEditorSession() != null ?
MainFrame.getInstance().getActiveEditorSession().
getSelectionModel().getActiveSelection() : null
),
(MainFrame.getInstance() != null && MainFrame.getInstance().getActiveEditorSession() != null ? MainFrame.getInstance().getActiveEditorSession().getSelectionModel().getActiveSelection() : null),
title, description, null, showOnlyOneButton, noButton, false, buttonDesc, modal);
if (paramDialog.isOkSelected()) {
Parameter[] pe = paramDialog.getEditedParameters();
Expand Down
Expand Up @@ -21,7 +21,7 @@
* @version $Revision: 1.1 $
*/
public class ObjectListComponent
extends ComboBoxEditComponent {
extends ComboBoxEditComponent {
// ~ Constructors ===========================================================

/**
Expand Down
Binary file added IAP/capt0000.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added IAP/image.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 77 additions & 0 deletions IAP/src/com/google/zxing/BarcodeFormat.java
@@ -0,0 +1,77 @@
/*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.google.zxing;

/**
* Enumerates barcode formats known to this package. Please keep alphabetized.
*
* @author Sean Owen
*/
public enum BarcodeFormat {

/** Aztec 2D barcode format. */
AZTEC,

/** CODABAR 1D format. */
CODABAR,

/** Code 39 1D format. */
CODE_39,

/** Code 93 1D format. */
CODE_93,

/** Code 128 1D format. */
CODE_128,

/** Data Matrix 2D barcode format. */
DATA_MATRIX,

/** EAN-8 1D format. */
EAN_8,

/** EAN-13 1D format. */
EAN_13,

/** ITF (Interleaved Two of Five) 1D format. */
ITF,

/** MaxiCode 2D barcode format. */
MAXICODE,

/** PDF417 format. */
PDF_417,

/** QR Code 2D barcode format. */
QR_CODE,

/** RSS 14 */
RSS_14,

/** RSS EXPANDED */
RSS_EXPANDED,

/** UPC-A 1D format. */
UPC_A,

/** UPC-E 1D format. */
UPC_E,

/** UPC/EAN extension format. Not a stand-alone format. */
UPC_EAN_EXTENSION

}

0 comments on commit 5a1337c

Please sign in to comment.