Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions library.xml
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,34 @@
</outputstring>
</container>
</auxiliaryinput>
<auxiliaryfunction2 background_colour="white" function_type="latchingboolean" id="" name="auxfun2">
<container block_col="0" block_font="" block_row="0" height="32" hidden="no" id="" name="container" pos_x="14" pos_y="0" width="32">
<rectangle block_col="0" block_font="" block_row="0" height="28" id="" line_suppression="" name="background" pos_x="0" pos_y="2" width="32">
<include_object name="white" role="fill_attributes"/>
<include_object name="black1" role="line_attributes"/>
</rectangle>
<outputstring background_colour="black" block_col="0" block_font="" block_row="0" height="8" horizontal_justification="middle" id="" language="" length="5" name="label0" options="transparent" pos_x="1" pos_y="6" value="AUX2" width="30">
<include_object name="black6x8" role="font_attributes"/>
</outputstring>
<outputstring background_colour="black" block_col="0" block_font="" block_row="0" height="8" horizontal_justification="middle" id="" language="" length="5" name="label1" options="transparent" pos_x="1" pos_y="18" value="FUN" width="30">
<include_object name="black6x8" role="font_attributes"/>
</outputstring>
</container>
</auxiliaryfunction2>
<auxiliaryinput2 background_colour="white" function_type="latchingboolean" id="" name="auxinp2">
<container block_col="0" block_font="" block_row="0" height="32" hidden="no" id="" name="container" pos_x="14" pos_y="0" width="32">
<rectangle block_col="0" block_font="" block_row="0" height="28" id="" line_suppression="" name="background" pos_x="0" pos_y="2" width="32">
<include_object name="white" role=""/>
<include_object name="black1" role=""/>
</rectangle>
<outputstring background_colour="black" block_col="0" block_font="" block_row="0" height="8" horizontal_justification="middle" id="" language="" length="5" name="label0" options="transparent" pos_x="1" pos_y="6" value="AUX2" width="30">
<include_object name="black6x8" role="font_attributes"/>
</outputstring>
<outputstring background_colour="black" block_col="0" block_font="" block_row="0" height="8" horizontal_justification="middle" id="" language="" length="5" name="label1" options="transparent" pos_x="1" pos_y="18" value="IN" width="30">
<include_object name="black6x8" role="font_attributes"/>
</outputstring>
</container>
</auxiliaryinput2>
<lineattributes id="" line_art="1111111111111111" line_colour="red" line_width="1" name="red1" role=""/>
<lineattributes id="" line_art="1111111111111111" line_colour="magenta" line_width="1" name="magenta1" role=""/>
<lineattributes id="" line_art="1111111111111111" line_colour="yellow" line_width="1" name="yellow1" role=""/>
Expand Down
23 changes: 20 additions & 3 deletions src/attributetable/AttributeTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ public class AttributeTable extends JTable {
private final TableCellEditor archedBarGraphOptionEditor;
private final TableCellEditor outputStringOptionEditor;
private final TableCellEditor outputNumberOptionEditor;
private final TableCellEditor booleanAnalogEditor;
private final TableCellEditor auxFunction2OptionEditor;
private final TableCellEditor auxInput2OptionEditor;
private final TableCellEditor booleanAnalogEditor;
private final TableCellEditor aux2typeEditor;
private final TableCellEditor validationTypeEditor;
private final TableCellEditor maskTypeEditor;

Expand Down Expand Up @@ -124,7 +127,13 @@ private AttributeTable(TableModel model) {
archedBarGraphOptionEditor = new CheckBoxListCellEditor("border", "targetline", "nofill", "clockwise");
outputStringOptionEditor = new CheckBoxListCellEditor("transparent", "autowrap");
outputNumberOptionEditor = new CheckBoxListCellEditor("transparent", "leadingzeros", "blankzero");
auxFunction2OptionEditor = new CheckBoxListCellEditor("criticalcontrol", "assignmentlock", "singleassignment");
auxInput2OptionEditor = new CheckBoxListCellEditor("criticalcontrol", "singleassignment");
booleanAnalogEditor = createEditor("boolean", "analog");
aux2typeEditor = createEditor("latchingboolean", "analog", "nonlatchingboolean", "analogreturnto50", "analogreturnto0",
"bothlatchingdualboolean", "bothnonlatchingdualboolean", "latchingdualbooleanup",
"latchingdualbooleandown", "combinedanalogreturnto50duallatchingboolean", "combinedanalogduallatchingboolean",
"nonlatchingquadboolean", "analogquad", "analogreturnto50quad", "encoder");
validationTypeEditor = createEditor("invalidcharacters", "validcharacters");
maskTypeEditor = createEditor("datamask", "alarmmask");

Expand Down Expand Up @@ -300,11 +309,15 @@ else if (Utils.equals(type, LINEARBARGRAPH)) {
else if (Utils.equals(type, ARCHEDBARGRAPH)) {
return archedBarGraphOptionEditor;
}
else if (Utils.equals(type, OUTPUTSTRING)) {
else if (Utils.equals(type, OUTPUTSTRING, INPUTSTRING)) {
return outputStringOptionEditor;
}
else if (Utils.equals(type, OUTPUTNUMBER, INPUTNUMBER)) {
return outputNumberOptionEditor;
} else if (Utils.equals(type, AUXILIARYFUNCTION2)) {
return auxFunction2OptionEditor;
} else if (Utils.equals(type, AUXILIARYINPUT2)) {
return auxInput2OptionEditor;
}
else {
return super.getCellEditor(row, col);
Expand Down Expand Up @@ -347,7 +360,11 @@ else if (Utils.equals(attr, BACKGROUND_COLOUR, ARC_AND_TICK_COLOUR,
return colorEditor;
}
else if (Utils.equals(attr, FUNCTION_TYPE)) {
return booleanAnalogEditor;
if (Utils.equals(type, AUXILIARYFUNCTION, AUXILIARYINPUT)) {
return booleanAnalogEditor;
} else {
return aux2typeEditor;
}
}
else if (Utils.equals(attr, VALIDATION_TYPE)) {
return validationTypeEditor;
Expand Down
Binary file added src/images/auxiliaryfunction2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/auxiliaryinput2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions src/objectview/GraphicObjectOperations.java
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,24 @@ public void opAuxiliaryInput(Graphics2D gfx, XMLTreeNode node, int w, int h) {
drawBorders(gfx, w, h);
}

@Override
public void opAuxiliaryFunction2(Graphics2D gfx, XMLTreeNode node, int w, int h) {
// fill back ground
gfx.setColor(node.getBackgroundColor(colorDepth));
gfx.fillRect(0, 0, w, h);

drawBorders(gfx, w, h);
}

@Override
public void opAuxiliaryInput2(Graphics2D gfx, XMLTreeNode node, int w, int h) {
// fill back ground
gfx.setColor(node.getBackgroundColor(colorDepth));
gfx.fillRect(0, 0, w, h);

drawBorders(gfx, w, h);
}

/**
* Sets depth.
* @param depth
Expand Down
4 changes: 4 additions & 0 deletions src/objectview/ObjectOperations.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ public interface ObjectOperations {
void opAuxiliaryFunction(Graphics2D gfx, XMLTreeNode node, int w, int h);

void opAuxiliaryInput(Graphics2D gfx, XMLTreeNode node, int w, int h);

void opAuxiliaryFunction2(Graphics2D gfx, XMLTreeNode node, int w, int h);

void opAuxiliaryInput2(Graphics2D gfx, XMLTreeNode node, int w, int h);

void opButton(Graphics2D gfx, XMLTreeNode node);

Expand Down
61 changes: 60 additions & 1 deletion src/objectview/ObjectView.java
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,12 @@ else switch (type) {
case AUXILIARYINPUT:
shape = processAuxiliaryInput(gfx, node, oper);
break;
case AUXILIARYFUNCTION2:
shape = processAuxiliaryFunction2(gfx, node, oper);
break;
case AUXILIARYINPUT2:
shape = processAuxiliaryInput2(gfx, node, oper);
break;
default:
// node is not drawable, do nothing
break;
Expand Down Expand Up @@ -1281,6 +1287,58 @@ else if (nd.isType(OBJECTS)) {

return restoreClip(gfx, oldc);
}

public Shape processAuxiliaryFunction2(Graphics2D gfx, XMLTreeNode node, ObjectOperations oper) {
dmsg("paintAuxiliaryFunction2");
Shape oldc = changeClip(gfx, sk_width, sk_height);

oper.opAuxiliaryFunction2(gfx, node, sk_width, sk_height);

// paint children
oper.incDepth();
for (int i = 0, n = model.getChildCount(node); i < n; i++) {
XMLTreeNode nd = (XMLTreeNode) model.getChild(node, i);
if (nd.isType(MACRO)) {
// do nothing?
}
// this could be more specific
else if (nd.isType(OBJECTS)) {
AffineTransform oldx = gfx.getTransform();
gfx.translate(nd.getX(), nd.getY());
processNode(gfx, nd, oper);
gfx.setTransform(oldx);
}
}
oper.decDepth();

return restoreClip(gfx, oldc);
}

public Shape processAuxiliaryInput2(Graphics2D gfx, XMLTreeNode node, ObjectOperations oper) {
dmsg("paintAuxiliaryInput2");
Shape oldc = changeClip(gfx, sk_width, sk_height);

oper.opAuxiliaryInput2(gfx, node, sk_width, sk_height);

// paint children
oper.incDepth();
for (int i = 0, n = model.getChildCount(node); i < n; i++) {
XMLTreeNode nd = (XMLTreeNode) model.getChild(node, i);
if (nd.isType(MACRO)) {
// do nothing?
}
// this could be more specific
else if (nd.isType(OBJECTS)) {
AffineTransform oldx = gfx.getTransform();
gfx.translate(nd.getX(), nd.getY());
processNode(gfx, nd, oper);
gfx.setTransform(oldx);
}
}
oper.decDepth();

return restoreClip(gfx, oldc);
}

/**
* Calculates required size by using a very limited recursion.
Expand Down Expand Up @@ -1314,7 +1372,8 @@ else if (node.isType(SOFTKEYMASK)) {
// reserve roperm for one extra key
lim.set(sk_width, (model.getChildCount(node) + 1) * sk_height);
}
else if (node.isType(KEY, AUXILIARYFUNCTION, AUXILIARYINPUT)) {
else if (node.isType(KEY, AUXILIARYFUNCTION, AUXILIARYINPUT,
AUXILIARYFUNCTION2, AUXILIARYINPUT2)) {
lim.set(sk_width, sk_height);
}
else if (node.isType(CONTAINER, BUTTON,
Expand Down
10 changes: 10 additions & 0 deletions src/objectview/PointObjectOperations.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,16 @@ public void opAuxiliaryFunction(Graphics2D gfx, XMLTreeNode node, int w, int h)
public void opAuxiliaryInput(Graphics2D gfx, XMLTreeNode node, int w, int h) {
check(gfx, node);
}

@Override
public void opAuxiliaryFunction2(Graphics2D gfx, XMLTreeNode node, int w, int h) {
check(gfx, node);
}

@Override
public void opAuxiliaryInput2(Graphics2D gfx, XMLTreeNode node, int w, int h) {
check(gfx, node);
}

@Override
public void opButton(Graphics2D gfx, XMLTreeNode node) {
Expand Down
16 changes: 12 additions & 4 deletions src/pooledit/Definitions.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ public class Definitions {
static public final String MACROS_ = "Macros";
static public final String AUXILIARYFUNCTIONS_ = "AuxiliaryFunctions";
static public final String AUXILIARYINPUTS_ = "AuxiliaryInputs";
static public final String AUXILIARYFUNCTIONS2_ = "AuxiliaryFunctions2";
static public final String AUXILIARYINPUTS2_ = "AuxiliaryInputs2";

static public final String[][] SUBCATEGORYGROUPS = {
{WORKINGSETS_, DATAMASKS_, ALARMMASKS_, CONTAINERS_},
Expand All @@ -96,7 +98,7 @@ public class Definitions {
{FONTATTRIBUTES_, LINEATTRIBUTES_, FILLATTRIBUTES_, INPUTATTRIBUTES_},
{OBJECTPOINTERS_},
{MACROS_},
{AUXILIARYFUNCTIONS_, AUXILIARYINPUTS_}
{AUXILIARYFUNCTIONS_, AUXILIARYINPUTS_, AUXILIARYFUNCTIONS2_, AUXILIARYINPUTS2_}
};

static public final String[] SUBCATEGORIES = {
Expand All @@ -111,7 +113,7 @@ public class Definitions {
FONTATTRIBUTES_, LINEATTRIBUTES_, FILLATTRIBUTES_, INPUTATTRIBUTES_,
OBJECTPOINTERS_,
MACROS_,
AUXILIARYFUNCTIONS_, AUXILIARYINPUTS_
AUXILIARYFUNCTIONS_, AUXILIARYINPUTS_, AUXILIARYFUNCTIONS2_, AUXILIARYINPUTS2_
};

// objects
Expand Down Expand Up @@ -146,6 +148,8 @@ public class Definitions {
static public final String MACRO = "macro";
static public final String AUXILIARYFUNCTION = "auxiliaryfunction";
static public final String AUXILIARYINPUT = "auxiliaryinput";
static public final String AUXILIARYFUNCTION2 = "auxiliaryfunction2";
static public final String AUXILIARYINPUT2 = "auxiliaryinput2";

static public final String[] OBJECTS = {
WORKINGSET, DATAMASK, ALARMMASK, CONTAINER,
Expand All @@ -157,7 +161,8 @@ public class Definitions {
METER, LINEARBARGRAPH, ARCHEDBARGRAPH, PICTUREGRAPHIC,
NUMBERVARIABLE, STRINGVARIABLE,
FONTATTRIBUTES, LINEATTRIBUTES, FILLATTRIBUTES, INPUTATTRIBUTES,
OBJECTPOINTER, MACRO, AUXILIARYFUNCTION, AUXILIARYINPUT
OBJECTPOINTER, MACRO, AUXILIARYFUNCTION, AUXILIARYINPUT,
AUXILIARYFUNCTION2, AUXILIARYINPUT2
};

// pseudo objects
Expand Down Expand Up @@ -187,7 +192,7 @@ public class Definitions {
FONTATTRIBUTES_, LINEATTRIBUTES_, FILLATTRIBUTES_, INPUTATTRIBUTES_,
OBJECTPOINTERS_,
MACROS_,
AUXILIARYFUNCTIONS_, AUXILIARYINPUTS_,
AUXILIARYFUNCTIONS_, AUXILIARYINPUTS_, AUXILIARYFUNCTIONS2_, AUXILIARYINPUTS2_,
WORKINGSET, DATAMASK, ALARMMASK, CONTAINER,
SOFTKEYMASK, KEY, BUTTON,
INPUTBOOLEAN, INPUTSTRING,
Expand All @@ -198,6 +203,7 @@ public class Definitions {
NUMBERVARIABLE, STRINGVARIABLE,
FONTATTRIBUTES, LINEATTRIBUTES, FILLATTRIBUTES, INPUTATTRIBUTES,
OBJECTPOINTER, MACRO, AUXILIARYFUNCTION, AUXILIARYINPUT,
AUXILIARYFUNCTION2, AUXILIARYINPUT2,
POINT, LANGUAGE, INCLUDE_OBJECT, FIXEDBITMAP, COMMAND
};

Expand Down Expand Up @@ -226,6 +232,7 @@ public class Definitions {
"macro.png",
// --- objects ---
"auxiliaryfunction.png", "auxiliaryinput.png",
"auxiliaryfunction2.png", "auxiliaryinput2.png",
"workingset.png", "datamask.png", "alarmmask.png", "container.png",
"softkeymask.png", "softkey.png", "button.png",
"inputbooleanfield.png", "inputstringfield.png", "inputnumberfield.png", "inputlistfield.png",
Expand All @@ -238,6 +245,7 @@ public class Definitions {
"objectpointer.png",
"macro.png",
"auxiliaryfunction.png", "auxiliaryinput.png",
"auxiliaryfunction2.png", "auxiliaryinput2.png",
// --- pseudo objects ---
"point.png", "language.png", "includeobject.png", "fixedbitmap.png", "command.png"
};
Expand Down
6 changes: 4 additions & 2 deletions src/pooledit/Tools.java
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,8 @@ else if (actual != null) {

// objects with x-y-object references
if (Utils.equals(trgName, WORKINGSET, DATAMASK, ALARMMASK,
CONTAINER, KEY, BUTTON, AUXILIARYFUNCTION, AUXILIARYINPUT) &&
CONTAINER, KEY, BUTTON, AUXILIARYFUNCTION, AUXILIARYINPUT,
AUXILIARYFUNCTION2, AUXILIARYINPUT2) &&
Utils.equals(frgName, CONTAINER, BUTTON,
INPUTBOOLEAN, INPUTSTRING, INPUTNUMBER, INPUTLIST, OUTPUTSTRING,
OUTPUTNUMBER, LINE, RECTANGLE, ELLIPSE, POLYGON, METER,
Expand Down Expand Up @@ -1621,7 +1622,8 @@ private static void markAllChildMasksAndDesignators(PrintStream out,
markChildrenMask(out, element, nameMap);
}
// marking softkeymask is necessary as it can contain pointers as well as keys
else if (Utils.equals(name, WORKINGSET, SOFTKEYMASK, KEY, AUXILIARYFUNCTION, AUXILIARYINPUT)) {
else if (Utils.equals(name, WORKINGSET, SOFTKEYMASK, KEY,
AUXILIARYFUNCTION, AUXILIARYINPUT, AUXILIARYFUNCTION2, AUXILIARYINPUT2)) {
markChildrenDesignator(out, element, nameMap);
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/pooledit/TreeEditPopup.java
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ public static void geometricTransformation(XMLTreeNode node, int xform) {
width = root.getDimension();
height = width;
}
else if (Utils.equals(type, KEY, AUXILIARYFUNCTION, AUXILIARYINPUT, WORKINGSET)) {
else if (Utils.equals(type, KEY, AUXILIARYFUNCTION, AUXILIARYINPUT, AUXILIARYFUNCTION2, AUXILIARYINPUT2, WORKINGSET)) {
XMLTreeNode root = (XMLTreeNode) node.getModel().getRoot();
width = root.getSKWidth();
height = root.getSKHeight();
Expand Down Expand Up @@ -1022,7 +1022,8 @@ private static void geometricTransformationRecursive(XMLTreeNode node,
}

if (Utils.equals(type, CONTAINER, BUTTON, DATAMASK, ALARMMASK, KEY,
AUXILIARYFUNCTION, AUXILIARYINPUT, WORKINGSET, OBJECTPOINTER)) {
AUXILIARYFUNCTION, AUXILIARYINPUT, AUXILIARYFUNCTION2, AUXILIARYINPUT2,
WORKINGSET, OBJECTPOINTER)) {
// search through all childs and apply transformation for them
XMLTreeModel model = node.getModel();
for (int i = 0, n = node.getModel().getChildCount(node); i < n; i++) {
Expand Down
Loading