bugged
stringlengths 6
599k
| fixed
stringlengths 10
599k
| __index_level_0__
int64 0
1.13M
|
|---|---|---|
public Group removeFromGroup (Group groupObject) { if (groupObject != null) { if (groupMemberHash.contains(groupObject)) { //this object does belong to the indicated Group object groupObject.removeMemberObject((Object) this); groupMemberHash.remove(groupObject); return groupObject; } else { Log.error("Can't delete from group. not a member of the group" + groupObject.getName()); return null; } } else { Log.error("Error: The group to add to is null"); return null; } }
|
public Group removeFromGroup (Group groupObject) { if (groupObject != null) { if (groupMemberHash.contains(groupObject)) { //this object does belong to the indicated Group object groupObject.removeMemberObject((Object) this); groupMemberHash.remove(groupObject); return groupObject; } else { Log.error("Can't delete from group. not a member of the group" + groupObject.getName()); return null; } } else { Log.error("Error: The group to add to is null"); return null; } }
| 7,178
|
protected boolean removeFromList ( Object what, List fromList, String listName ) { if (fromList != null) { if ( what != null) { int index = fromList.indexOf(what); if (index !=-1) { //object to be removed is found in the list fromList.remove(index); return true; } else { //cant find the object in the list Log.warn("warn: can't find object in" + listName + ", ignoring remove"); return false; } } else { //object to remove is null Log.error("Error: object to remove is null"); return false; } } else { //the list to remove from is null Log.error("Error: Passed list to remove from is null, no object to remove"); return false; } }
|
protected boolean removeFromList ( Object what, List fromList, String listName ) { if (fromList != null) { if ( what != null) { int index = fromList.indexOf(what); if (index !=-1) { //object to be removed is found in the list fromList.remove(index); return true; } else { //cant find the object in the list Log.warn("warn: can't find object in" + listName + ", ignoring remove"); return false; } } else { //object to remove is null Log.error("Error: object to remove is null"); return false; } } else { //the list to remove from is null Log.error("Error: Passed list to remove from is null, no object to remove"); return false; } }
| 7,179
|
protected boolean removeFromList ( Object what, List fromList, String listName ) { if (fromList != null) { if ( what != null) { int index = fromList.indexOf(what); if (index !=-1) { //object to be removed is found in the list fromList.remove(index); return true; } else { //cant find the object in the list Log.warn("warn: can't find object in" + listName + ", ignoring remove"); return false; } } else { //object to remove is null Log.error("Error: object to remove is null"); return false; } } else { //the list to remove from is null Log.error("Error: Passed list to remove from is null, no object to remove"); return false; } }
|
protected boolean removeFromList ( Object what, List fromList, String listName ) { if (fromList != null) { if ( what != null) { int index = fromList.indexOf(what); if (index !=-1) { //object to be removed is found in the list fromList.remove(index); return true; } else { //cant find the object in the list Log.warn("warn: can't find object in" + listName + ", ignoring remove"); return false; } } else { //object to remove is null Log.error("Error: object to remove is null"); return false; } } else { //the list to remove from is null Log.error("Error: Passed list to remove from is null, no object to remove"); return false; } }
| 7,180
|
protected void setXMLAttributes (AttributeList attrs) { // set object attributes from an AttributeList if (attrs != null) { // whip thru the list, setting each value int size = attrs.getLength(); for (int i = 0; i < size; i++) { String name = attrs.getName(i); String value = attrs.getValue(i); if (this.attribHash.containsKey(name)) { ((XMLAttribute) this.attribHash.get(name)).setAttribValue(value); } else Log.errorln("Error: cant set XMLAttribute:["+name+"], doesnt exist in object:"+this); } } }
|
protected void setXMLAttributes (AttributeList attrs) { // set object attributes from an AttributeList if (attrs != null) { // whip thru the list, setting each value int size = attrs.getLength(); for (int i = 0; i < size; i++) { String name = attrs.getName(i); String value = attrs.getValue(i); if (this.attribHash.containsKey(name)) { ((XMLAttribute) this.attribHash.get(name)).setAttribValue(value); } else Log.errorln("Error: cant set XMLAttribute:["+name+"], doesnt exist in object:"+this); } } }
| 7,181
|
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { String nodeNameString = this.classXDFNodeName; // Setup. Sometimes the name of the node we are opening is different from // that specified in the classXDFNodeName (*sigh*) if (newNodeNameString != null) nodeNameString = newNodeNameString; // 0. To be valid XML, we always start an XML block with an // XML declaration (e.g. somehting like "<?xml standalone="no"?>"). // Here we deal with printing out XML Declaration && its attributes if ((XMLDeclAttribs !=null) &&(!XMLDeclAttribs.isEmpty())) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); } // 1. open this node, print its simple XML attributes if (nodeNameString != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); // indent node if desired // For printing the opening statement we need to invoke a little // Voodoo to keep the DTD happy: the first structure node is always // called by the root node name instead of the usual nodeNameString // We can tell this by checking if this object is derived from class // Structure and if XMLDeclAttrib defined/populated with information // NOTE: This isnt really the way to do this. We need to check if 'this' is // is or has as a superclass xdf.Structure instead of the 'string check' below. // check is class Strucuture & XMLDeclAttribs populated? if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) nodeNameString = sXDFRootNodeName; writeOut(outputstream,"<" + nodeNameString); // print opening statement } // gather info about XMLAttributes in this object/node Hashtable xmlInfo = getXMLInfo(); // 2. Print out string object XML attributes EXCEPT for the one that // matches PCDATAAttribute. ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); // is synchronized here correct? synchronized(attribs) { int size = attribs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } // 3. Print out Node PCData or Child Nodes as specified by object ref // XML attributes. The way this stuff occurs will also affect how we // close the node. ArrayList childObjs = (ArrayList) xmlInfo.get("childObjList"); String pcdata = (String) xmlInfo.get("PCDATA"); if ( childObjs.size() > 0 || pcdata != null || noChildObjectNodeName != null) { // close the opening tag if (nodeNameString != null) { writeOut(outputstream, ">"); if ((sPrettyXDFOutput) && (pcdata == null)) writeOut(outputstream, Constants.NEW_LINE); } // deal with object/list XML attributes, if any in our list int size = childObjs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) childObjs.get(i); if (item.get("type") == Constants.LIST_TYPE) { List objectList = (List) item.get("value"); // Im not sure this synchronized wrapper is needed, we are // only accessing stuff here.. Also, should synchronzied wrapper // occur back in the getXMLInfo method instead where the orig // access occured?!? synchronized(objectList) { Iterator iter = objectList.iterator(); // Must be in synchronized block while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } } else if (item.get("type") == Constants.OBJECT_TYPE) { BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) // shouldnt this be synchronized too?? synchronized(containedObj) { indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } else { // error: weird type, actually shouldnt occur. Is this needed?? Log.errorln("Weird error: unknown XML attribute type for item:"+item); } } // print out PCDATA, if any if(pcdata != null) { writeOut(outputstream, pcdata); }; // if there are no PCDATA or child objects/nodes then // we print out noChildObjectNodeName and close the node if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent + sPrettyXDFOutputIndentation); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } // ok, now deal with closing the node if (nodeNameString != null) { indent = dealWithClosingGroupNodes((BaseObject) this, outputstream, indent); if (sPrettyXDFOutput && pcdata == null) writeOut(outputstream, indent); if (!dontCloseNode) writeOut(outputstream, "</"+nodeNameString+">"); } } else { if (dontCloseNode) { // it may not have sub-objects, but we dont want to close it // (happens for group objects) writeOut(outputstream, ">"); } else { // no sub-objects, just close this node writeOut(outputstream, "/>"); } } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); }
|
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { synchronized (attribHash) { String nodeNameString = this.classXDFNodeName; // Setup. Sometimes the name of the node we are opening is different from // that specified in the classXDFNodeName (*sigh*) if (newNodeNameString != null) nodeNameString = newNodeNameString; // 0. To be valid XML, we always start an XML block with an // XML declaration (e.g. somehting like "<?xml standalone="no"?>"). // Here we deal with printing out XML Declaration && its attributes if ((XMLDeclAttribs !=null) &&(!XMLDeclAttribs.isEmpty())) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); } // 1. open this node, print its simple XML attributes if (nodeNameString != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); // indent node if desired // For printing the opening statement we need to invoke a little // Voodoo to keep the DTD happy: the first structure node is always // called by the root node name instead of the usual nodeNameString // We can tell this by checking if this object is derived from class // Structure and if XMLDeclAttrib defined/populated with information // NOTE: This isnt really the way to do this. We need to check if 'this' is // is or has as a superclass xdf.Structure instead of the 'string check' below. // check is class Strucuture & XMLDeclAttribs populated? if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) nodeNameString = sXDFRootNodeName; writeOut(outputstream,"<" + nodeNameString); // print opening statement } // gather info about XMLAttributes in this object/node Hashtable xmlInfo = getXMLInfo(); // 2. Print out string object XML attributes EXCEPT for the one that // matches PCDATAAttribute. ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); // is synchronized here correct? synchronized(attribs) { int size = attribs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } // 3. Print out Node PCData or Child Nodes as specified by object ref // XML attributes. The way this stuff occurs will also affect how we // close the node. ArrayList childObjs = (ArrayList) xmlInfo.get("childObjList"); String pcdata = (String) xmlInfo.get("PCDATA"); if ( childObjs.size() > 0 || pcdata != null || noChildObjectNodeName != null) { // close the opening tag if (nodeNameString != null) { writeOut(outputstream, ">"); if ((sPrettyXDFOutput) && (pcdata == null)) writeOut(outputstream, Constants.NEW_LINE); } // deal with object/list XML attributes, if any in our list int size = childObjs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) childObjs.get(i); if (item.get("type") == Constants.LIST_TYPE) { List objectList = (List) item.get("value"); // Im not sure this synchronized wrapper is needed, we are // only accessing stuff here.. Also, should synchronzied wrapper // occur back in the getXMLInfo method instead where the orig // access occured?!? synchronized(objectList) { Iterator iter = objectList.iterator(); // Must be in synchronized block while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } } else if (item.get("type") == Constants.OBJECT_TYPE) { BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) // shouldnt this be synchronized too?? synchronized(containedObj) { indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } else { // error: weird type, actually shouldnt occur. Is this needed?? Log.errorln("Weird error: unknown XML attribute type for item:"+item); } } // print out PCDATA, if any if(pcdata != null) { writeOut(outputstream, pcdata); }; // if there are no PCDATA or child objects/nodes then // we print out noChildObjectNodeName and close the node if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent + sPrettyXDFOutputIndentation); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } // ok, now deal with closing the node if (nodeNameString != null) { indent = dealWithClosingGroupNodes((BaseObject) this, outputstream, indent); if (sPrettyXDFOutput && pcdata == null) writeOut(outputstream, indent); if (!dontCloseNode) writeOut(outputstream, "</"+nodeNameString+">"); } } else { if (dontCloseNode) { // it may not have sub-objects, but we dont want to close it // (happens for group objects) writeOut(outputstream, ">"); } else { // no sub-objects, just close this node writeOut(outputstream, "/>"); } } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); }
| 7,182
|
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { String nodeNameString = this.classXDFNodeName; // Setup. Sometimes the name of the node we are opening is different from // that specified in the classXDFNodeName (*sigh*) if (newNodeNameString != null) nodeNameString = newNodeNameString; // 0. To be valid XML, we always start an XML block with an // XML declaration (e.g. somehting like "<?xml standalone="no"?>"). // Here we deal with printing out XML Declaration && its attributes if ((XMLDeclAttribs !=null) &&(!XMLDeclAttribs.isEmpty())) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); } // 1. open this node, print its simple XML attributes if (nodeNameString != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); // indent node if desired // For printing the opening statement we need to invoke a little // Voodoo to keep the DTD happy: the first structure node is always // called by the root node name instead of the usual nodeNameString // We can tell this by checking if this object is derived from class // Structure and if XMLDeclAttrib defined/populated with information // NOTE: This isnt really the way to do this. We need to check if 'this' is // is or has as a superclass xdf.Structure instead of the 'string check' below. // check is class Strucuture & XMLDeclAttribs populated? if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) nodeNameString = sXDFRootNodeName; writeOut(outputstream,"<" + nodeNameString); // print opening statement } // gather info about XMLAttributes in this object/node Hashtable xmlInfo = getXMLInfo(); // 2. Print out string object XML attributes EXCEPT for the one that // matches PCDATAAttribute. ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); // is synchronized here correct? synchronized(attribs) { int size = attribs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } // 3. Print out Node PCData or Child Nodes as specified by object ref // XML attributes. The way this stuff occurs will also affect how we // close the node. ArrayList childObjs = (ArrayList) xmlInfo.get("childObjList"); String pcdata = (String) xmlInfo.get("PCDATA"); if ( childObjs.size() > 0 || pcdata != null || noChildObjectNodeName != null) { // close the opening tag if (nodeNameString != null) { writeOut(outputstream, ">"); if ((sPrettyXDFOutput) && (pcdata == null)) writeOut(outputstream, Constants.NEW_LINE); } // deal with object/list XML attributes, if any in our list int size = childObjs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) childObjs.get(i); if (item.get("type") == Constants.LIST_TYPE) { List objectList = (List) item.get("value"); // Im not sure this synchronized wrapper is needed, we are // only accessing stuff here.. Also, should synchronzied wrapper // occur back in the getXMLInfo method instead where the orig // access occured?!? synchronized(objectList) { Iterator iter = objectList.iterator(); // Must be in synchronized block while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } } else if (item.get("type") == Constants.OBJECT_TYPE) { BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) // shouldnt this be synchronized too?? synchronized(containedObj) { indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } else { // error: weird type, actually shouldnt occur. Is this needed?? Log.errorln("Weird error: unknown XML attribute type for item:"+item); } } // print out PCDATA, if any if(pcdata != null) { writeOut(outputstream, pcdata); }; // if there are no PCDATA or child objects/nodes then // we print out noChildObjectNodeName and close the node if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent + sPrettyXDFOutputIndentation); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } // ok, now deal with closing the node if (nodeNameString != null) { indent = dealWithClosingGroupNodes((BaseObject) this, outputstream, indent); if (sPrettyXDFOutput && pcdata == null) writeOut(outputstream, indent); if (!dontCloseNode) writeOut(outputstream, "</"+nodeNameString+">"); } } else { if (dontCloseNode) { // it may not have sub-objects, but we dont want to close it // (happens for group objects) writeOut(outputstream, ">"); } else { // no sub-objects, just close this node writeOut(outputstream, "/>"); } } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); }
|
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { String nodeNameString = this.classXDFNodeName; // Setup. Sometimes the name of the node we are opening is different from // that specified in the classXDFNodeName (*sigh*) if (newNodeNameString != null) nodeNameString = newNodeNameString; // 0. To be valid XML, we always start an XML block with an // XML declaration (e.g. somehting like "<?xml standalone="no"?>"). // Here we deal with printing out XML Declaration && its attributes if ((XMLDeclAttribs !=null) &&(!XMLDeclAttribs.isEmpty())) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); } // 1. open this node, print its simple XML attributes if (nodeNameString != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); // indent node if desired // For printing the opening statement we need to invoke a little // Voodoo to keep the DTD happy: the first structure node is always // called by the root node name instead of the usual nodeNameString // We can tell this by checking if this object is derived from class // Structure and if XMLDeclAttrib defined/populated with information // NOTE: This isnt really the way to do this. We need to check if 'this' is // is or has as a superclass xdf.Structure instead of the 'string check' below. // check is class Strucuture & XMLDeclAttribs populated? if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) nodeNameString = sXDFRootNodeName; writeOut(outputstream,"<" + nodeNameString); // print opening statement } // gather info about XMLAttributes in this object/node Hashtable xmlInfo = getXMLInfo(); // 2. Print out string object XML attributes EXCEPT for the one that // matches PCDATAAttribute. ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); // is synchronized here correct? synchronized(attribs) { int size = attribs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } // 3. Print out Node PCData or Child Nodes as specified by object ref // XML attributes. The way this stuff occurs will also affect how we // close the node. ArrayList childObjs = (ArrayList) xmlInfo.get("childObjList"); String pcdata = (String) xmlInfo.get("PCDATA"); if ( childObjs.size() > 0 || pcdata != null || noChildObjectNodeName != null) { // close the opening tag if (nodeNameString != null) { writeOut(outputstream, ">"); if ((sPrettyXDFOutput) && (pcdata == null)) writeOut(outputstream, Constants.NEW_LINE); } // deal with object/list XML attributes, if any in our list int size = childObjs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) childObjs.get(i); if (item.get("type") == Constants.LIST_TYPE) { List objectList = (List) item.get("value"); // Im not sure this synchronized wrapper is needed, we are // only accessing stuff here.. Also, should synchronzied wrapper // occur back in the getXMLInfo method instead where the orig // access occured?!? synchronized(objectList) { Iterator iter = objectList.iterator(); // Must be in synchronized block while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } } else if (item.get("type") == Constants.OBJECT_TYPE) { BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) // shouldnt this be synchronized too?? synchronized(containedObj) { indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } else { // error: weird type, actually shouldnt occur. Is this needed?? Log.errorln("Weird error: unknown XML attribute type for item:"+item); } } // print out PCDATA, if any if(pcdata != null) { writeOut(outputstream, pcdata); }; // if there are no PCDATA or child objects/nodes then // we print out noChildObjectNodeName and close the node if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent + sPrettyXDFOutputIndentation); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } // ok, now deal with closing the node if (nodeNameString != null) { indent = dealWithClosingGroupNodes((BaseObject) this, outputstream, indent); if (sPrettyXDFOutput && pcdata == null) writeOut(outputstream, indent); if (!dontCloseNode) writeOut(outputstream, "</"+nodeNameString+">"); } } else { if (dontCloseNode) { // it may not have sub-objects, but we dont want to close it // (happens for group objects) writeOut(outputstream, ">"); } else { // no sub-objects, just close this node writeOut(outputstream, "/>"); } } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); }
| 7,183
|
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { String nodeNameString = this.classXDFNodeName; // Setup. Sometimes the name of the node we are opening is different from // that specified in the classXDFNodeName (*sigh*) if (newNodeNameString != null) nodeNameString = newNodeNameString; // 0. To be valid XML, we always start an XML block with an // XML declaration (e.g. somehting like "<?xml standalone="no"?>"). // Here we deal with printing out XML Declaration && its attributes if ((XMLDeclAttribs !=null) &&(!XMLDeclAttribs.isEmpty())) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); } // 1. open this node, print its simple XML attributes if (nodeNameString != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); // indent node if desired // For printing the opening statement we need to invoke a little // Voodoo to keep the DTD happy: the first structure node is always // called by the root node name instead of the usual nodeNameString // We can tell this by checking if this object is derived from class // Structure and if XMLDeclAttrib defined/populated with information // NOTE: This isnt really the way to do this. We need to check if 'this' is // is or has as a superclass xdf.Structure instead of the 'string check' below. // check is class Strucuture & XMLDeclAttribs populated? if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) nodeNameString = sXDFRootNodeName; writeOut(outputstream,"<" + nodeNameString); // print opening statement } // gather info about XMLAttributes in this object/node Hashtable xmlInfo = getXMLInfo(); // 2. Print out string object XML attributes EXCEPT for the one that // matches PCDATAAttribute. ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); // is synchronized here correct? synchronized(attribs) { int size = attribs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } // 3. Print out Node PCData or Child Nodes as specified by object ref // XML attributes. The way this stuff occurs will also affect how we // close the node. ArrayList childObjs = (ArrayList) xmlInfo.get("childObjList"); String pcdata = (String) xmlInfo.get("PCDATA"); if ( childObjs.size() > 0 || pcdata != null || noChildObjectNodeName != null) { // close the opening tag if (nodeNameString != null) { writeOut(outputstream, ">"); if ((sPrettyXDFOutput) && (pcdata == null)) writeOut(outputstream, Constants.NEW_LINE); } // deal with object/list XML attributes, if any in our list int size = childObjs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) childObjs.get(i); if (item.get("type") == Constants.LIST_TYPE) { List objectList = (List) item.get("value"); // Im not sure this synchronized wrapper is needed, we are // only accessing stuff here.. Also, should synchronzied wrapper // occur back in the getXMLInfo method instead where the orig // access occured?!? synchronized(objectList) { Iterator iter = objectList.iterator(); // Must be in synchronized block while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } } else if (item.get("type") == Constants.OBJECT_TYPE) { BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) // shouldnt this be synchronized too?? synchronized(containedObj) { indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } else { // error: weird type, actually shouldnt occur. Is this needed?? Log.errorln("Weird error: unknown XML attribute type for item:"+item); } } // print out PCDATA, if any if(pcdata != null) { writeOut(outputstream, pcdata); }; // if there are no PCDATA or child objects/nodes then // we print out noChildObjectNodeName and close the node if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent + sPrettyXDFOutputIndentation); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } // ok, now deal with closing the node if (nodeNameString != null) { indent = dealWithClosingGroupNodes((BaseObject) this, outputstream, indent); if (sPrettyXDFOutput && pcdata == null) writeOut(outputstream, indent); if (!dontCloseNode) writeOut(outputstream, "</"+nodeNameString+">"); } } else { if (dontCloseNode) { // it may not have sub-objects, but we dont want to close it // (happens for group objects) writeOut(outputstream, ">"); } else { // no sub-objects, just close this node writeOut(outputstream, "/>"); } } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); }
|
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { String nodeNameString = this.classXDFNodeName; // Setup. Sometimes the name of the node we are opening is different from // that specified in the classXDFNodeName (*sigh*) if (newNodeNameString != null) nodeNameString = newNodeNameString; // 0. To be valid XML, we always start an XML block with an // XML declaration (e.g. somehting like "<?xml standalone="no"?>"). // Here we deal with printing out XML Declaration && its attributes if ((XMLDeclAttribs !=null) &&(!XMLDeclAttribs.isEmpty())) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); } // 1. open this node, print its simple XML attributes if (nodeNameString != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); // indent node if desired // For printing the opening statement we need to invoke a little // Voodoo to keep the DTD happy: the first structure node is always // called by the root node name instead of the usual nodeNameString // We can tell this by checking if this object is derived from class // Structure and if XMLDeclAttrib defined/populated with information // NOTE: This isnt really the way to do this. We need to check if 'this' is // is or has as a superclass xdf.Structure instead of the 'string check' below. // check is class Strucuture & XMLDeclAttribs populated? if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) nodeNameString = sXDFRootNodeName; writeOut(outputstream,"<" + nodeNameString); // print opening statement } // gather info about XMLAttributes in this object/node Hashtable xmlInfo = getXMLInfo(); // 2. Print out string object XML attributes EXCEPT for the one that // matches PCDATAAttribute. ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); // is synchronized here correct? synchronized(attribs) { int size = attribs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } // 3. Print out Node PCData or Child Nodes as specified by object ref // XML attributes. The way this stuff occurs will also affect how we // close the node. ArrayList childObjs = (ArrayList) xmlInfo.get("childObjList"); String pcdata = (String) xmlInfo.get("PCDATA"); if ( childObjs.size() > 0 || pcdata != null || noChildObjectNodeName != null) { // close the opening tag if (nodeNameString != null) { writeOut(outputstream, ">"); if ((sPrettyXDFOutput) && (pcdata == null)) writeOut(outputstream, Constants.NEW_LINE); } // deal with object/list XML attributes, if any in our list int size = childObjs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) childObjs.get(i); if (item.get("type") == Constants.LIST_TYPE) { List objectList = (List) item.get("value"); // Im not sure this synchronized wrapper is needed, we are // only accessing stuff here.. Also, should synchronzied wrapper // occur back in the getXMLInfo method instead where the orig // access occured?!? synchronized(objectList) { Iterator iter = objectList.iterator(); // Must be in synchronized block while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } } else if (item.get("type") == Constants.OBJECT_TYPE) { BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) // shouldnt this be synchronized too?? synchronized(containedObj) { indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } else { // error: weird type, actually shouldnt occur. Is this needed?? Log.errorln("Weird error: unknown XML attribute type for item:"+item); } } // print out PCDATA, if any if(pcdata != null) { writeOut(outputstream, pcdata); }; // if there are no PCDATA or child objects/nodes then // we print out noChildObjectNodeName and close the node if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent + sPrettyXDFOutputIndentation); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } // ok, now deal with closing the node if (nodeNameString != null) { indent = dealWithClosingGroupNodes((BaseObject) this, outputstream, indent); if (sPrettyXDFOutput && pcdata == null) writeOut(outputstream, indent); if (!dontCloseNode) writeOut(outputstream, "</"+nodeNameString+">"); } } else { if (dontCloseNode) { // it may not have sub-objects, but we dont want to close it // (happens for group objects) writeOut(outputstream, ">"); } else { // no sub-objects, just close this node writeOut(outputstream, "/>"); } } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); }
| 7,184
|
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { String nodeNameString = this.classXDFNodeName; // Setup. Sometimes the name of the node we are opening is different from // that specified in the classXDFNodeName (*sigh*) if (newNodeNameString != null) nodeNameString = newNodeNameString; // 0. To be valid XML, we always start an XML block with an // XML declaration (e.g. somehting like "<?xml standalone="no"?>"). // Here we deal with printing out XML Declaration && its attributes if ((XMLDeclAttribs !=null) &&(!XMLDeclAttribs.isEmpty())) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); } // 1. open this node, print its simple XML attributes if (nodeNameString != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); // indent node if desired // For printing the opening statement we need to invoke a little // Voodoo to keep the DTD happy: the first structure node is always // called by the root node name instead of the usual nodeNameString // We can tell this by checking if this object is derived from class // Structure and if XMLDeclAttrib defined/populated with information // NOTE: This isnt really the way to do this. We need to check if 'this' is // is or has as a superclass xdf.Structure instead of the 'string check' below. // check is class Strucuture & XMLDeclAttribs populated? if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) nodeNameString = sXDFRootNodeName; writeOut(outputstream,"<" + nodeNameString); // print opening statement } // gather info about XMLAttributes in this object/node Hashtable xmlInfo = getXMLInfo(); // 2. Print out string object XML attributes EXCEPT for the one that // matches PCDATAAttribute. ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); // is synchronized here correct? synchronized(attribs) { int size = attribs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } // 3. Print out Node PCData or Child Nodes as specified by object ref // XML attributes. The way this stuff occurs will also affect how we // close the node. ArrayList childObjs = (ArrayList) xmlInfo.get("childObjList"); String pcdata = (String) xmlInfo.get("PCDATA"); if ( childObjs.size() > 0 || pcdata != null || noChildObjectNodeName != null) { // close the opening tag if (nodeNameString != null) { writeOut(outputstream, ">"); if ((sPrettyXDFOutput) && (pcdata == null)) writeOut(outputstream, Constants.NEW_LINE); } // deal with object/list XML attributes, if any in our list int size = childObjs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) childObjs.get(i); if (item.get("type") == Constants.LIST_TYPE) { List objectList = (List) item.get("value"); // Im not sure this synchronized wrapper is needed, we are // only accessing stuff here.. Also, should synchronzied wrapper // occur back in the getXMLInfo method instead where the orig // access occured?!? synchronized(objectList) { Iterator iter = objectList.iterator(); // Must be in synchronized block while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } } else if (item.get("type") == Constants.OBJECT_TYPE) { BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) // shouldnt this be synchronized too?? synchronized(containedObj) { indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } else { // error: weird type, actually shouldnt occur. Is this needed?? Log.errorln("Weird error: unknown XML attribute type for item:"+item); } } // print out PCDATA, if any if(pcdata != null) { writeOut(outputstream, pcdata); }; // if there are no PCDATA or child objects/nodes then // we print out noChildObjectNodeName and close the node if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent + sPrettyXDFOutputIndentation); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } // ok, now deal with closing the node if (nodeNameString != null) { indent = dealWithClosingGroupNodes((BaseObject) this, outputstream, indent); if (sPrettyXDFOutput && pcdata == null) writeOut(outputstream, indent); if (!dontCloseNode) writeOut(outputstream, "</"+nodeNameString+">"); } } else { if (dontCloseNode) { // it may not have sub-objects, but we dont want to close it // (happens for group objects) writeOut(outputstream, ">"); } else { // no sub-objects, just close this node writeOut(outputstream, "/>"); } } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); }
|
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { String nodeNameString = this.classXDFNodeName; // Setup. Sometimes the name of the node we are opening is different from // that specified in the classXDFNodeName (*sigh*) if (newNodeNameString != null) nodeNameString = newNodeNameString; // 0. To be valid XML, we always start an XML block with an // XML declaration (e.g. somehting like "<?xml standalone="no"?>"). // Here we deal with printing out XML Declaration && its attributes if ((XMLDeclAttribs !=null) &&(!XMLDeclAttribs.isEmpty())) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); } // 1. open this node, print its simple XML attributes if (nodeNameString != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); // indent node if desired // For printing the opening statement we need to invoke a little // Voodoo to keep the DTD happy: the first structure node is always // called by the root node name instead of the usual nodeNameString // We can tell this by checking if this object is derived from class // Structure and if XMLDeclAttrib defined/populated with information // NOTE: This isnt really the way to do this. We need to check if 'this' is // is or has as a superclass xdf.Structure instead of the 'string check' below. // check is class Strucuture & XMLDeclAttribs populated? if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) nodeNameString = sXDFRootNodeName; writeOut(outputstream,"<" + nodeNameString); // print opening statement } // gather info about XMLAttributes in this object/node Hashtable xmlInfo = getXMLInfo(); // 2. Print out string object XML attributes EXCEPT for the one that // matches PCDATAAttribute. ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); // is synchronized here correct? synchronized(attribs) { int size = attribs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } // 3. Print out Node PCData or Child Nodes as specified by object ref // XML attributes. The way this stuff occurs will also affect how we // close the node. ArrayList childObjs = (ArrayList) xmlInfo.get("childObjList"); String pcdata = (String) xmlInfo.get("PCDATA"); if ( childObjs.size() > 0 || pcdata != null || noChildObjectNodeName != null) { // close the opening tag if (nodeNameString != null) { writeOut(outputstream, ">"); if ((sPrettyXDFOutput) && (pcdata == null)) writeOut(outputstream, Constants.NEW_LINE); } // deal with object/list XML attributes, if any in our list int size = childObjs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) childObjs.get(i); if (item.get("type") == Constants.LIST_TYPE) { List objectList = (List) item.get("value"); // Im not sure this synchronized wrapper is needed, we are // only accessing stuff here.. Also, should synchronzied wrapper // occur back in the getXMLInfo method instead where the orig // access occured?!? synchronized(objectList) { Iterator iter = objectList.iterator(); // Must be in synchronized block while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } } else if (item.get("type") == Constants.OBJECT_TYPE) { BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) // shouldnt this be synchronized too?? synchronized(containedObj) { indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } else { // error: weird type, actually shouldnt occur. Is this needed?? Log.errorln("Weird error: unknown XML attribute type for item:"+item); } } // print out PCDATA, if any if(pcdata != null) { writeOut(outputstream, pcdata); }; // if there are no PCDATA or child objects/nodes then // we print out noChildObjectNodeName and close the node if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent + sPrettyXDFOutputIndentation); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } // ok, now deal with closing the node if (nodeNameString != null) { indent = dealWithClosingGroupNodes((BaseObject) this, outputstream, indent); if (sPrettyXDFOutput && pcdata == null) writeOut(outputstream, indent); if (!dontCloseNode) writeOut(outputstream, "</"+nodeNameString+">"); } } else { if (dontCloseNode) { // it may not have sub-objects, but we dont want to close it // (happens for group objects) writeOut(outputstream, ">"); } else { // no sub-objects, just close this node writeOut(outputstream, "/>"); } } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); }
| 7,185
|
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { String nodeNameString = this.classXDFNodeName; // Setup. Sometimes the name of the node we are opening is different from // that specified in the classXDFNodeName (*sigh*) if (newNodeNameString != null) nodeNameString = newNodeNameString; // 0. To be valid XML, we always start an XML block with an // XML declaration (e.g. somehting like "<?xml standalone="no"?>"). // Here we deal with printing out XML Declaration && its attributes if ((XMLDeclAttribs !=null) &&(!XMLDeclAttribs.isEmpty())) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); } // 1. open this node, print its simple XML attributes if (nodeNameString != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); // indent node if desired // For printing the opening statement we need to invoke a little // Voodoo to keep the DTD happy: the first structure node is always // called by the root node name instead of the usual nodeNameString // We can tell this by checking if this object is derived from class // Structure and if XMLDeclAttrib defined/populated with information // NOTE: This isnt really the way to do this. We need to check if 'this' is // is or has as a superclass xdf.Structure instead of the 'string check' below. // check is class Strucuture & XMLDeclAttribs populated? if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) nodeNameString = sXDFRootNodeName; writeOut(outputstream,"<" + nodeNameString); // print opening statement } // gather info about XMLAttributes in this object/node Hashtable xmlInfo = getXMLInfo(); // 2. Print out string object XML attributes EXCEPT for the one that // matches PCDATAAttribute. ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); // is synchronized here correct? synchronized(attribs) { int size = attribs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } // 3. Print out Node PCData or Child Nodes as specified by object ref // XML attributes. The way this stuff occurs will also affect how we // close the node. ArrayList childObjs = (ArrayList) xmlInfo.get("childObjList"); String pcdata = (String) xmlInfo.get("PCDATA"); if ( childObjs.size() > 0 || pcdata != null || noChildObjectNodeName != null) { // close the opening tag if (nodeNameString != null) { writeOut(outputstream, ">"); if ((sPrettyXDFOutput) && (pcdata == null)) writeOut(outputstream, Constants.NEW_LINE); } // deal with object/list XML attributes, if any in our list int size = childObjs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) childObjs.get(i); if (item.get("type") == Constants.LIST_TYPE) { List objectList = (List) item.get("value"); // Im not sure this synchronized wrapper is needed, we are // only accessing stuff here.. Also, should synchronzied wrapper // occur back in the getXMLInfo method instead where the orig // access occured?!? synchronized(objectList) { Iterator iter = objectList.iterator(); // Must be in synchronized block while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } } else if (item.get("type") == Constants.OBJECT_TYPE) { BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) // shouldnt this be synchronized too?? synchronized(containedObj) { indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } else { // error: weird type, actually shouldnt occur. Is this needed?? Log.errorln("Weird error: unknown XML attribute type for item:"+item); } } // print out PCDATA, if any if(pcdata != null) { writeOut(outputstream, pcdata); }; // if there are no PCDATA or child objects/nodes then // we print out noChildObjectNodeName and close the node if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent + sPrettyXDFOutputIndentation); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } // ok, now deal with closing the node if (nodeNameString != null) { indent = dealWithClosingGroupNodes((BaseObject) this, outputstream, indent); if (sPrettyXDFOutput && pcdata == null) writeOut(outputstream, indent); if (!dontCloseNode) writeOut(outputstream, "</"+nodeNameString+">"); } } else { if (dontCloseNode) { // it may not have sub-objects, but we dont want to close it // (happens for group objects) writeOut(outputstream, ">"); } else { // no sub-objects, just close this node writeOut(outputstream, "/>"); } } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); }
|
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { String nodeNameString = this.classXDFNodeName; // Setup. Sometimes the name of the node we are opening is different from // that specified in the classXDFNodeName (*sigh*) if (newNodeNameString != null) nodeNameString = newNodeNameString; // 0. To be valid XML, we always start an XML block with an // XML declaration (e.g. somehting like "<?xml standalone="no"?>"). // Here we deal with printing out XML Declaration && its attributes if ((XMLDeclAttribs !=null) &&(!XMLDeclAttribs.isEmpty())) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); } // 1. open this node, print its simple XML attributes if (nodeNameString != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); // indent node if desired // For printing the opening statement we need to invoke a little // Voodoo to keep the DTD happy: the first structure node is always // called by the root node name instead of the usual nodeNameString // We can tell this by checking if this object is derived from class // Structure and if XMLDeclAttrib defined/populated with information // NOTE: This isnt really the way to do this. We need to check if 'this' is // is or has as a superclass xdf.Structure instead of the 'string check' below. // check is class Strucuture & XMLDeclAttribs populated? if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) nodeNameString = sXDFRootNodeName; writeOut(outputstream,"<" + nodeNameString); // print opening statement } // gather info about XMLAttributes in this object/node Hashtable xmlInfo = getXMLInfo(); // 2. Print out string object XML attributes EXCEPT for the one that // matches PCDATAAttribute. ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); // is synchronized here correct? synchronized(attribs) { int size = attribs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } // 3. Print out Node PCData or Child Nodes as specified by object ref // XML attributes. The way this stuff occurs will also affect how we // close the node. ArrayList childObjs = (ArrayList) xmlInfo.get("childObjList"); String pcdata = (String) xmlInfo.get("PCDATA"); if ( childObjs.size() > 0 || pcdata != null || noChildObjectNodeName != null) { // close the opening tag if (nodeNameString != null) { writeOut(outputstream, ">"); if ((sPrettyXDFOutput) && (pcdata == null)) writeOut(outputstream, Constants.NEW_LINE); } // deal with object/list XML attributes, if any in our list int size = childObjs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) childObjs.get(i); if (item.get("type") == Constants.LIST_TYPE) { List objectList = (List) item.get("value"); // Im not sure this synchronized wrapper is needed, we are // only accessing stuff here.. Also, should synchronzied wrapper // occur back in the getXMLInfo method instead where the orig // access occured?!? synchronized(objectList) { Iterator iter = objectList.iterator(); // Must be in synchronized block while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } } else if (item.get("type") == Constants.OBJECT_TYPE) { BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) // shouldnt this be synchronized too?? synchronized(containedObj) { indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } else { // error: weird type, actually shouldnt occur. Is this needed?? Log.errorln("Weird error: unknown XML attribute type for item:"+item); } } // print out PCDATA, if any if(pcdata != null) { writeOut(outputstream, pcdata); }; // if there are no PCDATA or child objects/nodes then // we print out noChildObjectNodeName and close the node if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent + sPrettyXDFOutputIndentation); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } // ok, now deal with closing the node if (nodeNameString != null) { indent = dealWithClosingGroupNodes((BaseObject) this, outputstream, indent); if (sPrettyXDFOutput && pcdata == null) writeOut(outputstream, indent); if (!dontCloseNode) writeOut(outputstream, "</"+nodeNameString+">"); } } else { if (dontCloseNode) { // it may not have sub-objects, but we dont want to close it // (happens for group objects) writeOut(outputstream, ">"); } else { // no sub-objects, just close this node writeOut(outputstream, "/>"); } } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); }
| 7,186
|
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { String nodeNameString = this.classXDFNodeName; // Setup. Sometimes the name of the node we are opening is different from // that specified in the classXDFNodeName (*sigh*) if (newNodeNameString != null) nodeNameString = newNodeNameString; // 0. To be valid XML, we always start an XML block with an // XML declaration (e.g. somehting like "<?xml standalone="no"?>"). // Here we deal with printing out XML Declaration && its attributes if ((XMLDeclAttribs !=null) &&(!XMLDeclAttribs.isEmpty())) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); } // 1. open this node, print its simple XML attributes if (nodeNameString != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); // indent node if desired // For printing the opening statement we need to invoke a little // Voodoo to keep the DTD happy: the first structure node is always // called by the root node name instead of the usual nodeNameString // We can tell this by checking if this object is derived from class // Structure and if XMLDeclAttrib defined/populated with information // NOTE: This isnt really the way to do this. We need to check if 'this' is // is or has as a superclass xdf.Structure instead of the 'string check' below. // check is class Strucuture & XMLDeclAttribs populated? if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) nodeNameString = sXDFRootNodeName; writeOut(outputstream,"<" + nodeNameString); // print opening statement } // gather info about XMLAttributes in this object/node Hashtable xmlInfo = getXMLInfo(); // 2. Print out string object XML attributes EXCEPT for the one that // matches PCDATAAttribute. ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); // is synchronized here correct? synchronized(attribs) { int size = attribs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } // 3. Print out Node PCData or Child Nodes as specified by object ref // XML attributes. The way this stuff occurs will also affect how we // close the node. ArrayList childObjs = (ArrayList) xmlInfo.get("childObjList"); String pcdata = (String) xmlInfo.get("PCDATA"); if ( childObjs.size() > 0 || pcdata != null || noChildObjectNodeName != null) { // close the opening tag if (nodeNameString != null) { writeOut(outputstream, ">"); if ((sPrettyXDFOutput) && (pcdata == null)) writeOut(outputstream, Constants.NEW_LINE); } // deal with object/list XML attributes, if any in our list int size = childObjs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) childObjs.get(i); if (item.get("type") == Constants.LIST_TYPE) { List objectList = (List) item.get("value"); // Im not sure this synchronized wrapper is needed, we are // only accessing stuff here.. Also, should synchronzied wrapper // occur back in the getXMLInfo method instead where the orig // access occured?!? synchronized(objectList) { Iterator iter = objectList.iterator(); // Must be in synchronized block while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } } else if (item.get("type") == Constants.OBJECT_TYPE) { BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) // shouldnt this be synchronized too?? synchronized(containedObj) { indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } else { // error: weird type, actually shouldnt occur. Is this needed?? Log.errorln("Weird error: unknown XML attribute type for item:"+item); } } // print out PCDATA, if any if(pcdata != null) { writeOut(outputstream, pcdata); }; // if there are no PCDATA or child objects/nodes then // we print out noChildObjectNodeName and close the node if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent + sPrettyXDFOutputIndentation); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } // ok, now deal with closing the node if (nodeNameString != null) { indent = dealWithClosingGroupNodes((BaseObject) this, outputstream, indent); if (sPrettyXDFOutput && pcdata == null) writeOut(outputstream, indent); if (!dontCloseNode) writeOut(outputstream, "</"+nodeNameString+">"); } } else { if (dontCloseNode) { // it may not have sub-objects, but we dont want to close it // (happens for group objects) writeOut(outputstream, ">"); } else { // no sub-objects, just close this node writeOut(outputstream, "/>"); } } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); }
|
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { String nodeNameString = this.classXDFNodeName; // Setup. Sometimes the name of the node we are opening is different from // that specified in the classXDFNodeName (*sigh*) if (newNodeNameString != null) nodeNameString = newNodeNameString; // 0. To be valid XML, we always start an XML block with an // XML declaration (e.g. somehting like "<?xml standalone="no"?>"). // Here we deal with printing out XML Declaration && its attributes if ((XMLDeclAttribs !=null) &&(!XMLDeclAttribs.isEmpty())) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); } // 1. open this node, print its simple XML attributes if (nodeNameString != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); // indent node if desired // For printing the opening statement we need to invoke a little // Voodoo to keep the DTD happy: the first structure node is always // called by the root node name instead of the usual nodeNameString // We can tell this by checking if this object is derived from class // Structure and if XMLDeclAttrib defined/populated with information // NOTE: This isnt really the way to do this. We need to check if 'this' is // is or has as a superclass xdf.Structure instead of the 'string check' below. // check is class Strucuture & XMLDeclAttribs populated? if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) nodeNameString = sXDFRootNodeName; writeOut(outputstream,"<" + nodeNameString); // print opening statement } // gather info about XMLAttributes in this object/node Hashtable xmlInfo = getXMLInfo(); // 2. Print out string object XML attributes EXCEPT for the one that // matches PCDATAAttribute. ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); // is synchronized here correct? synchronized(attribs) { int size = attribs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } // 3. Print out Node PCData or Child Nodes as specified by object ref // XML attributes. The way this stuff occurs will also affect how we // close the node. ArrayList childObjs = (ArrayList) xmlInfo.get("childObjList"); String pcdata = (String) xmlInfo.get("PCDATA"); if ( childObjs.size() > 0 || pcdata != null || noChildObjectNodeName != null) { // close the opening tag if (nodeNameString != null) { writeOut(outputstream, ">"); if ((sPrettyXDFOutput) && (pcdata == null)) writeOut(outputstream, Constants.NEW_LINE); } // deal with object/list XML attributes, if any in our list int size = childObjs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) childObjs.get(i); if (item.get("type") == Constants.LIST_TYPE) { List objectList = (List) item.get("value"); // Im not sure this synchronized wrapper is needed, we are // only accessing stuff here.. Also, should synchronzied wrapper // occur back in the getXMLInfo method instead where the orig // access occured?!? synchronized(objectList) { Iterator iter = objectList.iterator(); // Must be in synchronized block while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + Specification.getInstance().getPrettyXDFOutputIndentation(); containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } } else if (item.get("type") == Constants.OBJECT_TYPE) { BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) // shouldnt this be synchronized too?? synchronized(containedObj) { indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + Specification.getInstance().getPrettyXDFOutputIndentation(); containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } else { // error: weird type, actually shouldnt occur. Is this needed?? Log.errorln("Weird error: unknown XML attribute type for item:"+item); } } // print out PCDATA, if any if(pcdata != null) { writeOut(outputstream, pcdata); }; // if there are no PCDATA or child objects/nodes then // we print out noChildObjectNodeName and close the node if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent + sPrettyXDFOutputIndentation); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } // ok, now deal with closing the node if (nodeNameString != null) { indent = dealWithClosingGroupNodes((BaseObject) this, outputstream, indent); if (sPrettyXDFOutput && pcdata == null) writeOut(outputstream, indent); if (!dontCloseNode) writeOut(outputstream, "</"+nodeNameString+">"); } } else { if (dontCloseNode) { // it may not have sub-objects, but we dont want to close it // (happens for group objects) writeOut(outputstream, ">"); } else { // no sub-objects, just close this node writeOut(outputstream, "/>"); } } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); }
| 7,187
|
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { String nodeNameString = this.classXDFNodeName; // Setup. Sometimes the name of the node we are opening is different from // that specified in the classXDFNodeName (*sigh*) if (newNodeNameString != null) nodeNameString = newNodeNameString; // 0. To be valid XML, we always start an XML block with an // XML declaration (e.g. somehting like "<?xml standalone="no"?>"). // Here we deal with printing out XML Declaration && its attributes if ((XMLDeclAttribs !=null) &&(!XMLDeclAttribs.isEmpty())) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); } // 1. open this node, print its simple XML attributes if (nodeNameString != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); // indent node if desired // For printing the opening statement we need to invoke a little // Voodoo to keep the DTD happy: the first structure node is always // called by the root node name instead of the usual nodeNameString // We can tell this by checking if this object is derived from class // Structure and if XMLDeclAttrib defined/populated with information // NOTE: This isnt really the way to do this. We need to check if 'this' is // is or has as a superclass xdf.Structure instead of the 'string check' below. // check is class Strucuture & XMLDeclAttribs populated? if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) nodeNameString = sXDFRootNodeName; writeOut(outputstream,"<" + nodeNameString); // print opening statement } // gather info about XMLAttributes in this object/node Hashtable xmlInfo = getXMLInfo(); // 2. Print out string object XML attributes EXCEPT for the one that // matches PCDATAAttribute. ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); // is synchronized here correct? synchronized(attribs) { int size = attribs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } // 3. Print out Node PCData or Child Nodes as specified by object ref // XML attributes. The way this stuff occurs will also affect how we // close the node. ArrayList childObjs = (ArrayList) xmlInfo.get("childObjList"); String pcdata = (String) xmlInfo.get("PCDATA"); if ( childObjs.size() > 0 || pcdata != null || noChildObjectNodeName != null) { // close the opening tag if (nodeNameString != null) { writeOut(outputstream, ">"); if ((sPrettyXDFOutput) && (pcdata == null)) writeOut(outputstream, Constants.NEW_LINE); } // deal with object/list XML attributes, if any in our list int size = childObjs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) childObjs.get(i); if (item.get("type") == Constants.LIST_TYPE) { List objectList = (List) item.get("value"); // Im not sure this synchronized wrapper is needed, we are // only accessing stuff here.. Also, should synchronzied wrapper // occur back in the getXMLInfo method instead where the orig // access occured?!? synchronized(objectList) { Iterator iter = objectList.iterator(); // Must be in synchronized block while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } } else if (item.get("type") == Constants.OBJECT_TYPE) { BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) // shouldnt this be synchronized too?? synchronized(containedObj) { indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } else { // error: weird type, actually shouldnt occur. Is this needed?? Log.errorln("Weird error: unknown XML attribute type for item:"+item); } } // print out PCDATA, if any if(pcdata != null) { writeOut(outputstream, pcdata); }; // if there are no PCDATA or child objects/nodes then // we print out noChildObjectNodeName and close the node if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent + sPrettyXDFOutputIndentation); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } // ok, now deal with closing the node if (nodeNameString != null) { indent = dealWithClosingGroupNodes((BaseObject) this, outputstream, indent); if (sPrettyXDFOutput && pcdata == null) writeOut(outputstream, indent); if (!dontCloseNode) writeOut(outputstream, "</"+nodeNameString+">"); } } else { if (dontCloseNode) { // it may not have sub-objects, but we dont want to close it // (happens for group objects) writeOut(outputstream, ">"); } else { // no sub-objects, just close this node writeOut(outputstream, "/>"); } } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); }
|
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { String nodeNameString = this.classXDFNodeName; // Setup. Sometimes the name of the node we are opening is different from // that specified in the classXDFNodeName (*sigh*) if (newNodeNameString != null) nodeNameString = newNodeNameString; // 0. To be valid XML, we always start an XML block with an // XML declaration (e.g. somehting like "<?xml standalone="no"?>"). // Here we deal with printing out XML Declaration && its attributes if ((XMLDeclAttribs !=null) &&(!XMLDeclAttribs.isEmpty())) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); } // 1. open this node, print its simple XML attributes if (nodeNameString != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); // indent node if desired // For printing the opening statement we need to invoke a little // Voodoo to keep the DTD happy: the first structure node is always // called by the root node name instead of the usual nodeNameString // We can tell this by checking if this object is derived from class // Structure and if XMLDeclAttrib defined/populated with information // NOTE: This isnt really the way to do this. We need to check if 'this' is // is or has as a superclass xdf.Structure instead of the 'string check' below. // check is class Strucuture & XMLDeclAttribs populated? if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) nodeNameString = sXDFRootNodeName; writeOut(outputstream,"<" + nodeNameString); // print opening statement } // gather info about XMLAttributes in this object/node Hashtable xmlInfo = getXMLInfo(); // 2. Print out string object XML attributes EXCEPT for the one that // matches PCDATAAttribute. ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); // is synchronized here correct? synchronized(attribs) { int size = attribs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } // 3. Print out Node PCData or Child Nodes as specified by object ref // XML attributes. The way this stuff occurs will also affect how we // close the node. ArrayList childObjs = (ArrayList) xmlInfo.get("childObjList"); String pcdata = (String) xmlInfo.get("PCDATA"); if ( childObjs.size() > 0 || pcdata != null || noChildObjectNodeName != null) { // close the opening tag if (nodeNameString != null) { writeOut(outputstream, ">"); if ((sPrettyXDFOutput) && (pcdata == null)) writeOut(outputstream, Constants.NEW_LINE); } // deal with object/list XML attributes, if any in our list int size = childObjs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) childObjs.get(i); if (item.get("type") == Constants.LIST_TYPE) { List objectList = (List) item.get("value"); // Im not sure this synchronized wrapper is needed, we are // only accessing stuff here.. Also, should synchronzied wrapper // occur back in the getXMLInfo method instead where the orig // access occured?!? synchronized(objectList) { Iterator iter = objectList.iterator(); // Must be in synchronized block while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } } if(pcdata != null) { writeOut(outputstream, pcdata); }; if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) // shouldnt this be synchronized too?? synchronized(containedObj) { indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } else { // error: weird type, actually shouldnt occur. Is this needed?? Log.errorln("Weird error: unknown XML attribute type for item:"+item); } } // print out PCDATA, if any if(pcdata != null) { writeOut(outputstream, pcdata); }; // if there are no PCDATA or child objects/nodes then // we print out noChildObjectNodeName and close the node if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent + sPrettyXDFOutputIndentation); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } // ok, now deal with closing the node if (nodeNameString != null) { indent = dealWithClosingGroupNodes((BaseObject) this, outputstream, indent); if (sPrettyXDFOutput && pcdata == null) writeOut(outputstream, indent); if (!dontCloseNode) writeOut(outputstream, "</"+nodeNameString+">"); } } else { if (dontCloseNode) { // it may not have sub-objects, but we dont want to close it // (happens for group objects) writeOut(outputstream, ">"); } else { // no sub-objects, just close this node writeOut(outputstream, "/>"); } } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); }
| 7,188
|
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { String nodeNameString = this.classXDFNodeName; // Setup. Sometimes the name of the node we are opening is different from // that specified in the classXDFNodeName (*sigh*) if (newNodeNameString != null) nodeNameString = newNodeNameString; // 0. To be valid XML, we always start an XML block with an // XML declaration (e.g. somehting like "<?xml standalone="no"?>"). // Here we deal with printing out XML Declaration && its attributes if ((XMLDeclAttribs !=null) &&(!XMLDeclAttribs.isEmpty())) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); } // 1. open this node, print its simple XML attributes if (nodeNameString != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); // indent node if desired // For printing the opening statement we need to invoke a little // Voodoo to keep the DTD happy: the first structure node is always // called by the root node name instead of the usual nodeNameString // We can tell this by checking if this object is derived from class // Structure and if XMLDeclAttrib defined/populated with information // NOTE: This isnt really the way to do this. We need to check if 'this' is // is or has as a superclass xdf.Structure instead of the 'string check' below. // check is class Strucuture & XMLDeclAttribs populated? if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) nodeNameString = sXDFRootNodeName; writeOut(outputstream,"<" + nodeNameString); // print opening statement } // gather info about XMLAttributes in this object/node Hashtable xmlInfo = getXMLInfo(); // 2. Print out string object XML attributes EXCEPT for the one that // matches PCDATAAttribute. ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); // is synchronized here correct? synchronized(attribs) { int size = attribs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } // 3. Print out Node PCData or Child Nodes as specified by object ref // XML attributes. The way this stuff occurs will also affect how we // close the node. ArrayList childObjs = (ArrayList) xmlInfo.get("childObjList"); String pcdata = (String) xmlInfo.get("PCDATA"); if ( childObjs.size() > 0 || pcdata != null || noChildObjectNodeName != null) { // close the opening tag if (nodeNameString != null) { writeOut(outputstream, ">"); if ((sPrettyXDFOutput) && (pcdata == null)) writeOut(outputstream, Constants.NEW_LINE); } // deal with object/list XML attributes, if any in our list int size = childObjs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) childObjs.get(i); if (item.get("type") == Constants.LIST_TYPE) { List objectList = (List) item.get("value"); // Im not sure this synchronized wrapper is needed, we are // only accessing stuff here.. Also, should synchronzied wrapper // occur back in the getXMLInfo method instead where the orig // access occured?!? synchronized(objectList) { Iterator iter = objectList.iterator(); // Must be in synchronized block while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } } else if (item.get("type") == Constants.OBJECT_TYPE) { BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) // shouldnt this be synchronized too?? synchronized(containedObj) { indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } else { // error: weird type, actually shouldnt occur. Is this needed?? Log.errorln("Weird error: unknown XML attribute type for item:"+item); } } // print out PCDATA, if any if(pcdata != null) { writeOut(outputstream, pcdata); }; // if there are no PCDATA or child objects/nodes then // we print out noChildObjectNodeName and close the node if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent + sPrettyXDFOutputIndentation); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } // ok, now deal with closing the node if (nodeNameString != null) { indent = dealWithClosingGroupNodes((BaseObject) this, outputstream, indent); if (sPrettyXDFOutput && pcdata == null) writeOut(outputstream, indent); if (!dontCloseNode) writeOut(outputstream, "</"+nodeNameString+">"); } } else { if (dontCloseNode) { // it may not have sub-objects, but we dont want to close it // (happens for group objects) writeOut(outputstream, ">"); } else { // no sub-objects, just close this node writeOut(outputstream, "/>"); } } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); }
|
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { String nodeNameString = this.classXDFNodeName; // Setup. Sometimes the name of the node we are opening is different from // that specified in the classXDFNodeName (*sigh*) if (newNodeNameString != null) nodeNameString = newNodeNameString; // 0. To be valid XML, we always start an XML block with an // XML declaration (e.g. somehting like "<?xml standalone="no"?>"). // Here we deal with printing out XML Declaration && its attributes if ((XMLDeclAttribs !=null) &&(!XMLDeclAttribs.isEmpty())) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); } // 1. open this node, print its simple XML attributes if (nodeNameString != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); // indent node if desired // For printing the opening statement we need to invoke a little // Voodoo to keep the DTD happy: the first structure node is always // called by the root node name instead of the usual nodeNameString // We can tell this by checking if this object is derived from class // Structure and if XMLDeclAttrib defined/populated with information // NOTE: This isnt really the way to do this. We need to check if 'this' is // is or has as a superclass xdf.Structure instead of the 'string check' below. // check is class Strucuture & XMLDeclAttribs populated? if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) nodeNameString = sXDFRootNodeName; writeOut(outputstream,"<" + nodeNameString); // print opening statement } // gather info about XMLAttributes in this object/node Hashtable xmlInfo = getXMLInfo(); // 2. Print out string object XML attributes EXCEPT for the one that // matches PCDATAAttribute. ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); // is synchronized here correct? synchronized(attribs) { int size = attribs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } // 3. Print out Node PCData or Child Nodes as specified by object ref // XML attributes. The way this stuff occurs will also affect how we // close the node. ArrayList childObjs = (ArrayList) xmlInfo.get("childObjList"); String pcdata = (String) xmlInfo.get("PCDATA"); if ( childObjs.size() > 0 || pcdata != null || noChildObjectNodeName != null) { // close the opening tag if (nodeNameString != null) { writeOut(outputstream, ">"); if ((sPrettyXDFOutput) && (pcdata == null)) writeOut(outputstream, Constants.NEW_LINE); } // deal with object/list XML attributes, if any in our list int size = childObjs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) childObjs.get(i); if (item.get("type") == Constants.LIST_TYPE) { List objectList = (List) item.get("value"); // Im not sure this synchronized wrapper is needed, we are // only accessing stuff here.. Also, should synchronzied wrapper // occur back in the getXMLInfo method instead where the orig // access occured?!? synchronized(objectList) { Iterator iter = objectList.iterator(); // Must be in synchronized block while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } } else if (item.get("type") == Constants.OBJECT_TYPE) { BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) // shouldnt this be synchronized too?? synchronized(containedObj) { indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } else { // error: weird type, actually shouldnt occur. Is this needed?? Log.errorln("Weird error: unknown XML attribute type for item:"+item); } } // print out PCDATA, if any if(pcdata != null) { writeOut(outputstream, pcdata); }; // if there are no PCDATA or child objects/nodes then // we print out noChildObjectNodeName and close the node if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent + sPrettyXDFOutputIndentation); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } // ok, now deal with closing the node if (nodeNameString != null) { indent = dealWithClosingGroupNodes((BaseObject) this, outputstream, indent); if (sPrettyXDFOutput && pcdata == null) writeOut(outputstream, indent); if (!dontCloseNode) writeOut(outputstream, "</"+nodeNameString+">"); } } else { if (dontCloseNode) { // it may not have sub-objects, but we dont want to close it // (happens for group objects) writeOut(outputstream, ">"); } else { // no sub-objects, just close this node writeOut(outputstream, "/>"); } } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); }
| 7,189
|
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { String nodeNameString = this.classXDFNodeName; // Setup. Sometimes the name of the node we are opening is different from // that specified in the classXDFNodeName (*sigh*) if (newNodeNameString != null) nodeNameString = newNodeNameString; // 0. To be valid XML, we always start an XML block with an // XML declaration (e.g. somehting like "<?xml standalone="no"?>"). // Here we deal with printing out XML Declaration && its attributes if ((XMLDeclAttribs !=null) &&(!XMLDeclAttribs.isEmpty())) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); } // 1. open this node, print its simple XML attributes if (nodeNameString != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); // indent node if desired // For printing the opening statement we need to invoke a little // Voodoo to keep the DTD happy: the first structure node is always // called by the root node name instead of the usual nodeNameString // We can tell this by checking if this object is derived from class // Structure and if XMLDeclAttrib defined/populated with information // NOTE: This isnt really the way to do this. We need to check if 'this' is // is or has as a superclass xdf.Structure instead of the 'string check' below. // check is class Strucuture & XMLDeclAttribs populated? if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) nodeNameString = sXDFRootNodeName; writeOut(outputstream,"<" + nodeNameString); // print opening statement } // gather info about XMLAttributes in this object/node Hashtable xmlInfo = getXMLInfo(); // 2. Print out string object XML attributes EXCEPT for the one that // matches PCDATAAttribute. ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); // is synchronized here correct? synchronized(attribs) { int size = attribs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } // 3. Print out Node PCData or Child Nodes as specified by object ref // XML attributes. The way this stuff occurs will also affect how we // close the node. ArrayList childObjs = (ArrayList) xmlInfo.get("childObjList"); String pcdata = (String) xmlInfo.get("PCDATA"); if ( childObjs.size() > 0 || pcdata != null || noChildObjectNodeName != null) { // close the opening tag if (nodeNameString != null) { writeOut(outputstream, ">"); if ((sPrettyXDFOutput) && (pcdata == null)) writeOut(outputstream, Constants.NEW_LINE); } // deal with object/list XML attributes, if any in our list int size = childObjs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) childObjs.get(i); if (item.get("type") == Constants.LIST_TYPE) { List objectList = (List) item.get("value"); // Im not sure this synchronized wrapper is needed, we are // only accessing stuff here.. Also, should synchronzied wrapper // occur back in the getXMLInfo method instead where the orig // access occured?!? synchronized(objectList) { Iterator iter = objectList.iterator(); // Must be in synchronized block while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } } else if (item.get("type") == Constants.OBJECT_TYPE) { BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) // shouldnt this be synchronized too?? synchronized(containedObj) { indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } else { // error: weird type, actually shouldnt occur. Is this needed?? Log.errorln("Weird error: unknown XML attribute type for item:"+item); } } // print out PCDATA, if any if(pcdata != null) { writeOut(outputstream, pcdata); }; // if there are no PCDATA or child objects/nodes then // we print out noChildObjectNodeName and close the node if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent + sPrettyXDFOutputIndentation); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } // ok, now deal with closing the node if (nodeNameString != null) { indent = dealWithClosingGroupNodes((BaseObject) this, outputstream, indent); if (sPrettyXDFOutput && pcdata == null) writeOut(outputstream, indent); if (!dontCloseNode) writeOut(outputstream, "</"+nodeNameString+">"); } } else { if (dontCloseNode) { // it may not have sub-objects, but we dont want to close it // (happens for group objects) writeOut(outputstream, ">"); } else { // no sub-objects, just close this node writeOut(outputstream, "/>"); } } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); }
|
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { String nodeNameString = this.classXDFNodeName; // Setup. Sometimes the name of the node we are opening is different from // that specified in the classXDFNodeName (*sigh*) if (newNodeNameString != null) nodeNameString = newNodeNameString; // 0. To be valid XML, we always start an XML block with an // XML declaration (e.g. somehting like "<?xml standalone="no"?>"). // Here we deal with printing out XML Declaration && its attributes if ((XMLDeclAttribs !=null) &&(!XMLDeclAttribs.isEmpty())) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); } // 1. open this node, print its simple XML attributes if (nodeNameString != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); // indent node if desired // For printing the opening statement we need to invoke a little // Voodoo to keep the DTD happy: the first structure node is always // called by the root node name instead of the usual nodeNameString // We can tell this by checking if this object is derived from class // Structure and if XMLDeclAttrib defined/populated with information // NOTE: This isnt really the way to do this. We need to check if 'this' is // is or has as a superclass xdf.Structure instead of the 'string check' below. // check is class Strucuture & XMLDeclAttribs populated? if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) nodeNameString = sXDFRootNodeName; writeOut(outputstream,"<" + nodeNameString); // print opening statement } // gather info about XMLAttributes in this object/node Hashtable xmlInfo = getXMLInfo(); // 2. Print out string object XML attributes EXCEPT for the one that // matches PCDATAAttribute. ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); // is synchronized here correct? synchronized(attribs) { int size = attribs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } // 3. Print out Node PCData or Child Nodes as specified by object ref // XML attributes. The way this stuff occurs will also affect how we // close the node. ArrayList childObjs = (ArrayList) xmlInfo.get("childObjList"); String pcdata = (String) xmlInfo.get("PCDATA"); if ( childObjs.size() > 0 || pcdata != null || noChildObjectNodeName != null) { // close the opening tag if (nodeNameString != null) { writeOut(outputstream, ">"); if ((sPrettyXDFOutput) && (pcdata == null)) writeOut(outputstream, Constants.NEW_LINE); } // deal with object/list XML attributes, if any in our list int size = childObjs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) childObjs.get(i); if (item.get("type") == Constants.LIST_TYPE) { List objectList = (List) item.get("value"); // Im not sure this synchronized wrapper is needed, we are // only accessing stuff here.. Also, should synchronzied wrapper // occur back in the getXMLInfo method instead where the orig // access occured?!? synchronized(objectList) { Iterator iter = objectList.iterator(); // Must be in synchronized block while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } } else if (item.get("type") == Constants.OBJECT_TYPE) { BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) // shouldnt this be synchronized too?? synchronized(containedObj) { indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } else { // error: weird type, actually shouldnt occur. Is this needed?? writeOut(outputstream, "/>"); } } // print out PCDATA, if any if(pcdata != null) { writeOut(outputstream, pcdata); }; // if there are no PCDATA or child objects/nodes then // we print out noChildObjectNodeName and close the node if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent + sPrettyXDFOutputIndentation); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } // ok, now deal with closing the node if (nodeNameString != null) { indent = dealWithClosingGroupNodes((BaseObject) this, outputstream, indent); if (sPrettyXDFOutput && pcdata == null) writeOut(outputstream, indent); if (!dontCloseNode) writeOut(outputstream, "</"+nodeNameString+">"); } } else { if (dontCloseNode) { // it may not have sub-objects, but we dont want to close it // (happens for group objects) writeOut(outputstream, ">"); } else { // no sub-objects, just close this node writeOut(outputstream, "/>"); } } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); }
| 7,190
|
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { String nodeNameString = this.classXDFNodeName; // Setup. Sometimes the name of the node we are opening is different from // that specified in the classXDFNodeName (*sigh*) if (newNodeNameString != null) nodeNameString = newNodeNameString; // 0. To be valid XML, we always start an XML block with an // XML declaration (e.g. somehting like "<?xml standalone="no"?>"). // Here we deal with printing out XML Declaration && its attributes if ((XMLDeclAttribs !=null) &&(!XMLDeclAttribs.isEmpty())) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); } // 1. open this node, print its simple XML attributes if (nodeNameString != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); // indent node if desired // For printing the opening statement we need to invoke a little // Voodoo to keep the DTD happy: the first structure node is always // called by the root node name instead of the usual nodeNameString // We can tell this by checking if this object is derived from class // Structure and if XMLDeclAttrib defined/populated with information // NOTE: This isnt really the way to do this. We need to check if 'this' is // is or has as a superclass xdf.Structure instead of the 'string check' below. // check is class Strucuture & XMLDeclAttribs populated? if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) nodeNameString = sXDFRootNodeName; writeOut(outputstream,"<" + nodeNameString); // print opening statement } // gather info about XMLAttributes in this object/node Hashtable xmlInfo = getXMLInfo(); // 2. Print out string object XML attributes EXCEPT for the one that // matches PCDATAAttribute. ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); // is synchronized here correct? synchronized(attribs) { int size = attribs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } // 3. Print out Node PCData or Child Nodes as specified by object ref // XML attributes. The way this stuff occurs will also affect how we // close the node. ArrayList childObjs = (ArrayList) xmlInfo.get("childObjList"); String pcdata = (String) xmlInfo.get("PCDATA"); if ( childObjs.size() > 0 || pcdata != null || noChildObjectNodeName != null) { // close the opening tag if (nodeNameString != null) { writeOut(outputstream, ">"); if ((sPrettyXDFOutput) && (pcdata == null)) writeOut(outputstream, Constants.NEW_LINE); } // deal with object/list XML attributes, if any in our list int size = childObjs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) childObjs.get(i); if (item.get("type") == Constants.LIST_TYPE) { List objectList = (List) item.get("value"); // Im not sure this synchronized wrapper is needed, we are // only accessing stuff here.. Also, should synchronzied wrapper // occur back in the getXMLInfo method instead where the orig // access occured?!? synchronized(objectList) { Iterator iter = objectList.iterator(); // Must be in synchronized block while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } } else if (item.get("type") == Constants.OBJECT_TYPE) { BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) // shouldnt this be synchronized too?? synchronized(containedObj) { indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } else { // error: weird type, actually shouldnt occur. Is this needed?? Log.errorln("Weird error: unknown XML attribute type for item:"+item); } } // print out PCDATA, if any if(pcdata != null) { writeOut(outputstream, pcdata); }; // if there are no PCDATA or child objects/nodes then // we print out noChildObjectNodeName and close the node if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent + sPrettyXDFOutputIndentation); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } // ok, now deal with closing the node if (nodeNameString != null) { indent = dealWithClosingGroupNodes((BaseObject) this, outputstream, indent); if (sPrettyXDFOutput && pcdata == null) writeOut(outputstream, indent); if (!dontCloseNode) writeOut(outputstream, "</"+nodeNameString+">"); } } else { if (dontCloseNode) { // it may not have sub-objects, but we dont want to close it // (happens for group objects) writeOut(outputstream, ">"); } else { // no sub-objects, just close this node writeOut(outputstream, "/>"); } } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); }
|
public void toXMLOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ) { String nodeNameString = this.classXDFNodeName; // Setup. Sometimes the name of the node we are opening is different from // that specified in the classXDFNodeName (*sigh*) if (newNodeNameString != null) nodeNameString = newNodeNameString; // 0. To be valid XML, we always start an XML block with an // XML declaration (e.g. somehting like "<?xml standalone="no"?>"). // Here we deal with printing out XML Declaration && its attributes if ((XMLDeclAttribs !=null) &&(!XMLDeclAttribs.isEmpty())) { indent = ""; writeXMLDeclToOutputStream(outputstream, XMLDeclAttribs); } // 1. open this node, print its simple XML attributes if (nodeNameString != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent); // indent node if desired // For printing the opening statement we need to invoke a little // Voodoo to keep the DTD happy: the first structure node is always // called by the root node name instead of the usual nodeNameString // We can tell this by checking if this object is derived from class // Structure and if XMLDeclAttrib defined/populated with information // NOTE: This isnt really the way to do this. We need to check if 'this' is // is or has as a superclass xdf.Structure instead of the 'string check' below. // check is class Strucuture & XMLDeclAttribs populated? if ( nodeNameString.equals(sXDFStructureNodeName) && !XMLDeclAttribs.isEmpty() ) nodeNameString = sXDFRootNodeName; writeOut(outputstream,"<" + nodeNameString); // print opening statement } // gather info about XMLAttributes in this object/node Hashtable xmlInfo = getXMLInfo(); // 2. Print out string object XML attributes EXCEPT for the one that // matches PCDATAAttribute. ArrayList attribs = (ArrayList) xmlInfo.get("attribList"); // is synchronized here correct? synchronized(attribs) { int size = attribs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) attribs.get(i); writeOut(outputstream, " "+ item.get("name") + "=\"" + item.get("value") + "\""); } } // 3. Print out Node PCData or Child Nodes as specified by object ref // XML attributes. The way this stuff occurs will also affect how we // close the node. ArrayList childObjs = (ArrayList) xmlInfo.get("childObjList"); String pcdata = (String) xmlInfo.get("PCDATA"); if ( childObjs.size() > 0 || pcdata != null || noChildObjectNodeName != null) { // close the opening tag if (nodeNameString != null) { writeOut(outputstream, ">"); if ((sPrettyXDFOutput) && (pcdata == null)) writeOut(outputstream, Constants.NEW_LINE); } // deal with object/list XML attributes, if any in our list int size = childObjs.size(); for (int i = 0; i < size; i++) { Hashtable item = (Hashtable) childObjs.get(i); if (item.get("type") == Constants.LIST_TYPE) { List objectList = (List) item.get("value"); // Im not sure this synchronized wrapper is needed, we are // only accessing stuff here.. Also, should synchronzied wrapper // occur back in the getXMLInfo method instead where the orig // access occured?!? synchronized(objectList) { Iterator iter = objectList.iterator(); // Must be in synchronized block while (iter.hasNext()) { BaseObject containedObj = (BaseObject) iter.next(); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } } else if (item.get("type") == Constants.OBJECT_TYPE) { BaseObject containedObj = (BaseObject) item.get("value"); if (containedObj != null) { // can happen from pre-allocation of axis values, etc (?) // shouldnt this be synchronized too?? synchronized(containedObj) { indent = dealWithOpeningGroupNodes(containedObj, outputstream, indent); indent = dealWithClosingGroupNodes(containedObj, outputstream, indent); String newindent = indent + sPrettyXDFOutputIndentation; containedObj.toXMLOutputStream(outputstream, new Hashtable(), newindent); } } } else { // error: weird type, actually shouldnt occur. Is this needed?? Log.errorln("Weird error: unknown XML attribute type for item:"+item); } } // print out PCDATA, if any if(pcdata != null) { writeOut(outputstream, pcdata); }; // if there are no PCDATA or child objects/nodes then // we print out noChildObjectNodeName and close the node if ( childObjs.size() == 0 && pcdata == null && noChildObjectNodeName != null) { if (sPrettyXDFOutput) writeOut(outputstream, indent + sPrettyXDFOutputIndentation); writeOut(outputstream, "<" + noChildObjectNodeName + "/>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } // ok, now deal with closing the node if (nodeNameString != null) { indent = dealWithClosingGroupNodes((BaseObject) this, outputstream, indent); if (sPrettyXDFOutput && pcdata == null) writeOut(outputstream, indent); if (!dontCloseNode) writeOut(outputstream, "</"+nodeNameString+">"); } } else { if (dontCloseNode) { // it may not have sub-objects, but we dont want to close it // (happens for group objects) writeOut(outputstream, ">"); } else { // no sub-objects, just close this node writeOut(outputstream, "/>"); } } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); }
| 7,191
|
private void writeXMLDeclToOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs ) { // initial statement writeOut(outputstream, "<?xml"); writeOut(outputstream, " version=\"" + sXMLSpecVersion + "\""); // print attributes Enumeration keys = XMLDeclAttribs.keys(); while ( keys.hasMoreElements() ) { String attribName = (String) keys.nextElement(); if (attribName.equals("version") ) { Log.errorln("XMLDeclAttrib hash has version attribute, not allowed and ignoring."); } else if ( attribName.equals("dtdName") || attribName.equals("rootName") ) { // skip over it } else writeOut(outputstream, " " + attribName + "=\"" + XMLDeclAttribs.get(attribName) + "\""); } writeOut(outputstream, " ?>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); // Print the DOCTYPE DECL only if right info exists if (XMLDeclAttribs.containsKey("rootName") && XMLDeclAttribs.containsKey("dtdName")) { // print the DOCTYPE DECL IF its a structure node if(classXDFNodeName != null && classXDFNodeName.equals(sXDFStructureNodeName) ) { writeOut(outputstream, "<!DOCTYPE " + XMLDeclAttribs.get("rootName") + " SYSTEM \"" + XMLDeclAttribs.get("dtdName") + "\">"); } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } else Log.errorln("Passed XMLDeclAttributes table lacks either dtdName, rootName entries, ignoring DOCTYPE line printout"); }
|
private void writeXMLDeclToOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs ) { // initial statement writeOut(outputstream, "<?xml"); writeOut(outputstream, " version=\"" + Specification.getInstance().getXMLSpecVersion() + "\""); // print attributes Enumeration keys = XMLDeclAttribs.keys(); while ( keys.hasMoreElements() ) { String attribName = (String) keys.nextElement(); if (attribName.equals("version") ) { Log.errorln("XMLDeclAttrib hash has version attribute, not allowed and ignoring."); } else if ( attribName.equals("dtdName") || attribName.equals("rootName") ) { // skip over it } else writeOut(outputstream, " " + attribName + "=\"" + XMLDeclAttribs.get(attribName) + "\""); } writeOut(outputstream, " ?>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); // Print the DOCTYPE DECL only if right info exists if (XMLDeclAttribs.containsKey("rootName") && XMLDeclAttribs.containsKey("dtdName")) { // print the DOCTYPE DECL IF its a structure node if(classXDFNodeName != null && classXDFNodeName.equals(sXDFStructureNodeName) ) { writeOut(outputstream, "<!DOCTYPE " + XMLDeclAttribs.get("rootName") + " SYSTEM \"" + XMLDeclAttribs.get("dtdName") + "\">"); } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } else Log.errorln("Passed XMLDeclAttributes table lacks either dtdName, rootName entries, ignoring DOCTYPE line printout"); }
| 7,192
|
private void writeXMLDeclToOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs ) { // initial statement writeOut(outputstream, "<?xml"); writeOut(outputstream, " version=\"" + sXMLSpecVersion + "\""); // print attributes Enumeration keys = XMLDeclAttribs.keys(); while ( keys.hasMoreElements() ) { String attribName = (String) keys.nextElement(); if (attribName.equals("version") ) { Log.errorln("XMLDeclAttrib hash has version attribute, not allowed and ignoring."); } else if ( attribName.equals("dtdName") || attribName.equals("rootName") ) { // skip over it } else writeOut(outputstream, " " + attribName + "=\"" + XMLDeclAttribs.get(attribName) + "\""); } writeOut(outputstream, " ?>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); // Print the DOCTYPE DECL only if right info exists if (XMLDeclAttribs.containsKey("rootName") && XMLDeclAttribs.containsKey("dtdName")) { // print the DOCTYPE DECL IF its a structure node if(classXDFNodeName != null && classXDFNodeName.equals(sXDFStructureNodeName) ) { writeOut(outputstream, "<!DOCTYPE " + XMLDeclAttribs.get("rootName") + " SYSTEM \"" + XMLDeclAttribs.get("dtdName") + "\">"); } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } else Log.errorln("Passed XMLDeclAttributes table lacks either dtdName, rootName entries, ignoring DOCTYPE line printout"); }
|
private void writeXMLDeclToOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs ) { // initial statement writeOut(outputstream, "<?xml"); writeOut(outputstream, " version=\"" + sXMLSpecVersion + "\""); // print attributes Enumeration keys = XMLDeclAttribs.keys(); while ( keys.hasMoreElements() ) { String attribName = (String) keys.nextElement(); if (attribName.equals("version") ) { Log.errorln("XMLDeclAttrib hash has version attribute, not allowed and ignoring."); } else if ( attribName.equals("dtdName") || attribName.equals("rootName") ) { // skip over it } else writeOut(outputstream, " " + attribName + "=\"" + XMLDeclAttribs.get(attribName) + "\""); } writeOut(outputstream, " ?>"); if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, Constants.NEW_LINE); // Print the DOCTYPE DECL only if right info exists if (XMLDeclAttribs.containsKey("rootName") && XMLDeclAttribs.containsKey("dtdName")) { // print the DOCTYPE DECL IF its a structure node if(classXDFNodeName != null && classXDFNodeName.equals(sXDFStructureNodeName) ) { writeOut(outputstream, "<!DOCTYPE " + XMLDeclAttribs.get("rootName") + " SYSTEM \"" + XMLDeclAttribs.get("dtdName") + "\">"); } if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, Constants.NEW_LINE); } else Log.errorln("Passed XMLDeclAttributes table lacks either dtdName, rootName entries, ignoring DOCTYPE line printout"); }
| 7,193
|
private void writeXMLDeclToOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs ) { // initial statement writeOut(outputstream, "<?xml"); writeOut(outputstream, " version=\"" + sXMLSpecVersion + "\""); // print attributes Enumeration keys = XMLDeclAttribs.keys(); while ( keys.hasMoreElements() ) { String attribName = (String) keys.nextElement(); if (attribName.equals("version") ) { Log.errorln("XMLDeclAttrib hash has version attribute, not allowed and ignoring."); } else if ( attribName.equals("dtdName") || attribName.equals("rootName") ) { // skip over it } else writeOut(outputstream, " " + attribName + "=\"" + XMLDeclAttribs.get(attribName) + "\""); } writeOut(outputstream, " ?>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); // Print the DOCTYPE DECL only if right info exists if (XMLDeclAttribs.containsKey("rootName") && XMLDeclAttribs.containsKey("dtdName")) { // print the DOCTYPE DECL IF its a structure node if(classXDFNodeName != null && classXDFNodeName.equals(sXDFStructureNodeName) ) { writeOut(outputstream, "<!DOCTYPE " + XMLDeclAttribs.get("rootName") + " SYSTEM \"" + XMLDeclAttribs.get("dtdName") + "\">"); } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } else Log.errorln("Passed XMLDeclAttributes table lacks either dtdName, rootName entries, ignoring DOCTYPE line printout"); }
|
private void writeXMLDeclToOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs ) { // initial statement writeOut(outputstream, "<?xml"); writeOut(outputstream, " version=\"" + sXMLSpecVersion + "\""); // print attributes Enumeration keys = XMLDeclAttribs.keys(); while ( keys.hasMoreElements() ) { String attribName = (String) keys.nextElement(); if (attribName.equals("version") ) { Log.errorln("XMLDeclAttrib hash has version attribute, not allowed and ignoring."); } else if ( attribName.equals("dtdName") || attribName.equals("rootName") ) { // skip over it } else writeOut(outputstream, " " + attribName + "=\"" + XMLDeclAttribs.get(attribName) + "\""); } writeOut(outputstream, " ?>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); // Print the DOCTYPE DECL only if right info exists if (XMLDeclAttribs.containsKey("rootName") && XMLDeclAttribs.containsKey("dtdName")) { // print the DOCTYPE DECL IF its a structure node if(classXDFNodeName != null && classXDFNodeName.equals(sXDFStructureNodeName) ) { writeOut(outputstream, "<!DOCTYPE " + XMLDeclAttribs.get("rootName") + " SYSTEM \"" + XMLDeclAttribs.get("dtdName") + "\">"); } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } else Log.errorln("Passed XMLDeclAttributes table lacks either dtdName, rootName entries, ignoring DOCTYPE line printout"); }
| 7,194
|
private void writeXMLDeclToOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs ) { // initial statement writeOut(outputstream, "<?xml"); writeOut(outputstream, " version=\"" + sXMLSpecVersion + "\""); // print attributes Enumeration keys = XMLDeclAttribs.keys(); while ( keys.hasMoreElements() ) { String attribName = (String) keys.nextElement(); if (attribName.equals("version") ) { Log.errorln("XMLDeclAttrib hash has version attribute, not allowed and ignoring."); } else if ( attribName.equals("dtdName") || attribName.equals("rootName") ) { // skip over it } else writeOut(outputstream, " " + attribName + "=\"" + XMLDeclAttribs.get(attribName) + "\""); } writeOut(outputstream, " ?>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); // Print the DOCTYPE DECL only if right info exists if (XMLDeclAttribs.containsKey("rootName") && XMLDeclAttribs.containsKey("dtdName")) { // print the DOCTYPE DECL IF its a structure node if(classXDFNodeName != null && classXDFNodeName.equals(sXDFStructureNodeName) ) { writeOut(outputstream, "<!DOCTYPE " + XMLDeclAttribs.get("rootName") + " SYSTEM \"" + XMLDeclAttribs.get("dtdName") + "\">"); } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } else Log.errorln("Passed XMLDeclAttributes table lacks either dtdName, rootName entries, ignoring DOCTYPE line printout"); }
|
private void writeXMLDeclToOutputStream ( OutputStream outputstream, Hashtable XMLDeclAttribs ) { // initial statement writeOut(outputstream, "<?xml"); writeOut(outputstream, " version=\"" + sXMLSpecVersion + "\""); // print attributes Enumeration keys = XMLDeclAttribs.keys(); while ( keys.hasMoreElements() ) { String attribName = (String) keys.nextElement(); if (attribName.equals("version") ) { Log.errorln("XMLDeclAttrib hash has version attribute, not allowed and ignoring."); } else if ( attribName.equals("dtdName") || attribName.equals("rootName") ) { // skip over it } else writeOut(outputstream, " " + attribName + "=\"" + XMLDeclAttribs.get(attribName) + "\""); } writeOut(outputstream, " ?>"); if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); // Print the DOCTYPE DECL only if right info exists if (XMLDeclAttribs.containsKey("rootName") && XMLDeclAttribs.containsKey("dtdName")) { // print the DOCTYPE DECL IF its a structure node if(classXDFNodeName != null && classXDFNodeName.equals(sXDFStructureNodeName) ) { writeOut(outputstream, "<!DOCTYPE " + XMLDeclAttribs.get("rootName") + " SYSTEM \"" + XMLDeclAttribs.get("dtdName") + "\">"); } if (sPrettyXDFOutput) writeOut(outputstream, Constants.NEW_LINE); } else Log.errorln("Passed XMLDeclAttributes table lacks either dtdName, rootName entries, ignoring DOCTYPE line printout"); }
| 7,195
|
My5250 () { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) { } frame = new Gui5250Frame(this); loadSessions(); int width = 600; int height = 500; if (sessions.containsKey("emul.width")) width = Integer.parseInt(sessions.getProperty("emul.width")); if (sessions.containsKey("emul.height")) height = Integer.parseInt(sessions.getProperty("emul.height")); frame.setSize(width,height); centerFrame(); frame.sessionPane.addChangeListener(this); focused = createImageIcon("focused.gif"); unfocused = createImageIcon("unfocused.gif"); ImageIcon tnicon = createImageIcon("tnicon.jpg"); frame.setIconImage(tnicon.getImage()); sessionsV = new Vector(); setDefaultLocale(); manager = new SessionManager(); manager.setController(this); }
|
My5250 () { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) { } loadSessions(); int width = 600; int height = 500; if (sessions.containsKey("emul.width")) width = Integer.parseInt(sessions.getProperty("emul.width")); if (sessions.containsKey("emul.height")) height = Integer.parseInt(sessions.getProperty("emul.height")); frame.setSize(width,height); centerFrame(); frame.sessionPane.addChangeListener(this); focused = createImageIcon("focused.gif"); unfocused = createImageIcon("unfocused.gif"); ImageIcon tnicon = createImageIcon("tnicon.jpg"); frame.setIconImage(tnicon.getImage()); sessionsV = new Vector(); setDefaultLocale(); manager = new SessionManager(); manager.setController(this); }
| 7,196
|
My5250 () { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) { } frame = new Gui5250Frame(this); loadSessions(); int width = 600; int height = 500; if (sessions.containsKey("emul.width")) width = Integer.parseInt(sessions.getProperty("emul.width")); if (sessions.containsKey("emul.height")) height = Integer.parseInt(sessions.getProperty("emul.height")); frame.setSize(width,height); centerFrame(); frame.sessionPane.addChangeListener(this); focused = createImageIcon("focused.gif"); unfocused = createImageIcon("unfocused.gif"); ImageIcon tnicon = createImageIcon("tnicon.jpg"); frame.setIconImage(tnicon.getImage()); sessionsV = new Vector(); setDefaultLocale(); manager = new SessionManager(); manager.setController(this); }
|
My5250 () { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) { } frame = new Gui5250Frame(this); loadSessions(); int width = 600; int height = 500; if (sessions.containsKey("emul.width")) width = Integer.parseInt(sessions.getProperty("emul.width")); if (sessions.containsKey("emul.height")) height = Integer.parseInt(sessions.getProperty("emul.height")); frame.setSize(width,height); centerFrame(); frame.sessionPane.addChangeListener(this); focused = createImageIcon("focused.gif"); unfocused = createImageIcon("unfocused.gif"); ImageIcon tnicon = createImageIcon("tnicon.jpg"); frame.setIconImage(tnicon.getImage()); sessionsV = new Vector(); setDefaultLocale(); manager = new SessionManager(); manager.setController(this); }
| 7,197
|
My5250 () { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) { } frame = new Gui5250Frame(this); loadSessions(); int width = 600; int height = 500; if (sessions.containsKey("emul.width")) width = Integer.parseInt(sessions.getProperty("emul.width")); if (sessions.containsKey("emul.height")) height = Integer.parseInt(sessions.getProperty("emul.height")); frame.setSize(width,height); centerFrame(); frame.sessionPane.addChangeListener(this); focused = createImageIcon("focused.gif"); unfocused = createImageIcon("unfocused.gif"); ImageIcon tnicon = createImageIcon("tnicon.jpg"); frame.setIconImage(tnicon.getImage()); sessionsV = new Vector(); setDefaultLocale(); manager = new SessionManager(); manager.setController(this); }
|
My5250 () { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch(Exception e) { } frame = new Gui5250Frame(this); loadSessions(); int width = 600; int height = 500; if (sessions.containsKey("emul.width")) width = Integer.parseInt(sessions.getProperty("emul.width")); if (sessions.containsKey("emul.height")) height = Integer.parseInt(sessions.getProperty("emul.height")); frame.setSize(width,height); centerFrame(); frame.sessionPane.addChangeListener(this); focused = createImageIcon("focused.gif"); unfocused = createImageIcon("unfocused.gif"); ImageIcon tnicon = createImageIcon("tnicon.jpg"); frame.setIconImage(tnicon.getImage()); sessionsV = new Vector(); setDefaultLocale(); manager = new SessionManager(); manager.setController(this); }
| 7,198
|
protected void closeSession(Session targetSession) { int tabs = frame.sessionPane.getTabCount(); Sessions sessions = manager.getSessions(); Session session = null; if (tabs > 1) { if ((sessions.item(targetSession)) != null) { int index = frame.sessionPane.indexOfComponent(targetSession); System.out.println("session found and closing down " + index); frame.sessionPane.remove(index); manager.closeSession(targetSession); targetSession = null; if (index < (tabs - 2)) { frame.sessionPane.setSelectedIndex(index); frame.sessionPane.setForegroundAt(index,Color.blue); frame.sessionPane.setIconAt(index,focused); } else { frame.sessionPane.setSelectedIndex(0); frame.sessionPane.setForegroundAt(0,Color.blue); frame.sessionPane.setIconAt(0,focused); } } } else { closingDown(frame); } }
|
protected void closeSession(Session targetSession) { Gui5250Frame f = getParentView(targetSession); int tabs = f.getSessionViewCount(); Sessions sessions = manager.getSessions(); Session session = null; if (tabs > 1) { if ((sessions.item(targetSession)) != null) { int index = frame.sessionPane.indexOfComponent(targetSession); System.out.println("session found and closing down " + index); frame.sessionPane.remove(index); manager.closeSession(targetSession); targetSession = null; if (index < (tabs - 2)) { frame.sessionPane.setSelectedIndex(index); frame.sessionPane.setForegroundAt(index,Color.blue); frame.sessionPane.setIconAt(index,focused); } else { frame.sessionPane.setSelectedIndex(0); frame.sessionPane.setForegroundAt(0,Color.blue); frame.sessionPane.setIconAt(0,focused); } } } else { closingDown(frame); } }
| 7,200
|
protected void closeSession(Session targetSession) { int tabs = frame.sessionPane.getTabCount(); Sessions sessions = manager.getSessions(); Session session = null; if (tabs > 1) { if ((sessions.item(targetSession)) != null) { int index = frame.sessionPane.indexOfComponent(targetSession); System.out.println("session found and closing down " + index); frame.sessionPane.remove(index); manager.closeSession(targetSession); targetSession = null; if (index < (tabs - 2)) { frame.sessionPane.setSelectedIndex(index); frame.sessionPane.setForegroundAt(index,Color.blue); frame.sessionPane.setIconAt(index,focused); } else { frame.sessionPane.setSelectedIndex(0); frame.sessionPane.setForegroundAt(0,Color.blue); frame.sessionPane.setIconAt(0,focused); } } } else { closingDown(frame); } }
|
protected void closeSession(Session targetSession) { int tabs = frame.sessionPane.getTabCount(); Sessions sessions = manager.getSessions(); Session session = null; if (tabs > 1) { if ((sessions.item(targetSession)) != null) { int index = frame.sessionPane.indexOfComponent(targetSession); System.out.println("session found and closing down " + index); frame.sessionPane.remove(index); manager.closeSession(targetSession); targetSession = null; if (index < (tabs - 2)) { frame.sessionPane.setSelectedIndex(index); frame.sessionPane.setForegroundAt(index,Color.blue); frame.sessionPane.setIconAt(index,focused); } else { frame.sessionPane.setSelectedIndex(0); frame.sessionPane.setForegroundAt(0,Color.blue); frame.sessionPane.setIconAt(0,focused); } } } else { closingDown(frame); } }
| 7,201
|
protected void closeSession(Session targetSession) { int tabs = frame.sessionPane.getTabCount(); Sessions sessions = manager.getSessions(); Session session = null; if (tabs > 1) { if ((sessions.item(targetSession)) != null) { int index = frame.sessionPane.indexOfComponent(targetSession); System.out.println("session found and closing down " + index); frame.sessionPane.remove(index); manager.closeSession(targetSession); targetSession = null; if (index < (tabs - 2)) { frame.sessionPane.setSelectedIndex(index); frame.sessionPane.setForegroundAt(index,Color.blue); frame.sessionPane.setIconAt(index,focused); } else { frame.sessionPane.setSelectedIndex(0); frame.sessionPane.setForegroundAt(0,Color.blue); frame.sessionPane.setIconAt(0,focused); } } } else { closingDown(frame); } }
|
protected void closeSession(Session targetSession) { int tabs = frame.sessionPane.getTabCount(); Sessions sessions = manager.getSessions(); Session session = null; if (tabs > 1) { if ((sessions.item(targetSession)) != null) { int index = frame.sessionPane.indexOfComponent(targetSession); System.out.println("session found and closing down " + index); frame.sessionPane.remove(index); manager.closeSession(targetSession); targetSession = null; if (index < (tabs - 2)) { frame.sessionPane.setSelectedIndex(index); frame.sessionPane.setForegroundAt(index,Color.blue); frame.sessionPane.setIconAt(index,focused); } else { frame.sessionPane.setSelectedIndex(0); frame.sessionPane.setForegroundAt(0,Color.blue); frame.sessionPane.setIconAt(0,focused); } } } else { closingDown(frame); } }
| 7,202
|
protected void closeSession(Session targetSession) { int tabs = frame.sessionPane.getTabCount(); Sessions sessions = manager.getSessions(); Session session = null; if (tabs > 1) { if ((sessions.item(targetSession)) != null) { int index = frame.sessionPane.indexOfComponent(targetSession); System.out.println("session found and closing down " + index); frame.sessionPane.remove(index); manager.closeSession(targetSession); targetSession = null; if (index < (tabs - 2)) { frame.sessionPane.setSelectedIndex(index); frame.sessionPane.setForegroundAt(index,Color.blue); frame.sessionPane.setIconAt(index,focused); } else { frame.sessionPane.setSelectedIndex(0); frame.sessionPane.setForegroundAt(0,Color.blue); frame.sessionPane.setIconAt(0,focused); } } } else { closingDown(frame); } }
|
protected void closeSession(Session targetSession) { int tabs = frame.sessionPane.getTabCount(); Sessions sessions = manager.getSessions(); Session session = null; if (tabs > 1) { if ((sessions.item(targetSession)) != null) { int index = frame.sessionPane.indexOfComponent(targetSession); System.out.println("session found and closing down " + index); frame.sessionPane.remove(index); manager.closeSession(targetSession); targetSession = null; if (index < (tabs - 2)) { frame.sessionPane.setSelectedIndex(index); frame.sessionPane.setForegroundAt(index,Color.blue); frame.sessionPane.setIconAt(index,focused); } else { frame.sessionPane.setSelectedIndex(0); frame.sessionPane.setForegroundAt(0,Color.blue); frame.sessionPane.setIconAt(0,focused); } } } else { closingDown(f); } }
| 7,203
|
void closingDown() { closingDown(frame); }
|
void closingDown(Session targetSession) { closingDown(frame); }
| 7,204
|
void closingDown() { closingDown(frame); }
|
void closingDown() { closingDown(getParentView(targetSession)); }
| 7,205
|
static public void main(String[] args) { if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap deamon to allow checking // for running instances if (isSpecified("-d",args)) { strapper = new BootStrapper(); strapper.start(); } } else { System.exit(0); } } My5250 m = new My5250(); if (strapper != null) strapper.addBootListener(m); if (args.length > 0) { if (isSpecified("-width",args) || isSpecified("-height",args)) { int width = m.frame.getWidth(); int height = m.frame.getHeight(); if (isSpecified("-width",args)) { width = Integer.parseInt(m.getParm("-width",args)); } if (isSpecified("-height",args)) { height = Integer.parseInt(m.getParm("-height",args)); } m.frame.setSize(width,height); m.centerFrame(); } /** * @todo this crap needs to be rewritten it is a mess */ if (args[0].startsWith("-")) { // check if a session parameter is specified on the command line if (isSpecified("-s",args)) { String sd = getParm("-s",args); if (sessions.containsKey(sd)) { sessions.setProperty("emul.default",sd); } else { args = null; } } // check if a locale parameter is specified on the command line if (isSpecified("-L",args)) { Locale.setDefault(parseLocal(getParm("-L",args))); LangTool.init(); if (args[0].startsWith("-")) { m.sessionArgs = null; } else { m.frame.setVisible(true); LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); if (isSpecified("-s",args)) m.sessionArgs = args; else m.sessionArgs = null; } } else { LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); m.sessionArgs = null; } if (m.sessionArgs != null) { // BEGIN // 2001/09/19 natural computing MR Vector os400_sessions = new Vector(); Vector session_params = new Vector(); for (int x = 0; x < args.length; x++) { if (args[x].equals("-s")) { x++; if (args[x] != null && sessions.containsKey(args[x])) { os400_sessions.addElement(args[x]); }else{ x--; session_params.addElement(args[x]); } }else{ session_params.addElement(args[x]); } } for (int x = 0; x < session_params.size(); x++) m.sessionArgs[x] = session_params.elementAt(x).toString(); m.startNewSession(); for (int x = 1; x < os400_sessions.size(); x++ ) { String sel = os400_sessions.elementAt(x).toString(); if (!m.frame.isVisible()) m.frame.setVisible(true); m.sessionArgs = new String[NUM_PARMS]; m.parseArgs(sessions.getProperty(sel),m.sessionArgs); m.newSession(sel,m.sessionArgs); } // 2001/09/19 natural computing MR // END } else { m.startNewSession(); } }
|
static public void main(String[] args) { if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap deamon to allow checking // for running instances if (isSpecified("-d",args)) { strapper = new BootStrapper(); strapper.start(); } } else { System.exit(0); } } My5250 m = new My5250(); if (strapper != null) strapper.addBootListener(m); if (args.length > 0) { if (isSpecified("-width",args) || isSpecified("-height",args)) { int width = m.frame.getWidth(); int height = m.frame.getHeight(); if (isSpecified("-width",args)) { width = Integer.parseInt(m.getParm("-width",args)); } if (isSpecified("-height",args)) { height = Integer.parseInt(m.getParm("-height",args)); } m.frame.setSize(width,height); m.frame.centerFrame(); } /** * @todo this crap needs to be rewritten it is a mess */ if (args[0].startsWith("-")) { // check if a session parameter is specified on the command line if (isSpecified("-s",args)) { String sd = getParm("-s",args); if (sessions.containsKey(sd)) { sessions.setProperty("emul.default",sd); } else { args = null; } } // check if a locale parameter is specified on the command line if (isSpecified("-L",args)) { Locale.setDefault(parseLocal(getParm("-L",args))); LangTool.init(); if (args[0].startsWith("-")) { m.sessionArgs = null; } else { m.frame.setVisible(true); LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); if (isSpecified("-s",args)) m.sessionArgs = args; else m.sessionArgs = null; } } else { LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); m.sessionArgs = null; } if (m.sessionArgs != null) { // BEGIN // 2001/09/19 natural computing MR Vector os400_sessions = new Vector(); Vector session_params = new Vector(); for (int x = 0; x < args.length; x++) { if (args[x].equals("-s")) { x++; if (args[x] != null && sessions.containsKey(args[x])) { os400_sessions.addElement(args[x]); }else{ x--; session_params.addElement(args[x]); } }else{ session_params.addElement(args[x]); } } for (int x = 0; x < session_params.size(); x++) m.sessionArgs[x] = session_params.elementAt(x).toString(); m.startNewSession(); for (int x = 1; x < os400_sessions.size(); x++ ) { String sel = os400_sessions.elementAt(x).toString(); if (!m.frame.isVisible()) m.frame.setVisible(true); m.sessionArgs = new String[NUM_PARMS]; m.parseArgs(sessions.getProperty(sel),m.sessionArgs); m.newSession(sel,m.sessionArgs); } // 2001/09/19 natural computing MR // END } else { m.startNewSession(); } }
| 7,206
|
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpecified("-cp",args)) sesProps.put(SESSION_CODE_PAGE ,getParm("-cp",args)); if (isSpecified("-gui",args)) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132",args)) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // are we to use a socks proxy if (isSpecified("-usp",args)) { // socks proxy host argument if (isSpecified("-sph",args)) { sesProps.put(SESSION_PROXY_HOST ,getParm("-sph",args)); } // socks proxy port argument if (isSpecified("-spp",args)) sesProps.put(SESSION_PROXY_PORT ,getParm("-spp",args)); } // check if device name is specified if (isSpecified("-dn",args)) sesProps.put(SESSION_DEVICE_NAME ,getParm("-dn",args)); Session s = manager.openSession(sesProps,propFileName,sel); if (isSpecified("-t",args)) frame.sessionPane.addTab(sel,focused,s); else frame.sessionPane.addTab(session,focused,s); frame.sessionPane.setForegroundAt(frame.sessionPane.getSelectedIndex(),Color.black); frame.sessionPane.setIconAt(frame.sessionPane.getSelectedIndex(),unfocused); frame.sessionPane.setSelectedIndex(frame.sessionPane.getTabCount()-1); frame.sessionPane.setForegroundAt(frame.sessionPane.getSelectedIndex(),Color.blue); frame.sessionPane.setIconAt(frame.sessionPane.getSelectedIndex(),focused); s.addSessionListener(this); s.connect(); }
|
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpecified("-cp",args)) sesProps.put(SESSION_CODE_PAGE ,getParm("-cp",args)); if (isSpecified("-gui",args)) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132",args)) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // are we to use a socks proxy if (isSpecified("-usp",args)) { // socks proxy host argument if (isSpecified("-sph",args)) { sesProps.put(SESSION_PROXY_HOST ,getParm("-sph",args)); } // socks proxy port argument if (isSpecified("-spp",args)) sesProps.put(SESSION_PROXY_PORT ,getParm("-spp",args)); } // check if device name is specified if (isSpecified("-dn",args)) sesProps.put(SESSION_DEVICE_NAME ,getParm("-dn",args)); Session s = manager.openSession(sesProps,propFileName,sel); if (isSpecified("-t",args)) frame.addSessionView(sel,s); else frame.sessionPane.addTab(session,focused,s); frame.sessionPane.setForegroundAt(frame.sessionPane.getSelectedIndex(),Color.black); frame.sessionPane.setIconAt(frame.sessionPane.getSelectedIndex(),unfocused); frame.sessionPane.setSelectedIndex(frame.sessionPane.getTabCount()-1); frame.sessionPane.setForegroundAt(frame.sessionPane.getSelectedIndex(),Color.blue); frame.sessionPane.setIconAt(frame.sessionPane.getSelectedIndex(),focused); s.addSessionListener(this); s.connect(); }
| 7,207
|
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpecified("-cp",args)) sesProps.put(SESSION_CODE_PAGE ,getParm("-cp",args)); if (isSpecified("-gui",args)) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132",args)) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // are we to use a socks proxy if (isSpecified("-usp",args)) { // socks proxy host argument if (isSpecified("-sph",args)) { sesProps.put(SESSION_PROXY_HOST ,getParm("-sph",args)); } // socks proxy port argument if (isSpecified("-spp",args)) sesProps.put(SESSION_PROXY_PORT ,getParm("-spp",args)); } // check if device name is specified if (isSpecified("-dn",args)) sesProps.put(SESSION_DEVICE_NAME ,getParm("-dn",args)); Session s = manager.openSession(sesProps,propFileName,sel); if (isSpecified("-t",args)) frame.sessionPane.addTab(sel,focused,s); else frame.sessionPane.addTab(session,focused,s); frame.sessionPane.setForegroundAt(frame.sessionPane.getSelectedIndex(),Color.black); frame.sessionPane.setIconAt(frame.sessionPane.getSelectedIndex(),unfocused); frame.sessionPane.setSelectedIndex(frame.sessionPane.getTabCount()-1); frame.sessionPane.setForegroundAt(frame.sessionPane.getSelectedIndex(),Color.blue); frame.sessionPane.setIconAt(frame.sessionPane.getSelectedIndex(),focused); s.addSessionListener(this); s.connect(); }
|
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpecified("-cp",args)) sesProps.put(SESSION_CODE_PAGE ,getParm("-cp",args)); if (isSpecified("-gui",args)) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132",args)) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // are we to use a socks proxy if (isSpecified("-usp",args)) { // socks proxy host argument if (isSpecified("-sph",args)) { sesProps.put(SESSION_PROXY_HOST ,getParm("-sph",args)); } // socks proxy port argument if (isSpecified("-spp",args)) sesProps.put(SESSION_PROXY_PORT ,getParm("-spp",args)); } // check if device name is specified if (isSpecified("-dn",args)) sesProps.put(SESSION_DEVICE_NAME ,getParm("-dn",args)); Session s = manager.openSession(sesProps,propFileName,sel); if (isSpecified("-t",args)) frame.sessionPane.addTab(sel,focused,s); else frame.addSessionView(session,s); frame.sessionPane.setForegroundAt(frame.sessionPane.getSelectedIndex(),Color.black); frame.sessionPane.setIconAt(frame.sessionPane.getSelectedIndex(),unfocused); frame.sessionPane.setSelectedIndex(frame.sessionPane.getTabCount()-1); frame.sessionPane.setForegroundAt(frame.sessionPane.getSelectedIndex(),Color.blue); frame.sessionPane.setIconAt(frame.sessionPane.getSelectedIndex(),focused); s.addSessionListener(this); s.connect(); }
| 7,208
|
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpecified("-cp",args)) sesProps.put(SESSION_CODE_PAGE ,getParm("-cp",args)); if (isSpecified("-gui",args)) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132",args)) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // are we to use a socks proxy if (isSpecified("-usp",args)) { // socks proxy host argument if (isSpecified("-sph",args)) { sesProps.put(SESSION_PROXY_HOST ,getParm("-sph",args)); } // socks proxy port argument if (isSpecified("-spp",args)) sesProps.put(SESSION_PROXY_PORT ,getParm("-spp",args)); } // check if device name is specified if (isSpecified("-dn",args)) sesProps.put(SESSION_DEVICE_NAME ,getParm("-dn",args)); Session s = manager.openSession(sesProps,propFileName,sel); if (isSpecified("-t",args)) frame.sessionPane.addTab(sel,focused,s); else frame.sessionPane.addTab(session,focused,s); frame.sessionPane.setForegroundAt(frame.sessionPane.getSelectedIndex(),Color.black); frame.sessionPane.setIconAt(frame.sessionPane.getSelectedIndex(),unfocused); frame.sessionPane.setSelectedIndex(frame.sessionPane.getTabCount()-1); frame.sessionPane.setForegroundAt(frame.sessionPane.getSelectedIndex(),Color.blue); frame.sessionPane.setIconAt(frame.sessionPane.getSelectedIndex(),focused); s.addSessionListener(this); s.connect(); }
|
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpecified("-cp",args)) sesProps.put(SESSION_CODE_PAGE ,getParm("-cp",args)); if (isSpecified("-gui",args)) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132",args)) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // are we to use a socks proxy if (isSpecified("-usp",args)) { // socks proxy host argument if (isSpecified("-sph",args)) { sesProps.put(SESSION_PROXY_HOST ,getParm("-sph",args)); } // socks proxy port argument if (isSpecified("-spp",args)) sesProps.put(SESSION_PROXY_PORT ,getParm("-spp",args)); } // check if device name is specified if (isSpecified("-dn",args)) sesProps.put(SESSION_DEVICE_NAME ,getParm("-dn",args)); Session s = manager.openSession(sesProps,propFileName,sel); if (isSpecified("-t",args)) frame.sessionPane.addTab(sel,focused,s); else frame.sessionPane.addTab(session,focused,s); frame.sessionPane.setForegroundAt(frame.sessionPane.getSelectedIndex(),Color.black); frame.sessionPane.setIconAt(frame.sessionPane.getSelectedIndex(),unfocused); frame.sessionPane.setSelectedIndex(frame.sessionPane.getTabCount()-1); frame.sessionPane.setForegroundAt(frame.sessionPane.getSelectedIndex(),Color.blue); frame.sessionPane.setIconAt(frame.sessionPane.getSelectedIndex(),focused); s.addSessionListener(this); s.connect(); }
| 7,209
|
public void onSessionChanged(SessionChangeEvent changeEvent) { Session ses = (Session)changeEvent.getSource(); System.out.println(changeEvent.getState() + " " + ses.getAllocDeviceName()); if (changeEvent.getState() == STATE_CONNECTED) { final String d = ses.getAllocDeviceName(); if (d != null) { final int index = frame.sessionPane.indexOfComponent(ses); Runnable tc = new Runnable () { public void run() { frame.sessionPane.setTitleAt(index,d); } }; SwingUtilities.invokeLater(tc); } } }
|
public void onSessionChanged(SessionChangeEvent changeEvent) { Session ses = (Session)changeEvent.getSource(); System.out.println(changeEvent.getState() + " " + ses.getAllocDeviceName()); if (changeEvent.getState() == STATE_CONNECTED) { final String d = ses.getAllocDeviceName(); if (d != null) { final int index = frame.sessionPane.indexOfComponent(ses); Runnable tc = new Runnable () { public void run() { frame.sessionPane.setTitleAt(index,d); } }; SwingUtilities.invokeLater(tc); } } }
| 7,210
|
public void onSessionChanged(SessionChangeEvent changeEvent) { Session ses = (Session)changeEvent.getSource(); System.out.println(changeEvent.getState() + " " + ses.getAllocDeviceName()); if (changeEvent.getState() == STATE_CONNECTED) { final String d = ses.getAllocDeviceName(); if (d != null) { final int index = frame.sessionPane.indexOfComponent(ses); Runnable tc = new Runnable () { public void run() { frame.sessionPane.setTitleAt(index,d); } }; SwingUtilities.invokeLater(tc); } } }
|
public void onSessionChanged(SessionChangeEvent changeEvent) { Session ses = (Session)changeEvent.getSource(); System.out.println(changeEvent.getState() + " " + ses.getAllocDeviceName()); if (changeEvent.getState() == STATE_CONNECTED) { final String d = ses.getAllocDeviceName(); if (d != null) { final int index = frame.sessionPane.indexOfComponent(ses); Runnable tc = new Runnable () { public void run() { frame.sessionPane.setTitleAt(index,d); } }; SwingUtilities.invokeLater(tc); } } }
| 7,211
|
void startNewSession() { int result = 2; String sel = ""; if (sessionArgs != null && !sessionArgs[0].startsWith("-")) sel = sessionArgs[0]; else { sel = getDefaultSession(); } Sessions sess = manager.getSessions(); if (sel != null && sess.getCount() == 0 && sessions.containsKey(sel)){ sessionArgs = new String[NUM_PARMS]; parseArgs((String)sessions.getProperty(sel), sessionArgs); } if (sessionArgs == null || sess.getCount() > 0) { sel = getConnectSession(); if (sel != null) { String selArgs = sessions.getProperty(sel); sessionArgs = new String[NUM_PARMS]; parseArgs(selArgs, sessionArgs); if (!frame.isVisible()) frame.setVisible(true); newSession(sel,sessionArgs); } else { if (sess.getCount() == 0) System.exit(0); } } else { if (!frame.isVisible()) frame.setVisible(true); newSession(sel,sessionArgs); } }
|
void startNewSession() { int result = 2; String sel = ""; if (sessionArgs != null && !sessionArgs[0].startsWith("-")) sel = sessionArgs[0]; else { sel = getDefaultSession(); } Sessions sess = manager.getSessions(); if (sel != null && sess.getCount() == 0 && sessions.containsKey(sel)){ sessionArgs = new String[NUM_PARMS]; parseArgs((String)sessions.getProperty(sel), sessionArgs); } if (sessionArgs == null || sess.getCount() > 0) { sel = getConnectSession(); if (sel != null) { String selArgs = sessions.getProperty(sel); sessionArgs = new String[NUM_PARMS]; parseArgs(selArgs, sessionArgs); if (!frame.isVisible()) frame.setVisible(true); newSession(sel,sessionArgs); } else { if (sess.getCount() == 0) System.exit(0); } } else { if (!frame.isVisible()) frame.setVisible(true); newSession(sel,sessionArgs); } }
| 7,212
|
public PluginRegistryModel(URL[] pluginFiles) throws PluginException { this.extensionPoints = new BootableHashMap(); this.descriptorMap = new BootableHashMap(); loadDescriptors(pluginFiles); resolveDescriptors(); }
|
public PluginRegistryModel(URL[] pluginFiles) throws PluginException { this.extensionPoints = new BootableHashMap(); this.descriptorMap = new BootableHashMap(); loadDescriptors(pluginFiles); resolveDescriptors(); }
| 7,213
|
private void loadDescriptors(URL[] pluginUrls) throws PluginException { final int max = pluginUrls.length; for (int i = 0; i < max; i++) { //System.out.println(pluginUrls[i]); loadPlugin(pluginUrls[ i], false); } }
|
private List loadDescriptors(URL[] pluginUrls) throws PluginException { final int max = pluginUrls.length; for (int i = 0; i < max; i++) { //System.out.println(pluginUrls[i]); loadPlugin(pluginUrls[ i], false); } }
| 7,214
|
private void loadDescriptors(URL[] pluginUrls) throws PluginException { final int max = pluginUrls.length; for (int i = 0; i < max; i++) { //System.out.println(pluginUrls[i]); loadPlugin(pluginUrls[ i], false); } }
|
private void loadDescriptors(URL[] pluginUrls) throws PluginException { final int max = pluginUrls.length; for (int i = 0; i < max; i++) { //System.out.println(pluginUrls[i]); descriptors.add(loadPlugin(pluginUrls[ i], false)); } }
| 7,216
|
public PluginDescriptor loadPlugin(final URL pluginUrl) throws PluginException { return loadPlugin(pluginUrl, true); }
|
private PluginDescriptor loadPlugin(final URL pluginUrl, boolean resolve) throws PluginException { return loadPlugin(pluginUrl, true); }
| 7,218
|
public PluginDescriptor loadPlugin(final URL pluginUrl) throws PluginException { return loadPlugin(pluginUrl, true); }
|
public PluginDescriptor loadPlugin(final URL pluginUrl) throws PluginException { final PluginRegistryModel registry = this; final PluginJar pluginJar; try { pluginJar = (PluginJar) AccessController .doPrivileged(new PrivilegedExceptionAction() { public Object run() throws PluginException, IOException { return new PluginJar(registry, pluginUrl); } }); } catch (PrivilegedActionException pax) { final Throwable ex = pax.getException(); if (ex instanceof PluginException) { throw (PluginException) ex; } else { throw new PluginException(ex); } } final PluginDescriptorModel descr = pluginJar.getDescriptorModel(); if (resolve) { descr.resolve(this); } return descr; }
| 7,219
|
public void resolveDescriptors() throws PluginException { for (Iterator i = descriptorMap.values().iterator(); i.hasNext();) { final PluginDescriptorModel descr = (PluginDescriptorModel) i .next(); descr.resolve(); } }
|
public void resolveDescriptors() throws PluginException { for (Iterator i = descriptorMap.values().iterator(); i.hasNext();) { final PluginDescriptorModel descr = (PluginDescriptorModel) i .next(); descr.resolve(this); } }
| 7,220
|
public PathIterator getPathIterator(AffineTransform at) { // FIXME. return null; }
|
public PathIterator getPathIterator(final AffineTransform at) { // FIXME. return null; }
| 7,221
|
public PathIterator getPathIterator(AffineTransform at) { // FIXME. return null; }
|
public PathIterator getPathIterator(AffineTransform at) { // FIXME. final double minx = getX(); final double miny = getY(); final double maxx = minx + getWidth(); final double maxy = miny + getHeight(); final double arcwidth = getArcWidth(); final double archeight = getArcHeight(); return new PathIterator() { private int current = 0; private PathIterator corner; private Arc2D arc = new Arc2D.Double(); private double[] temp = new double[2]; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current > 9; } private void getPoint(int val) { switch (val) { case 0: case 8: temp[0] = minx; temp[1] = miny + archeight; break; case 1: temp[0] = minx + arcwidth; temp[1] = miny; break; case 2: temp[0] = maxx - arcwidth; temp[1] = maxy; break; case 3: temp[0] = maxx; temp[1] = miny + archeight; break; case 4: temp[0] = maxx; temp[1] = maxy - archeight; break; case 5: temp[0] = maxx - arcwidth; temp[1] = maxy; break; case 6: temp[0] = minx + arcwidth; temp[1] = maxy; break; case 7: temp[0] = minx; temp[1] = maxy - archeight; break; } } public void next() { if (current >= 8) ++current; else if (corner != null) { corner.next(); if (corner.isDone()) { corner = null; ++current; } } else { getPoint(current); double x1 = temp[0]; double y1 = temp[1]; getPoint(current + 1); arc.setFrameFromDiagonal(x1, y1, temp[0], temp[1]); arc.setAngles(x1, y1, temp[0], temp[1]); corner = arc.getPathIterator(at); } } public int currentSegment(float[] coords) { if (corner != null) { int r = corner.currentSegment(coords); if (r == SEG_MOVETO) r = SEG_LINETO; return r; } if (current < 9) { getPoint(current); coords[0] = (float) temp[0]; coords[1] = (float) temp[1]; } else if (current == 9) return SEG_CLOSE; else throw new NoSuchElementException("rect iterator out of bounds"); if (at != null) at.transform(coords, 0, coords, 0, 1); return current == 0 ? SEG_MOVETO : SEG_LINETO; } public int currentSegment(double[] coords) { if (corner != null) { int r = corner.currentSegment(coords); if (r == SEG_MOVETO) r = SEG_LINETO; return r; } if (current < 9) { getPoint(current); coords[0] = temp[0]; coords[1] = temp[1]; } else if (current == 9) return SEG_CLOSE; else throw new NoSuchElementException("rect iterator out of bounds"); if (at != null) at.transform(coords, 0, coords, 0, 1); return current == 0 ? SEG_MOVETO : SEG_LINETO; } }; }
| 7,222
|
public void setDividerLocation(JSplitPane jc, int location) { location = validLocation(location); Container p = jc.getParent(); Dimension rightPrefSize = jc.getRightComponent().getPreferredSize(); if (getOrientation() == 0 && location > jc.getSize().height) { location = jc.getSize().height; while (p != null) { p.setSize(p.getWidth(), p.getHeight() + rightPrefSize.height); p = p.getParent(); } } else if (location > jc.getSize().width) { location = jc.getSize().width; while (p != null) { p.setSize(p.getWidth() + rightPrefSize.width, p.getHeight()); p = p.getParent(); } } setLastDragLocation(getDividerLocation(splitPane)); splitPane.setLastDividerLocation(getDividerLocation(splitPane)); int[] tmpSizes = layoutManager.getSizes(); tmpSizes[0] = location - layoutManager.getInitialLocation(splitPane.getInsets()); tmpSizes[1] = layoutManager.getAvailableSize(splitPane.getSize(), splitPane.getInsets()) - tmpSizes[0]; layoutManager.setSizes(tmpSizes); splitPane.revalidate(); splitPane.repaint(); }
|
public void setDividerLocation(JSplitPane jc, int location) { location = validLocation(location); Container p = jc.getParent(); Dimension rightPrefSize = jc.getRightComponent().getPreferredSize(); Dimension size = jc.getSize(); if (size.width == 0 && size.height == 0) size = jc.getPreferredSize(); if (getOrientation() == 0 && location > size.height) { location = jc.getSize().height; while (p != null) { p.setSize(p.getWidth(), p.getHeight() + rightPrefSize.height); p = p.getParent(); } } else if (location > jc.getSize().width) { location = jc.getSize().width; while (p != null) { p.setSize(p.getWidth() + rightPrefSize.width, p.getHeight()); p = p.getParent(); } } setLastDragLocation(getDividerLocation(splitPane)); splitPane.setLastDividerLocation(getDividerLocation(splitPane)); int[] tmpSizes = layoutManager.getSizes(); tmpSizes[0] = location - layoutManager.getInitialLocation(splitPane.getInsets()); tmpSizes[1] = layoutManager.getAvailableSize(splitPane.getSize(), splitPane.getInsets()) - tmpSizes[0]; layoutManager.setSizes(tmpSizes); splitPane.revalidate(); splitPane.repaint(); }
| 7,223
|
public void setDividerLocation(JSplitPane jc, int location) { location = validLocation(location); Container p = jc.getParent(); Dimension rightPrefSize = jc.getRightComponent().getPreferredSize(); if (getOrientation() == 0 && location > jc.getSize().height) { location = jc.getSize().height; while (p != null) { p.setSize(p.getWidth(), p.getHeight() + rightPrefSize.height); p = p.getParent(); } } else if (location > jc.getSize().width) { location = jc.getSize().width; while (p != null) { p.setSize(p.getWidth() + rightPrefSize.width, p.getHeight()); p = p.getParent(); } } setLastDragLocation(getDividerLocation(splitPane)); splitPane.setLastDividerLocation(getDividerLocation(splitPane)); int[] tmpSizes = layoutManager.getSizes(); tmpSizes[0] = location - layoutManager.getInitialLocation(splitPane.getInsets()); tmpSizes[1] = layoutManager.getAvailableSize(splitPane.getSize(), splitPane.getInsets()) - tmpSizes[0]; layoutManager.setSizes(tmpSizes); splitPane.revalidate(); splitPane.repaint(); }
|
public void setDividerLocation(JSplitPane jc, int location) { location = validLocation(location); Container p = jc.getParent(); Dimension rightPrefSize = jc.getRightComponent().getPreferredSize(); if (getOrientation() == 0 && location > jc.getSize().height) { location = size.height; while (p != null) { p.setSize(p.getWidth(), p.getHeight() + rightPrefSize.height); p = p.getParent(); } } else if (location > jc.getSize().width) { location = jc.getSize().width; while (p != null) { p.setSize(p.getWidth() + rightPrefSize.width, p.getHeight()); p = p.getParent(); } } setLastDragLocation(getDividerLocation(splitPane)); splitPane.setLastDividerLocation(getDividerLocation(splitPane)); int[] tmpSizes = layoutManager.getSizes(); tmpSizes[0] = location - layoutManager.getInitialLocation(splitPane.getInsets()); tmpSizes[1] = layoutManager.getAvailableSize(splitPane.getSize(), splitPane.getInsets()) - tmpSizes[0]; layoutManager.setSizes(tmpSizes); splitPane.revalidate(); splitPane.repaint(); }
| 7,224
|
public void setDividerLocation(JSplitPane jc, int location) { location = validLocation(location); Container p = jc.getParent(); Dimension rightPrefSize = jc.getRightComponent().getPreferredSize(); if (getOrientation() == 0 && location > jc.getSize().height) { location = jc.getSize().height; while (p != null) { p.setSize(p.getWidth(), p.getHeight() + rightPrefSize.height); p = p.getParent(); } } else if (location > jc.getSize().width) { location = jc.getSize().width; while (p != null) { p.setSize(p.getWidth() + rightPrefSize.width, p.getHeight()); p = p.getParent(); } } setLastDragLocation(getDividerLocation(splitPane)); splitPane.setLastDividerLocation(getDividerLocation(splitPane)); int[] tmpSizes = layoutManager.getSizes(); tmpSizes[0] = location - layoutManager.getInitialLocation(splitPane.getInsets()); tmpSizes[1] = layoutManager.getAvailableSize(splitPane.getSize(), splitPane.getInsets()) - tmpSizes[0]; layoutManager.setSizes(tmpSizes); splitPane.revalidate(); splitPane.repaint(); }
|
public void setDividerLocation(JSplitPane jc, int location) { location = validLocation(location); Container p = jc.getParent(); Dimension rightPrefSize = jc.getRightComponent().getPreferredSize(); if (getOrientation() == 0 && location > jc.getSize().height) { location = jc.getSize().height; while (p != null) { p.setSize(p.getWidth(), p.getHeight() + rightPrefSize.height); p = p.getParent(); } } else if (location > size.width) { location = jc.getSize().width; while (p != null) { p.setSize(p.getWidth() + rightPrefSize.width, p.getHeight()); p = p.getParent(); } } setLastDragLocation(getDividerLocation(splitPane)); splitPane.setLastDividerLocation(getDividerLocation(splitPane)); int[] tmpSizes = layoutManager.getSizes(); tmpSizes[0] = location - layoutManager.getInitialLocation(splitPane.getInsets()); tmpSizes[1] = layoutManager.getAvailableSize(splitPane.getSize(), splitPane.getInsets()) - tmpSizes[0]; layoutManager.setSizes(tmpSizes); splitPane.revalidate(); splitPane.repaint(); }
| 7,225
|
public void setDividerLocation(JSplitPane jc, int location) { location = validLocation(location); Container p = jc.getParent(); Dimension rightPrefSize = jc.getRightComponent().getPreferredSize(); if (getOrientation() == 0 && location > jc.getSize().height) { location = jc.getSize().height; while (p != null) { p.setSize(p.getWidth(), p.getHeight() + rightPrefSize.height); p = p.getParent(); } } else if (location > jc.getSize().width) { location = jc.getSize().width; while (p != null) { p.setSize(p.getWidth() + rightPrefSize.width, p.getHeight()); p = p.getParent(); } } setLastDragLocation(getDividerLocation(splitPane)); splitPane.setLastDividerLocation(getDividerLocation(splitPane)); int[] tmpSizes = layoutManager.getSizes(); tmpSizes[0] = location - layoutManager.getInitialLocation(splitPane.getInsets()); tmpSizes[1] = layoutManager.getAvailableSize(splitPane.getSize(), splitPane.getInsets()) - tmpSizes[0]; layoutManager.setSizes(tmpSizes); splitPane.revalidate(); splitPane.repaint(); }
|
public void setDividerLocation(JSplitPane jc, int location) { location = validLocation(location); Container p = jc.getParent(); Dimension rightPrefSize = jc.getRightComponent().getPreferredSize(); if (getOrientation() == 0 && location > jc.getSize().height) { location = jc.getSize().height; while (p != null) { p.setSize(p.getWidth(), p.getHeight() + rightPrefSize.height); p = p.getParent(); } } else if (location > jc.getSize().width) { location = size.width; while (p != null) { p.setSize(p.getWidth() + rightPrefSize.width, p.getHeight()); p = p.getParent(); } } setLastDragLocation(getDividerLocation(splitPane)); splitPane.setLastDividerLocation(getDividerLocation(splitPane)); int[] tmpSizes = layoutManager.getSizes(); tmpSizes[0] = location - layoutManager.getInitialLocation(splitPane.getInsets()); tmpSizes[1] = layoutManager.getAvailableSize(splitPane.getSize(), splitPane.getInsets()) - tmpSizes[0]; layoutManager.setSizes(tmpSizes); splitPane.revalidate(); splitPane.repaint(); }
| 7,226
|
public void specificIOStyleToXDF (OutputStream outputstream, String what) { }
|
protected void specificIOStyleToXDF( OutputStream outputstream, String indent) { synchronized (attribHash) { writeOut(outputstream, "<" + classXDFNodeName); }
| 7,227
|
public void add(Area a) { // XXX Implement. throw new Error("not implemented"); }
|
public void add(Area area) { // XXX Implement. throw new Error("not implemented"); }
| 7,229
|
public void add(Area a) { // XXX Implement. throw new Error("not implemented"); }
|
public void add(Area a) { // XXX Implement. if (equals(area)) return; if (area.isEmpty()) return; Area B = (Area) area.clone(); Vector pathA = new Vector(); Vector pathB = new Vector(); pathA.addAll(solids); pathA.addAll(holes); pathB.addAll(B.solids); pathB.addAll(B.holes); int nNodes = 0; for (int i = 0; i < pathA.size(); i++) { Segment a = (Segment) pathA.elementAt(i); for (int j = 0; j < pathB.size(); j++) { Segment b = (Segment) pathB.elementAt(j); nNodes += createNodes(a, b); } } Vector paths = new Vector(); Segment v; Vector segments = new Vector(); for (int i = 0; i < pathA.size(); i++) { v = (Segment) pathA.elementAt(i); Segment path = v; do { if (v.isSegmentOutside(area)) segments.add(v); v = v.next; } while (v != path); } for (int i = 0; i < pathB.size(); i++) { v = (Segment) pathB.elementAt(i); Segment path = v; do { if (v.isSegmentOutside(this)) segments.add(v); v = v.next; } while (v != path); } paths = weilerAtherton(segments); deleteRedundantPaths(paths); }
| 7,230
|
public Object clone() { try { return super.clone(); } catch (CloneNotSupportedException e) { throw (Error) new InternalError().initCause(e); // Impossible } }
|
public Object clone() { try { Area clone = new Area(); for (int i = 0; i < solids.size(); i++) clone.solids.add(((Segment) solids.elementAt(i)).cloneSegmentList()); for (int i = 0; i < holes.size(); i++) clone.holes.add(((Segment) holes.elementAt(i)).cloneSegmentList()); return clone; } catch (CloneNotSupportedException e) { throw (Error) new InternalError().initCause(e); // Impossible } }
| 7,231
|
public boolean equals(Area a) { // XXX Implement. throw new Error("not implemented"); }
|
public boolean equals(Area area) { // XXX Implement. throw new Error("not implemented"); }
| 7,232
|
public boolean equals(Area a) { // XXX Implement. throw new Error("not implemented"); }
|
public boolean equals(Area a) { // XXX Implement. if (area == null) return false; if (! getBounds2D().equals(area.getBounds2D())) return false; if (solids.size() != area.solids.size() || holes.size() != area.holes.size()) return false; Vector pathA = new Vector(); pathA.addAll(solids); pathA.addAll(holes); Vector pathB = new Vector(); pathB.addAll(area.solids); pathB.addAll(area.holes); int nPaths = pathA.size(); boolean[][] match = new boolean[2][nPaths]; for (int i = 0; i < nPaths; i++) { for (int j = 0; j < nPaths; j++) { Segment p1 = (Segment) pathA.elementAt(i); Segment p2 = (Segment) pathB.elementAt(j); if (! match[0][i] && ! match[1][j]) if (p1.pathEquals(p2)) match[0][i] = match[1][j] = true; } } boolean result = true; for (int i = 0; i < nPaths; i++) result = result && match[0][i] && match[1][i]; return result; }
| 7,233
|
public void exclusiveOr(Area a) { // XXX Implement. throw new Error("not implemented"); }
|
public void exclusiveOr(Area area) { // XXX Implement. throw new Error("not implemented"); }
| 7,234
|
public void exclusiveOr(Area a) { // XXX Implement. throw new Error("not implemented"); }
|
public void exclusiveOr(Area a) { // XXX Implement. if (area.isEmpty()) return; if (isEmpty()) { Area B = (Area) area.clone(); solids = B.solids; holes = B.holes; return; }
| 7,235
|
public PathIterator getPathIterator(AffineTransform at) { // XXX Implement. throw new Error("not implemented"); }
|
public PathIterator getPathIterator(AffineTransform at) { // XXX Implement. return (new AreaIterator(at)); }
| 7,237
|
public boolean intersects(double x, double y, double w, double h) { // XXX Implement. throw new Error("not implemented"); }
|
public boolean intersects(double x, double y, double w, double h) { // XXX Implement. if (solids.size() == 0) return false; LineSegment[] l = new LineSegment[4]; l[0] = new LineSegment(x, y, x + w, y); l[1] = new LineSegment(x, y + h, x + w, y + h); l[2] = new LineSegment(x, y, x, y + h); l[3] = new LineSegment(x + w, y, x + w, y + h); for (int i = 0; i < 4; i++) { for (int path = 0; path < solids.size(); path++) { Segment v; Segment start; start = v = (Segment) solids.elementAt(path); do { if (l[i].hasIntersections(v)) return true; v = v.next; } while (v != start); } for (int path = 0; path < holes.size(); path++) { Segment v; Segment start; start = v = (Segment) holes.elementAt(path); do { if (l[i].hasIntersections(v)) return true; v = v.next; } while (v != start); } } if (contains(x + w * 0.5, y + h * 0.5)) return true; Point2D p = ((Segment) solids.elementAt(0)).getMidPoint(); if ((new Rectangle2D.Double(x, y, w, h)).contains(p)) return true; return false; }
| 7,238
|
public boolean isEmpty() { // XXX Implement. throw new Error("not implemented"); }
|
public boolean isEmpty() { // XXX Implement. if (solids.size() == 0) return true; double totalArea = 0; for (int i = 0; i < solids.size(); i++) totalArea += Math.abs(((Segment) solids.elementAt(i)).getSignedArea()); for (int i = 0; i < holes.size(); i++) totalArea -= Math.abs(((Segment) holes.elementAt(i)).getSignedArea()); if (totalArea <= EPSILON) return true; return false; }
| 7,239
|
public boolean isPolygonal() { // XXX Implement. throw new Error("not implemented"); }
|
public boolean isPolygonal() { // XXX Implement. for (int i = 0; i < holes.size(); i++) if (! ((Segment) holes.elementAt(i)).isPolygonal()) return false; for (int i = 0; i < solids.size(); i++) if (! ((Segment) solids.elementAt(i)).isPolygonal()) return false; return true; }
| 7,240
|
public boolean isRectangular() { // XXX Implement. throw new Error("not implemented"); }
|
public boolean isRectangular() { // XXX Implement. if (isEmpty()) return true; if (holes.size() != 0 || solids.size() != 1) return false; Segment path = (Segment) solids.elementAt(0); if (! path.isPolygonal()) return false; int nCorners = 0; Segment s = path; do { Segment s2 = s.next; double d1 = (s.P2.getX() - s.P1.getX())*(s2.P2.getX() - s2.P1.getX())/ ((s.P1.distance(s.P2)) * (s2.P1.distance(s2.P2))); double d2 = (s.P2.getY() - s.P1.getY())*(s2.P2.getY() - s2.P1.getY())/ ((s.P1.distance(s.P2)) * (s2.P1.distance(s2.P2))); double dotproduct = d1 + d2; if (d1 != 0 && d2 != 0) return false; if (Math.abs(dotproduct) == 0) nCorners++; else if ((Math.abs(1.0 - dotproduct) > 0)) return false; s = s.next; }
| 7,241
|
public boolean isSingular() { // XXX Implement. throw new Error("not implemented"); }
|
public boolean isSingular() { // XXX Implement. return (holes.size() == 0 && solids.size() <= 1); }
| 7,243
|
public void reset() { // XXX Implement. throw new Error("not implemented"); }
|
public void reset() { // XXX Implement. solids = new Vector(); holes = new Vector(); }
| 7,244
|
public void subtract(Area a) { // XXX Implement. throw new Error("not implemented"); }
|
public void subtract(Area area) { // XXX Implement. throw new Error("not implemented"); }
| 7,245
|
public void subtract(Area a) { // XXX Implement. throw new Error("not implemented"); }
|
public void subtract(Area a) { // XXX Implement. if (isEmpty() || area.isEmpty()) return; if (equals(area)) { reset(); return; } Vector pathA = new Vector(); Area B = (Area) area.clone(); pathA.addAll(solids); pathA.addAll(holes); setDirection(B.holes, true); setDirection(B.solids, false); Vector pathB = new Vector(); pathB.addAll(B.solids); pathB.addAll(B.holes); int nNodes = 0; for (int i = 0; i < pathA.size(); i++) { Segment a = (Segment) pathA.elementAt(i); for (int j = 0; j < pathB.size(); j++) { Segment b = (Segment) pathB.elementAt(j); nNodes += createNodes(a, b); } } Vector paths = new Vector(); Vector segments = new Vector(); for (int i = 0; i < pathA.size(); i++) { Segment v = (Segment) pathA.elementAt(i); Segment path = v; if (v.isSegmentOutside(area) && v.node == null) segments.add(v); boolean node = false; do { if ((v.node != null || node)) { node = (v.node != null); if (v.isSegmentOutside(area)) segments.add(v); } v = v.next; } while (v != path); } for (int i = 0; i < pathB.size(); i++) { Segment v = (Segment) pathB.elementAt(i); Segment path = v; if (! v.isSegmentOutside(this) && v.node == null) segments.add(v); v = v.next; boolean node = false; do { if ((v.node != null || node)) { node = (v.node != null); if (! v.isSegmentOutside(this)) segments.add(v); } v = v.next; } while (v != path); } paths = weilerAtherton(segments); deleteRedundantPaths(paths); }
| 7,246
|
private void init () { classXDFNodeName = "ParameterGroup"; }
|
private void init () { classXDFNodeName = "parameterGroup"; }
| 7,247
|
public void paint(Graphics g) { super.paint(g); Insets insets = getInsets(); Rectangle bounds = getBounds(); int x = insets.left + (bounds.width - insets.left - insets.right - defaultSize) / 2; int y = insets.top + (bounds.height - insets.left - insets.right - defaultSize) / 2; paintTriangle(g, x, y, defaultSize, direction, isEnabled()); }
|
public void paint(Graphics g) { super.paint(g); Rectangle bounds = getBounds(); int x = insets.left + (bounds.width - insets.left - insets.right - defaultSize) / 2; int y = insets.top + (bounds.height - insets.left - insets.right - defaultSize) / 2; paintTriangle(g, x, y, defaultSize, direction, isEnabled()); }
| 7,248
|
public void paint(Graphics g) { super.paint(g); Insets insets = getInsets(); Rectangle bounds = getBounds(); int x = insets.left + (bounds.width - insets.left - insets.right - defaultSize) / 2; int y = insets.top + (bounds.height - insets.left - insets.right - defaultSize) / 2; paintTriangle(g, x, y, defaultSize, direction, isEnabled()); }
|
public void paint(Graphics g) { super.paint(g); Insets insets = getInsets(); Rectangle bounds = getBounds(); int x = insets.left + (bounds.width - insets.left - insets.right - defaultSize) / 2; int y = insets.top + (bounds.height - insets.left - insets.right - defaultSize) / 2; paintTriangle(g, x, y, defaultSize, direction, isEnabled()); }
| 7,249
|
public void paintTriangle(Graphics g, int x, int y, int size, int direction, boolean isEnabled) { Polygon arrow = null; switch (direction) { case NORTH: arrow = upIcon; break; case SOUTH: arrow = downIcon; break; case EAST: case RIGHT: arrow = rightIcon; break; case WEST: case LEFT: arrow = leftIcon; break; } int[] xPoints = arrow.xpoints; int[] yPoints = arrow.ypoints; int x1; int y1; int x2; int y2; x1 = y1 = x2 = y2 = 0; if (size != defaultSize) { float scale = size * 1f / defaultSize; for (int i = 0; i < 3; i++) { xPoints[i] *= scale; yPoints[i] *= scale; } } g.translate(x, y); switch (direction) { case NORTH: x1 = xPoints[0] + 2; y1 = yPoints[0]; y2 = y1; x2 = xPoints[2] - 1; break; case SOUTH: x1 = xPoints[1]; y1 = yPoints[1]; x2 = xPoints[2]; y2 = yPoints[2]; break; case LEFT: case WEST: x1 = xPoints[0] + 1; y1 = yPoints[0] + 1; x2 = x1; y2 = yPoints[2] + 1; break; case RIGHT: case EAST: x1 = xPoints[2]; y1 = yPoints[2] + 1; x2 = xPoints[1] - 1; y2 = yPoints[1] + 1; break; } Color saved = g.getColor(); if (isEnabled) { g.setColor(Color.DARK_GRAY); if (arrow != null) g.fillPolygon(xPoints, yPoints, 3); } else { g.setColor(Color.GRAY); g.fillPolygon(xPoints, yPoints, 3); g.setColor(Color.WHITE); g.drawLine(x1, y1, x2, y2); } g.setColor(saved); g.translate(-x, -y); }
|
public void paintTriangle(Graphics g, int x, int y, int size, int direction, boolean isEnabled) { Color savedColor = g.getColor(); switch (direction) { case NORTH: arrow = upIcon; break; case SOUTH: arrow = downIcon; break; case EAST: case RIGHT: arrow = rightIcon; break; case WEST: case LEFT: arrow = leftIcon; break; } int[] xPoints = arrow.xpoints; int[] yPoints = arrow.ypoints; int x1; int y1; int x2; int y2; x1 = y1 = x2 = y2 = 0; if (size != defaultSize) { float scale = size * 1f / defaultSize; for (int i = 0; i < 3; i++) { xPoints[i] *= scale; yPoints[i] *= scale; } } g.translate(x, y); switch (direction) { case NORTH: x1 = xPoints[0] + 2; y1 = yPoints[0]; y2 = y1; x2 = xPoints[2] - 1; break; case SOUTH: x1 = xPoints[1]; y1 = yPoints[1]; x2 = xPoints[2]; y2 = yPoints[2]; break; case LEFT: case WEST: x1 = xPoints[0] + 1; y1 = yPoints[0] + 1; x2 = x1; y2 = yPoints[2] + 1; break; case RIGHT: case EAST: x1 = xPoints[2]; y1 = yPoints[2] + 1; x2 = xPoints[1] - 1; y2 = yPoints[1] + 1; break; } Color saved = g.getColor(); if (isEnabled) { g.setColor(Color.DARK_GRAY); if (arrow != null) g.fillPolygon(xPoints, yPoints, 3); } else { g.setColor(Color.GRAY); g.fillPolygon(xPoints, yPoints, 3); g.setColor(Color.WHITE); g.drawLine(x1, y1, x2, y2); } g.setColor(saved); g.translate(-x, -y); }
| 7,250
|
public void paintTriangle(Graphics g, int x, int y, int size, int direction, boolean isEnabled) { Polygon arrow = null; switch (direction) { case NORTH: arrow = upIcon; break; case SOUTH: arrow = downIcon; break; case EAST: case RIGHT: arrow = rightIcon; break; case WEST: case LEFT: arrow = leftIcon; break; } int[] xPoints = arrow.xpoints; int[] yPoints = arrow.ypoints; int x1; int y1; int x2; int y2; x1 = y1 = x2 = y2 = 0; if (size != defaultSize) { float scale = size * 1f / defaultSize; for (int i = 0; i < 3; i++) { xPoints[i] *= scale; yPoints[i] *= scale; } } g.translate(x, y); switch (direction) { case NORTH: x1 = xPoints[0] + 2; y1 = yPoints[0]; y2 = y1; x2 = xPoints[2] - 1; break; case SOUTH: x1 = xPoints[1]; y1 = yPoints[1]; x2 = xPoints[2]; y2 = yPoints[2]; break; case LEFT: case WEST: x1 = xPoints[0] + 1; y1 = yPoints[0] + 1; x2 = x1; y2 = yPoints[2] + 1; break; case RIGHT: case EAST: x1 = xPoints[2]; y1 = yPoints[2] + 1; x2 = xPoints[1] - 1; y2 = yPoints[1] + 1; break; } Color saved = g.getColor(); if (isEnabled) { g.setColor(Color.DARK_GRAY); if (arrow != null) g.fillPolygon(xPoints, yPoints, 3); } else { g.setColor(Color.GRAY); g.fillPolygon(xPoints, yPoints, 3); g.setColor(Color.WHITE); g.drawLine(x1, y1, x2, y2); } g.setColor(saved); g.translate(-x, -y); }
|
public void paintTriangle(Graphics g, int x, int y, int size, int direction, boolean isEnabled) { Polygon arrow = null; switch (direction) { case NORTH: paintTriangleNorth(g, x, y, size, isEnabled); break; case SOUTH: arrow = downIcon; break; case EAST: case RIGHT: arrow = rightIcon; break; case WEST: case LEFT: arrow = leftIcon; break; } int[] xPoints = arrow.xpoints; int[] yPoints = arrow.ypoints; int x1; int y1; int x2; int y2; x1 = y1 = x2 = y2 = 0; if (size != defaultSize) { float scale = size * 1f / defaultSize; for (int i = 0; i < 3; i++) { xPoints[i] *= scale; yPoints[i] *= scale; } } g.translate(x, y); switch (direction) { case NORTH: x1 = xPoints[0] + 2; y1 = yPoints[0]; y2 = y1; x2 = xPoints[2] - 1; break; case SOUTH: x1 = xPoints[1]; y1 = yPoints[1]; x2 = xPoints[2]; y2 = yPoints[2]; break; case LEFT: case WEST: x1 = xPoints[0] + 1; y1 = yPoints[0] + 1; x2 = x1; y2 = yPoints[2] + 1; break; case RIGHT: case EAST: x1 = xPoints[2]; y1 = yPoints[2] + 1; x2 = xPoints[1] - 1; y2 = yPoints[1] + 1; break; } Color saved = g.getColor(); if (isEnabled) { g.setColor(Color.DARK_GRAY); if (arrow != null) g.fillPolygon(xPoints, yPoints, 3); } else { g.setColor(Color.GRAY); g.fillPolygon(xPoints, yPoints, 3); g.setColor(Color.WHITE); g.drawLine(x1, y1, x2, y2); } g.setColor(saved); g.translate(-x, -y); }
| 7,251
|
public void paintTriangle(Graphics g, int x, int y, int size, int direction, boolean isEnabled) { Polygon arrow = null; switch (direction) { case NORTH: arrow = upIcon; break; case SOUTH: arrow = downIcon; break; case EAST: case RIGHT: arrow = rightIcon; break; case WEST: case LEFT: arrow = leftIcon; break; } int[] xPoints = arrow.xpoints; int[] yPoints = arrow.ypoints; int x1; int y1; int x2; int y2; x1 = y1 = x2 = y2 = 0; if (size != defaultSize) { float scale = size * 1f / defaultSize; for (int i = 0; i < 3; i++) { xPoints[i] *= scale; yPoints[i] *= scale; } } g.translate(x, y); switch (direction) { case NORTH: x1 = xPoints[0] + 2; y1 = yPoints[0]; y2 = y1; x2 = xPoints[2] - 1; break; case SOUTH: x1 = xPoints[1]; y1 = yPoints[1]; x2 = xPoints[2]; y2 = yPoints[2]; break; case LEFT: case WEST: x1 = xPoints[0] + 1; y1 = yPoints[0] + 1; x2 = x1; y2 = yPoints[2] + 1; break; case RIGHT: case EAST: x1 = xPoints[2]; y1 = yPoints[2] + 1; x2 = xPoints[1] - 1; y2 = yPoints[1] + 1; break; } Color saved = g.getColor(); if (isEnabled) { g.setColor(Color.DARK_GRAY); if (arrow != null) g.fillPolygon(xPoints, yPoints, 3); } else { g.setColor(Color.GRAY); g.fillPolygon(xPoints, yPoints, 3); g.setColor(Color.WHITE); g.drawLine(x1, y1, x2, y2); } g.setColor(saved); g.translate(-x, -y); }
|
public void paintTriangle(Graphics g, int x, int y, int size, int direction, boolean isEnabled) { Polygon arrow = null; switch (direction) { case NORTH: arrow = upIcon; break; case SOUTH: arrow = downIcon; break; case EAST: case RIGHT: arrow = rightIcon; break; case WEST: case LEFT: arrow = leftIcon; break; } int[] xPoints = arrow.xpoints; int[] yPoints = arrow.ypoints; int x1; int y1; int x2; int y2; x1 = y1 = x2 = y2 = 0; if (size != defaultSize) { float scale = size * 1f / defaultSize; for (int i = 0; i < 3; i++) { xPoints[i] *= scale; yPoints[i] *= scale; } } g.translate(x, y); switch (direction) { case NORTH: x1 = xPoints[0] + 2; y1 = yPoints[0]; y2 = y1; x2 = xPoints[2] - 1; break; case SOUTH: x1 = xPoints[1]; y1 = yPoints[1]; x2 = xPoints[2]; y2 = yPoints[2]; break; case LEFT: case WEST: x1 = xPoints[0] + 1; y1 = yPoints[0] + 1; x2 = x1; y2 = yPoints[2] + 1; break; case RIGHT: case EAST: x1 = xPoints[2]; y1 = yPoints[2] + 1; x2 = xPoints[1] - 1; y2 = yPoints[1] + 1; break; } Color saved = g.getColor(); if (isEnabled) { g.setColor(Color.DARK_GRAY); if (arrow != null) g.fillPolygon(xPoints, yPoints, 3); } else { g.setColor(Color.GRAY); g.fillPolygon(xPoints, yPoints, 3); g.setColor(Color.WHITE); g.drawLine(x1, y1, x2, y2); } g.setColor(saved); g.translate(-x, -y); }
| 7,252
|
public void paintTriangle(Graphics g, int x, int y, int size, int direction, boolean isEnabled) { Polygon arrow = null; switch (direction) { case NORTH: arrow = upIcon; break; case SOUTH: arrow = downIcon; break; case EAST: case RIGHT: arrow = rightIcon; break; case WEST: case LEFT: arrow = leftIcon; break; } int[] xPoints = arrow.xpoints; int[] yPoints = arrow.ypoints; int x1; int y1; int x2; int y2; x1 = y1 = x2 = y2 = 0; if (size != defaultSize) { float scale = size * 1f / defaultSize; for (int i = 0; i < 3; i++) { xPoints[i] *= scale; yPoints[i] *= scale; } } g.translate(x, y); switch (direction) { case NORTH: x1 = xPoints[0] + 2; y1 = yPoints[0]; y2 = y1; x2 = xPoints[2] - 1; break; case SOUTH: x1 = xPoints[1]; y1 = yPoints[1]; x2 = xPoints[2]; y2 = yPoints[2]; break; case LEFT: case WEST: x1 = xPoints[0] + 1; y1 = yPoints[0] + 1; x2 = x1; y2 = yPoints[2] + 1; break; case RIGHT: case EAST: x1 = xPoints[2]; y1 = yPoints[2] + 1; x2 = xPoints[1] - 1; y2 = yPoints[1] + 1; break; } Color saved = g.getColor(); if (isEnabled) { g.setColor(Color.DARK_GRAY); if (arrow != null) g.fillPolygon(xPoints, yPoints, 3); } else { g.setColor(Color.GRAY); g.fillPolygon(xPoints, yPoints, 3); g.setColor(Color.WHITE); g.drawLine(x1, y1, x2, y2); } g.setColor(saved); g.translate(-x, -y); }
|
public void paintTriangle(Graphics g, int x, int y, int size, int direction, boolean isEnabled) { Polygon arrow = null; switch (direction) { case NORTH: arrow = upIcon; break; case SOUTH: arrow = downIcon; break; case EAST: case RIGHT: arrow = rightIcon; break; case WEST: case LEFT: arrow = leftIcon; break; } int[] xPoints = arrow.xpoints; int[] yPoints = arrow.ypoints; int x1; int y1; int x2; int y2; x1 = y1 = x2 = y2 = 0; if (size != defaultSize) { float scale = size * 1f / defaultSize; for (int i = 0; i < 3; i++) { xPoints[i] *= scale; yPoints[i] *= scale; } } g.translate(x, y); switch (direction) { case NORTH: x1 = xPoints[0] + 2; y1 = yPoints[0]; y2 = y1; x2 = xPoints[2] - 1; break; case SOUTH: x1 = xPoints[1]; y1 = yPoints[1]; x2 = xPoints[2]; y2 = yPoints[2]; break; case LEFT: case WEST: x1 = xPoints[0] + 1; y1 = yPoints[0] + 1; x2 = x1; y2 = yPoints[2] + 1; break; case RIGHT: case EAST: x1 = xPoints[2]; y1 = yPoints[2] + 1; x2 = xPoints[1] - 1; y2 = yPoints[1] + 1; break; } Color saved = g.getColor(); if (isEnabled) { g.setColor(Color.DARK_GRAY); if (arrow != null) g.fillPolygon(xPoints, yPoints, 3); } else { g.setColor(Color.GRAY); g.fillPolygon(xPoints, yPoints, 3); g.setColor(Color.WHITE); g.drawLine(x1, y1, x2, y2); } g.setColor(saved); g.translate(-x, -y); }
| 7,253
|
public void paintTriangle(Graphics g, int x, int y, int size, int direction, boolean isEnabled) { Polygon arrow = null; switch (direction) { case NORTH: arrow = upIcon; break; case SOUTH: arrow = downIcon; break; case EAST: case RIGHT: arrow = rightIcon; break; case WEST: case LEFT: arrow = leftIcon; break; } int[] xPoints = arrow.xpoints; int[] yPoints = arrow.ypoints; int x1; int y1; int x2; int y2; x1 = y1 = x2 = y2 = 0; if (size != defaultSize) { float scale = size * 1f / defaultSize; for (int i = 0; i < 3; i++) { xPoints[i] *= scale; yPoints[i] *= scale; } } g.translate(x, y); switch (direction) { case NORTH: x1 = xPoints[0] + 2; y1 = yPoints[0]; y2 = y1; x2 = xPoints[2] - 1; break; case SOUTH: x1 = xPoints[1]; y1 = yPoints[1]; x2 = xPoints[2]; y2 = yPoints[2]; break; case LEFT: case WEST: x1 = xPoints[0] + 1; y1 = yPoints[0] + 1; x2 = x1; y2 = yPoints[2] + 1; break; case RIGHT: case EAST: x1 = xPoints[2]; y1 = yPoints[2] + 1; x2 = xPoints[1] - 1; y2 = yPoints[1] + 1; break; } Color saved = g.getColor(); if (isEnabled) { g.setColor(Color.DARK_GRAY); if (arrow != null) g.fillPolygon(xPoints, yPoints, 3); } else { g.setColor(Color.GRAY); g.fillPolygon(xPoints, yPoints, 3); g.setColor(Color.WHITE); g.drawLine(x1, y1, x2, y2); } g.setColor(saved); g.translate(-x, -y); }
|
public void paintTriangle(Graphics g, int x, int y, int size, int direction, boolean isEnabled) { Polygon arrow = null; switch (direction) { case NORTH: arrow = upIcon; break; case SOUTH: arrow = downIcon; break; case EAST: case RIGHT: arrow = rightIcon; break; case WEST: case LEFT: arrow = leftIcon; break; } int[] xPoints = arrow.xpoints; int[] yPoints = arrow.ypoints; int x1; int y1; int x2; int y2; x1 = y1 = x2 = y2 = 0; if (size != defaultSize) { float scale = size * 1f / defaultSize; for (int i = 0; i < 3; i++) { xPoints[i] *= scale; yPoints[i] *= scale; } } g.translate(x, y); switch (direction) { case NORTH: x1 = xPoints[0] + 2; y1 = yPoints[0]; y2 = y1; x2 = xPoints[2] - 1; break; case SOUTH: x1 = xPoints[1]; y1 = yPoints[1]; x2 = xPoints[2]; y2 = yPoints[2]; break; case LEFT: case WEST: x1 = xPoints[0] + 1; y1 = yPoints[0] + 1; x2 = x1; y2 = yPoints[2] + 1; break; case RIGHT: case EAST: x1 = xPoints[2]; y1 = yPoints[2] + 1; x2 = xPoints[1] - 1; y2 = yPoints[1] + 1; break; } Color saved = g.getColor(); if (isEnabled) { g.setColor(Color.DARK_GRAY); if (arrow != null) g.fillPolygon(xPoints, yPoints, 3); } else { g.setColor(Color.GRAY); g.fillPolygon(xPoints, yPoints, 3); g.setColor(Color.WHITE); g.drawLine(x1, y1, x2, y2); } g.setColor(saved); g.translate(-x, -y); }
| 7,254
|
public void paintTriangle(Graphics g, int x, int y, int size, int direction, boolean isEnabled) { Polygon arrow = null; switch (direction) { case NORTH: arrow = upIcon; break; case SOUTH: arrow = downIcon; break; case EAST: case RIGHT: arrow = rightIcon; break; case WEST: case LEFT: arrow = leftIcon; break; } int[] xPoints = arrow.xpoints; int[] yPoints = arrow.ypoints; int x1; int y1; int x2; int y2; x1 = y1 = x2 = y2 = 0; if (size != defaultSize) { float scale = size * 1f / defaultSize; for (int i = 0; i < 3; i++) { xPoints[i] *= scale; yPoints[i] *= scale; } } g.translate(x, y); switch (direction) { case NORTH: x1 = xPoints[0] + 2; y1 = yPoints[0]; y2 = y1; x2 = xPoints[2] - 1; break; case SOUTH: x1 = xPoints[1]; y1 = yPoints[1]; x2 = xPoints[2]; y2 = yPoints[2]; break; case LEFT: case WEST: x1 = xPoints[0] + 1; y1 = yPoints[0] + 1; x2 = x1; y2 = yPoints[2] + 1; break; case RIGHT: case EAST: x1 = xPoints[2]; y1 = yPoints[2] + 1; x2 = xPoints[1] - 1; y2 = yPoints[1] + 1; break; } Color saved = g.getColor(); if (isEnabled) { g.setColor(Color.DARK_GRAY); if (arrow != null) g.fillPolygon(xPoints, yPoints, 3); } else { g.setColor(Color.GRAY); g.fillPolygon(xPoints, yPoints, 3); g.setColor(Color.WHITE); g.drawLine(x1, y1, x2, y2); } g.setColor(saved); g.translate(-x, -y); }
|
public void paintTriangle(Graphics g, int x, int y, int size, int direction, boolean isEnabled) { Polygon arrow = null; switch (direction) { case NORTH: arrow = upIcon; break; case SOUTH: arrow = downIcon; break; case EAST: case RIGHT: arrow = rightIcon; break; case WEST: case LEFT: arrow = leftIcon; break; } int[] xPoints = arrow.xpoints; int[] yPoints = arrow.ypoints; int x1; int y1; int x2; int y2; x1 = y1 = x2 = y2 = 0; if (size != defaultSize) { float scale = size * 1f / defaultSize; for (int i = 0; i < 3; i++) { xPoints[i] *= scale; yPoints[i] *= scale; } } g.translate(x, y); switch (direction) { case NORTH: x1 = xPoints[0] + 2; y1 = yPoints[0]; y2 = y1; x2 = xPoints[2] - 1; break; case SOUTH: x1 = xPoints[1]; y1 = yPoints[1]; x2 = xPoints[2]; y2 = yPoints[2]; break; case LEFT: case WEST: x1 = xPoints[0] + 1; y1 = yPoints[0] + 1; x2 = x1; y2 = yPoints[2] + 1; break; case RIGHT: case EAST: x1 = xPoints[2]; y1 = yPoints[2] + 1; x2 = xPoints[1] - 1; y2 = yPoints[1] + 1; break; } Color saved = g.getColor(); if (isEnabled) { g.setColor(Color.DARK_GRAY); if (arrow != null) g.fillPolygon(xPoints, yPoints, 3); } else { g.setColor(Color.GRAY); g.fillPolygon(xPoints, yPoints, 3); g.setColor(Color.WHITE); g.drawLine(x1, y1, x2, y2); } g.setColor(saved); g.translate(-x, -y); }
| 7,255
|
public Any to_any() { if (isNull) { Any a0 = createAny(); a0.type(orb.get_primitive_tc(TCKind.tk_null)); return a0; } else { try { ValueFactory factory = ((org.omg.CORBA_2_3.ORB) orb).lookup_value_factory(official_type.id()); if (factory == null) throw new MARSHAL("Factory for " + official_type.id() + " not registered." ); OutputStream out = orb.create_output_stream(); for (int i = 0; i < array.length; i++) array [ i ].to_any().write_value(out); org.omg.CORBA_2_3.portable.InputStream in = (org.omg.CORBA_2_3.portable.InputStream) out.create_input_stream(); Serializable v = factory.read_value(in); Any g = createAny(); g.type(official_type); g.insert_Value(v, official_type); return g; } catch (Exception e) { throw new Unexpected(e); } } }
|
public Any to_any() { if (isNull) { Any a0 = createAny(); a0.type(orb.get_primitive_tc(TCKind.tk_null)); return a0; } else { try { ValueFactory factory = ((org.omg.CORBA_2_3.ORB) orb).lookup_value_factory(official_type.id()); if (factory == null) throw new MARSHAL("Factory for " + official_type.id() + " not registered." ); OutputStream out = orb.create_output_stream(); for (int i = 0; i < array.length; i++) array [ i ].to_any().write_value(out); org.omg.CORBA_2_3.portable.InputStream in = (org.omg.CORBA_2_3.portable.InputStream) out.create_input_stream(); Serializable v = factory.read_value(in); Any g = createAny(); g.type(official_type); g.insert_Value(v, official_type); return g; } catch (Exception e) { throw new Unexpected(e); } } }
| 7,256
|
public void run();
|
void run();
| 7,257
|
private void ensureEntries() throws IOException { try { if (entries == null) { entries = new HashMap<String, FTPFSEntry>(); FTPFile[] ftpFiles = null; synchronized(fileSystem){ ftpFiles = fileSystem.listFiles(path()); } for (FTPFile f : ftpFiles) { FTPFSEntry e = f.isDirectory() ? new FTPFSDirectory(fileSystem, f) : new FTPFSFile(fileSystem, f); e.setParent(this); entries.put(f.getName(), e); } } } catch (Exception e) { e.printStackTrace(); throw new IOException("Read error"); } }
|
private void ensureEntries() throws IOException { try { if (entries == null) { entries = new HashMap<String, FTPFSEntry>(); FTPFile[] ftpFiles = null; synchronized(fileSystem){ ftpFiles = fileSystem.dirDetails(path()); } for (FTPFile f : ftpFiles) { FTPFSEntry e = f.isDirectory() ? new FTPFSDirectory(fileSystem, f) : new FTPFSFile(fileSystem, f); e.setParent(this); entries.put(f.getName(), e); } } } catch (Exception e) { e.printStackTrace(); throw new IOException("Read error"); } }
| 7,258
|
private void ensureEntries() throws IOException { try { if (entries == null) { entries = new HashMap<String, FTPFSEntry>(); FTPFile[] ftpFiles = null; synchronized(fileSystem){ ftpFiles = fileSystem.listFiles(path()); } for (FTPFile f : ftpFiles) { FTPFSEntry e = f.isDirectory() ? new FTPFSDirectory(fileSystem, f) : new FTPFSFile(fileSystem, f); e.setParent(this); entries.put(f.getName(), e); } } } catch (Exception e) { e.printStackTrace(); throw new IOException("Read error"); } }
|
private void ensureEntries() throws IOException { try { if (entries == null) { entries = new HashMap<String, FTPFSEntry>(); FTPFile[] ftpFiles = null; synchronized(fileSystem){ ftpFiles = fileSystem.listFiles(path()); } for (FTPFile f : ftpFiles) { FTPFSEntry e = f.isDir() ? new FTPFSDirectory(fileSystem, f) : new FTPFSFile(fileSystem, f); e.setParent(this); entries.put(f.getName(), e); } } } catch (Exception e) { e.printStackTrace(); throw new IOException("Read error"); } }
| 7,259
|
private void handleHighlight() { Highlighter highlighter = textComponent.getHighlighter(); if (highlighter == null) return; int p0 = Math.min(dot, mark); int p1 = Math.max(dot, mark); if (selectionVisible && p0 != p1) { try { if (highlightEntry == null) highlightEntry = highlighter.addHighlight(p0, p1, getSelectionPainter()); else highlighter.changeHighlight(highlightEntry, p0, p1); } catch (BadLocationException e) { // This should never happen. throw new InternalError(); } } else { if (highlightEntry != null) { highlighter.removeHighlight(highlightEntry); highlightEntry = null; } } }
|
private void handleHighlight() { Highlighter highlighter = textComponent.getHighlighter(); if (highlighter == null) return; int p0 = Math.min(dot, mark); int p1 = Math.max(dot, mark); if (selectionVisible) { try { if (highlightEntry == null) highlightEntry = highlighter.addHighlight(p0, p1, getSelectionPainter()); else highlighter.changeHighlight(highlightEntry, p0, p1); } catch (BadLocationException e) { // This should never happen. throw new InternalError(); } } else { if (highlightEntry != null) { highlighter.removeHighlight(highlightEntry); highlightEntry = null; } } }
| 7,260
|
public void setDot(int dot) { if (dot >= 0) { Document doc = textComponent.getDocument(); if (doc != null) this.dot = Math.min(dot, doc.getLength()); this.dot = Math.max(this.dot, 0); this.mark = this.dot; handleHighlight(); adjustVisibility(this); appear(); } }
|
public void setDot(int dot) { if (dot >= 0) { Document doc = textComponent.getDocument(); if (doc != null) this.dot = Math.min(dot, doc.getLength()); this.dot = Math.max(this.dot, 0); this.mark = this.dot; clearHighlight(); adjustVisibility(this); appear(); } }
| 7,261
|
public VmInstanceMethod(VmInstanceMethod method) { super(method); if (!method.isAbstract()) { throw new IllegalArgumentException("Method must be abstract"); } }
|
public VmInstanceMethod(VmInstanceMethod method) { super(method); if (!method.isAbstract()) { throw new IllegalArgumentException("Method must be abstract"); } }
| 7,263
|
protected void createDefaultTheme() { setCurrentTheme(new DefaultMetalTheme()); }
|
protected void createDefaultTheme() { setCurrentTheme(new OceanTheme()); }
| 7,265
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", getControl(), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
| 7,266
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
| 7,267
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
| 7,268
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
| 7,269
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "Checkbox.select", getControlShadow(), "CheckBoxMenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "CheckBoxMenuItem.acceleratorForeground", getAcceleratorForeground(), "CheckBoxMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "CheckBoxMenuItem.background", getMenuBackground(), "CheckBoxMenuItem.borderPainted", new Boolean(true), "CheckBoxMenuItem.commandSound", "sounds/MenuItemCommand.wav", "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
| 7,270
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
| 7,271
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", getControl(), "Label.disabledForeground", getInactiveSystemTextColor(), "Label.disabledShadow", getControlShadow(), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
| 7,272
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
| 7,273
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", getMenuBackground(), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
| 7,274
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuBar.foreground", getMenuForeground(), "MenuBar.highlight", getControlHighlight(), "MenuBar.shadow", getControlShadow(), "MenuItem.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10), "MenuItem.acceleratorForeground", getAcceleratorForeground(), "MenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(), "MenuItem.background", getMenuBackground(), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
| 7,275
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "OptionPane.background", getControl(), "OptionPane.errorDialog.border.background", new ColorUIResource(153, 51, 51), "OptionPane.errorDialog.titlePane.background", new ColorUIResource(255, 153, 153), "OptionPane.errorDialog.titlePane.foreground", new ColorUIResource(51, 0, 0), "OptionPane.errorDialog.titlePane.shadow", new ColorUIResource(204, 102, 102), "OptionPane.foreground", getControlTextColor(), "OptionPane.messageForeground", getControlTextColor(), "OptionPane.questionDialog.border.background", new ColorUIResource(51, 102, 51), "OptionPane.questionDialog.titlePane.background", new ColorUIResource(153, 204, 153), "OptionPane.questionDialog.titlePane.foreground", new ColorUIResource(0, 51, 0), "OptionPane.questionDialog.titlePane.shadow", new ColorUIResource(102, 153, 102), "OptionPane.warningDialog.border.background", new ColorUIResource(153, 102, 51), "OptionPane.warningDialog.titlePane.background", new ColorUIResource(255, 204, 153), "OptionPane.warningDialog.titlePane.foreground", new ColorUIResource(102, 51, 0), "OptionPane.warningDialog.titlePane.shadow", new ColorUIResource(204, 153, 102), "Panel.background", getControl(), "Panel.foreground", getUserTextColor(), "PasswordField.background", getWindowBackground(), "PasswordField.caretForeground", getUserTextColor(), "PasswordField.foreground", getUserTextColor(), "PasswordField.inactiveBackground", getControl(), "PasswordField.inactiveForeground", getInactiveSystemTextColor(), "PasswordField.selectionBackground", getTextHighlightColor(), "PasswordField.selectionForeground", getHighlightedTextColor(), "PopupMenu.background", getMenuBackground(), "PopupMenu.border", new MetalBorders.PopupMenuBorder(), "PopupMenu.font", new FontUIResource("Dialog", Font.BOLD, 12), "PopupMenu.foreground", getMenuForeground(), "ProgressBar.background", getControl(), "ProgressBar.border", new BorderUIResource.LineBorderUIResource(getControlDarkShadow(), 1), "ProgressBar.font", new FontUIResource("Dialog", Font.BOLD, 12), "ProgressBar.foreground", getPrimaryControlShadow(), "ProgressBar.selectionBackground", getPrimaryControlDarkShadow(), "ProgressBar.selectionForeground", getControl(), "RadioButton.background", getControl(), "RadioButton.darkShadow", getControlDarkShadow(), "RadioButton.disabledText", getInactiveControlTextColor(), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "OptionPane.background", getControl(), "OptionPane.errorDialog.border.background", new ColorUIResource(153, 51, 51), "OptionPane.errorDialog.titlePane.background", new ColorUIResource(255, 153, 153), "OptionPane.errorDialog.titlePane.foreground", new ColorUIResource(51, 0, 0), "OptionPane.errorDialog.titlePane.shadow", new ColorUIResource(204, 102, 102), "OptionPane.foreground", getControlTextColor(), "OptionPane.messageForeground", getControlTextColor(), "OptionPane.questionDialog.border.background", new ColorUIResource(51, 102, 51), "OptionPane.questionDialog.titlePane.background", new ColorUIResource(153, 204, 153), "OptionPane.questionDialog.titlePane.foreground", new ColorUIResource(0, 51, 0), "OptionPane.questionDialog.titlePane.shadow", new ColorUIResource(102, 153, 102), "OptionPane.warningDialog.border.background", new ColorUIResource(153, 102, 51), "OptionPane.warningDialog.titlePane.background", new ColorUIResource(255, 204, 153), "OptionPane.warningDialog.titlePane.foreground", new ColorUIResource(102, 51, 0), "OptionPane.warningDialog.titlePane.shadow", new ColorUIResource(204, 153, 102), "Panel.background", getControl(), "Panel.foreground", getUserTextColor(), "PasswordField.background", getWindowBackground(), "PasswordField.caretForeground", getUserTextColor(), "PasswordField.foreground", getUserTextColor(), "PasswordField.inactiveBackground", getControl(), "PasswordField.inactiveForeground", getInactiveSystemTextColor(), "PasswordField.selectionBackground", getTextHighlightColor(), "PasswordField.selectionForeground", getHighlightedTextColor(), "PopupMenu.background", getMenuBackground(), "PopupMenu.border", new MetalBorders.PopupMenuBorder(), "PopupMenu.font", new FontUIResource("Dialog", Font.BOLD, 12), "PopupMenu.foreground", getMenuForeground(), "ProgressBar.background", getControl(), "ProgressBar.border", new BorderUIResource.LineBorderUIResource(getControlDarkShadow(), 1), "ProgressBar.font", new FontUIResource("Dialog", Font.BOLD, 12), "ProgressBar.foreground", getPrimaryControlShadow(), "ProgressBar.selectionBackground", getPrimaryControlDarkShadow(), "ProgressBar.selectionForeground", getControl(), "RadioButton.background", getControl(), "RadioButton.darkShadow", getControlDarkShadow(), "RadioButton.disabledText", getInactiveControlTextColor(), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
| 7,276
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
| 7,278
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
| 7,279
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
| 7,280
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
| 7,281
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
| 7,282
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
| 7,283
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
| 7,284
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
| 7,285
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
|
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", new ColorUIResource(getControlDarkShadow()), "Button.disabledText", new ColorUIResource(getControlDisabled()), "Button.focus", new ColorUIResource(getFocusColor()), "Button.font", getControlTextFont(), "Button.foreground", new ColorUIResource(getSystemTextColor()), "Button.highlight", new ColorUIResource(getControlHighlight()), "Button.light", new ColorUIResource(getControlHighlight()), "Button.margin", new Insets(2, 14, 2, 14), "Button.select", new ColorUIResource(getPrimaryControlShadow()), "Button.shadow", new ColorUIResource(getPrimaryControlShadow()), "CheckBox.background", new ColorUIResource(getControl()), "CheckBox.border", MetalBorders.getButtonBorder(), "CheckBox.icon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBox.checkIcon", new UIDefaults.ProxyLazyValue ("javax.swing.plaf.metal.MetalCheckBoxIcon"), "CheckBoxMenuItem.background", new ColorUIResource(getControl()), "CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(), "ToolBar.background", new ColorUIResource(getControl()), "Panel.background", new ColorUIResource(getControl()), "Slider.background", new ColorUIResource(getControl()), "OptionPane.background", new ColorUIResource(getControl()), "ProgressBar.background", new ColorUIResource(getControl()), "ScrollPane.border", new MetalBorders.ScrollPaneBorder(), "TabbedPane.background", new ColorUIResource(getControl()), "InternalFrame.border", new MetalBorders.InternalFrameBorder(), "InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(), "InternalFrame.closeIcon", MetalIconFactory.getInternalFrameCloseIcon(16), "InternalFrame.maximizeIcon", MetalIconFactory.getInternalFrameMaximizeIcon(16), "InternalFrame.iconifyIcon", MetalIconFactory.getInternalFrameMinimizeIcon(16), "Label.background", new ColorUIResource(getControl()), "Label.font", getControlTextFont(), "Label.disabledForeground", new ColorUIResource(getInactiveControlTextColor()), "Label.foreground", new ColorUIResource(getControlTextColor()), "Menu.background", new ColorUIResource(getControl()), "Menu.border", new MetalBorders.MenuItemBorder(), "Menu.borderPainted", Boolean.TRUE, "Menu.font", getControlTextFont(), "Menu.selectionBackground", getMenuSelectedBackground(), "Menu.selectionForeground", getMenuSelectedForeground(), "MenuBar.background", new ColorUIResource(getControl()), "MenuBar.border", new MetalBorders.MenuBarBorder(), "MenuBar.font", getControlTextFont(), "MenuItem.background", new ColorUIResource(getControl()), "MenuItem.border", new MetalBorders.MenuItemBorder(), "MenuItem.font", getControlTextFont(), "MenuItem.selectionBackground", getMenuSelectedBackground(), "MenuItem.selectionForeground", getMenuSelectedForeground(), "Panel.background", new ColorUIResource(getControl()), "RadioButton.icon", new UIDefaults.LazyValue() { public Object createValue(UIDefaults def) { return MetalIconFactory.getRadioButtonIcon(); } }, "RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(), "RadioButtonMenuItem.borderPainted", Boolean.TRUE, "RadioButtonMenuItem.checkIcon", MetalIconFactory.getRadioButtonMenuItemIcon(), "RadioButtonMenuItem.font", MetalLookAndFeel.getControlTextFont(), "RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2), "RadioButtonMenuItem.selectionBackground", MetalLookAndFeel.getMenuSelectedBackground(), "RadioButtonMenuItem.selectionForeground", MetalLookAndFeel.getMenuSelectedForeground(), "ScrollBar.background", new ColorUIResource(getControl()), "ScrollBar.shadow", new ColorUIResource(getControlShadow()), "ScrollBar.thumb", new ColorUIResource(getPrimaryControlShadow()), "ScrollBar.thumbDarkShadow", new ColorUIResource(getPrimaryControlDarkShadow()), "ScrollBar.thumbHighlight", new ColorUIResource(getPrimaryControl()), "SplitPane.darkShadow", new ColorUIResource(getControlDarkShadow()), "SplitPane.highlight", new ColorUIResource(getControlHighlight()), "Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0), "Slider.horizontalThumbIcon", MetalIconFactory.getHorizontalSliderThumbIcon(), "Slider.verticalThumbIcon", MetalIconFactory.getVerticalSliderThumbIcon(), "Slider.trackWidth", new Integer(7), "Slider.majorTickLength", new Integer(6), "TabbedPane.font", new FontUIResource("Dialog", Font.BOLD, 12), "TabbedPane.tabInsets", new InsetsUIResource(0, 9, 1, 9), "TabbedPane.selectedTabPadInsets", new InsetsUIResource(2, 2, 2, 1), "TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 6), "ToggleButton.background", new ColorUIResource(getControl()), "ToggleButton.border", MetalBorders.getButtonBorder(), "ToggleButton.darkShadow", new ColorUIResource(getControlDarkShadow()), "ToggleButton.disabledText", new ColorUIResource(getControlDisabled()), "ToggleButton.focus", new ColorUIResource(getFocusColor()), "ToggleButton.font", getControlTextFont(), "ToggleButton.foreground", new ColorUIResource(getSystemTextColor()), "ToggleButton.highlight", new ColorUIResource(getControlHighlight()), "ToggleButton.light", new ColorUIResource(getControlHighlight()), "ToggleButton.margin", new Insets(2, 14, 2, 14), "ToggleButton.select", new ColorUIResource(getPrimaryControlShadow()), "ToggleButton.shadow", new ColorUIResource(getPrimaryControlShadow()), "Tree.openIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.closedIcon", MetalIconFactory.getTreeFolderIcon(), "Tree.leafIcon", MetalIconFactory.getTreeLeafIcon(), "Tree.collapsedIcon", MetalIconFactory.getTreeControlIcon(true), "Tree.expandedIcon", MetalIconFactory.getTreeControlIcon(false), "Tree.font", new FontUIResource(new Font("Helvetica", Font.PLAIN, 12)), "Tree.background", new ColorUIResource(Color.white), "Tree.foreground", new ColorUIResource(new Color(204, 204, 255)), "Tree.hash", new ColorUIResource(new Color(204, 204, 255)), "Tree.leftChildIndent", new Integer(7), "Tree.rightChildIndent", new Integer(13), "Tree.rowHeight", new Integer(20), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.selectionBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.nonSelectionBackground", new ColorUIResource(Color.white), "Tree.selectionBorderColor", new ColorUIResource(new Color(102, 102, 153)), "Tree.selectionBorder", new BorderUIResource.LineBorderUIResource(new Color(102, 102, 153)), "Tree.nonSelectionBorder", new BorderUIResource.LineBorderUIResource(Color.white), "Tree.selectionForeground", new ColorUIResource(Color.black), "Tree.textBackground", new ColorUIResource(new Color(204, 204, 255)), "Tree.textForeground", new ColorUIResource(Color.black), "Tree.selectionForeground", new ColorUIResource(Color.black), "PopupMenu.border", new MetalBorders.PopupMenuBorder() }; defaults.putDefaults(myDefaults); }
| 7,286
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.