How to Snapshot a Node not in FX-Application-Thread?
Hi,
is it possible to take a snapshot of a node if the method is called outside the FX-Application-Thread?
If I try something like ...
Task task = new Task<Void>() {
@Override
public Void call() {
WritableImage nodeImage = wpImage_XXL.snapshot(paramsSnapShot, null);
};i got this Exception.
java.lang.IllegalStateException: Not on FX application thread; currentThread
Any workaround, thanks in advance
Michael
You can't make this call from outside the FX Application Thread, and you really don't want to. If you could, you might end up with a partially-rendered image. Or perhaps worse, if the node were in the process of being resized, the width, height, and actual rendered content of the node could potentially be inconsistent. And there's probably a whole myriad of other things that could go wrong that I can't imagine.
From your application Thread (i.e. your Task), you can arrange for the code to be executed on the FX application thread using Platform.runLater(...):
Task task = new Task<Void>() {
@Override
public Void call() {
Platform.runLater(new Runnable() {
public void run() {
WritableImage nodeImage = wpImage_XXL.snapshot(paramsSnapShot, null);
};If there is a significant amount of processing to be done once you've received your WritableImage (and I assume there is, and this is why this is being executed in a Task), then there is a version of the snapshot(...) method which takes a Callback. From the FX Application Thread, you can do something like this:
Callback<SnapshotResult, Void> processSnapshotCallback = new Callback<SnapshotResult, Void>() {
@Override
public Void call(SnapshotResult result) {
final WritableImage image = result.getImage();
// Launch Task to process image on new Thread
return null ;
wpImage_XXL.snapshot(processSnapshotCallback, paramsSnapShot, null)
Similar Messages
-
I received a fitness device and downloaded the software. It didn't download to my Applications folder and I wasn't smart enought ot make sure I saved it there. Now the device doesn't work and I want to uninstall the software. I tried dragging and dropping the icon from Launchpad but that doesn't work. This lomg-time PC user turned Mac lover needs hlep!
well this is strange, but hang with me a sec. Some of these will sound obvious but i have to ask them.
1) Are you 100% sure it's not in your application folder? (I have downloaded stuff and looked for a while without seeing the app RIGHT in front of me).
2) The hard thing to believe is that it is in your launchpad but NOT in your application folder.
3) Try downloding it again....it might find the detect the old version and overwrite it. I have never downloaded an app that did not automatically download to the applications folder, but if this one did, check to see what option it gives you to dowload to by default. That way you can see maybe where it was installed to, and thus find it and delete it. then reinstall to the applications folder.
let me know -
How to delete and avoid notes in mail application
CAN ANYBODY HELP ME ON THIS SUBJECT PLEASE
If your question is: How do I remove notes from my inbox?
Then go to Mail > Preferences > Accounts tab > click your account on the left > Mailbox Behaviors tab > Uncheck "Show notes in Inbox". -
I want to erase all my files on my old MacBook Pro but not lose the applications.
I just bought a new MacBook Pro Retina. I was to erase all my files off my old MacBook Pro and give it to my cousin. However, I don't want to lose the programs, like Microsoft Office, because I don't have the disks to reinstall them. Anyone know how to erase everything but not lose the applications? Or do I just go manually through each file and delete?
What i would do is wipe the computer by going into recovery mode, then erasing the HD and formating it to Mac osx extended(journaled) then reinstall the operating system. After this is complete, just download a trial of office and enter your product key so you won't need the disk. But if you don't have the product key either then you would have to manually delete everything.
-
How to create a node with attributes at runtime in webdynpro for ABAP?
Hi Experts,
How to create a node with attributes at runtime in webdynpro for ABAP? What classes or interfaces I should use? Please provide some sample code.
I have checked IF_WD_CONTEXT_NODE_INFO and there is ADD_NEW_CHILD_NODE method. But this is not creating any node. I this this creates only a "node info" object.
I even check IF_WD_CONTEXT_NODE but i could not find any method that creates a node with attribute.
Please help!
Thanks
GopalHi
I am getting the following error while creating a dynamic context node with 2 attributes. Please help me resolve this problem.
Note
The following error text was processed in the system PET : Line types of an internal table and a work area not compatible.
The error occurred on the application server FMSAP995_PET_02 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: IF_WD_CONTEXT_NODE~GET_STATIC_ATTRIBUTES_TABLE of program CL_WDR_CONTEXT_NODE_VAL=======CP
Method: GET_REF_TO_TABLE of program CL_SALV_WD_DATA_TABLE=========CP
Method: EXECUTE of program CL_SALV_WD_SERVICE_MANAGER====CP
Method: APPLY_SERVICES of program CL_SALV_BS_RESULT_DATA_TABLE==CP
Method: REFRESH of program CL_SALV_BS_RESULT_DATA_TABLE==CP
Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE_DATA of program CL_SALV_WD_C_TABLE_V_TABLE====CP
Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
Method: IF_SALV_WD_COMP_TABLE_DATA~UPDATE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
Method: IF_SALV_WD_VIEW~MODIFY of program CL_SALV_WD_C_TABLE_V_TABLE====CP
Method: IF_SALV_WD_COMPONENT~VIEW_MODIFY of program CL_SALV_WD_A_COMPONENT========CP
My code is like the following:
TYPES: BEGIN OF t_type,
CARRID TYPE sflight-carrid,
CONNID TYPE sflight-connid,
END OF t_type.
Data: i_struc type table of t_type,
dyn_node type ref to if_wd_context_node,
rootnode_info type ref to if_wd_context_node_info,
i_node_att type wdr_context_attr_info_map,
wa_node_att type line of wdr_context_attr_info_map.
wa_node_att-name = 'CARRID'.
wa_node_att-TYPE_NAME = 'SFLIGHT-CARRID'.
insert wa_node_att into table i_node_att.
wa_node_att-name = 'CONNID'.
wa_node_att-TYPE_NAME = 'SFLIGHT-CONNID'.
insert wa_node_att into table i_node_att.
clear i_struc. refresh i_struc.
select carrid connid into corresponding fields of table i_struc from sflight where carrid = 'AA'.
rootnode_info = wd_context->get_node_info( ).
rootnode_info->add_new_child_node( name = 'DYNFLIGHT'
attributes = i_node_att
is_multiple = abap_true ).
dyn_node = wd_context->get_child_node( 'DYNFLIGHT' ).
dyn_node->bind_table( i_struc ).
l_ref_interfacecontroller->set_data( dyn_node ).
I am trying to create a new node. That is
CONTEXT
- DYNFLIGHT
CARRID
CONNID
As you see above I am trying to create 'DYNFLIGHT' along with the 2 attributes which are inside this node. The structure of the node that is, no.of attributes may vary based on some condition. Thats why I am trying to create a node dynamically.
Also I cannot define the structure in the ABAP dictionary because it changes based on condition
Message was edited by: gopalkrishna baliga -
How to edit the node value of a tree in webdynpro java
Hi ALL
I have Tree UI element where i got displayed all the nodes by calling the BAPI
Now my requirement is when i put the cursor at any node in the Tree struture then on click of insert button i need to insert the new node with the text , the user has to be option to give new text for the new node dynamically , so while adding the new node in a tree the tree has to choose the text for new node , like how to edit the node of a tree to add new text.
If any one can send the sample code on the same then it would be great help to me.
Similar requirement like in table UI Like however we are adding the new row in a table when we click on the insert button then cursor will go to that new row in a table where user can enter his details in the table.. now i am looking for the same requirement in a Tree UI element.
is it possible the same requirement in tree UI element in webdynpro for Java??
Thanks
kallki reddyHi kallki reddy
In general I think this is not possible in the form you'd like. It seems the Tree control is read-only thing always. It cannot provide editing capabilities.
Table is different thing. You can select within many different cell editors including Input Fields.
I guess that you scenario could be implemented not with Tree control, but with Table with Master Column. The master column allows to bring up a hierarchy into a plain table. So it's just a tree inside a table.
Here you can find further details: [TreeByNestingTableColumn API|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/92/12a74046033913e10000000a155106/content.htm]
BR, Siarhei -
How to traverse repository nodes in weblogic 8.1
hi ,
like binary search tree , how to traverse all node in repository .(can have many hierarchy node or content node ) .
i have to traverse all content and hierarchy node .hi raj ,
actually i have to traverse a node in repository 8.1 ,(like binary search tree).
like u got a node then u have to check that how many content node /or hierarchy node it have , then check each of its content node/hierarchy node , then again check its child status (content/or hierarchy )same like binary search tree traversal .
i try to make recursive code for that but not working properly , its searching at 2/3 levels , not at all levels .
so if u can make recursive method for that i 'll appreciate u .
thanks
attaching my code for little help :
public static void searchNode(Node node){
if(node.getType()==Node.HIERARCHY){
try{
System.out.println( " Hierarchy content +node.getName());
n=node.getChildren();
for(int i=0;i<n.length;i++){
System.out.println("child "+n.getName());
searchNode(n[i]);
catch(Exception e)
System.out.println("");
else //node.getType()==Node.CONTENT
try{
Property p[]=node.getProperties();
for(int i=0;i<p.length;i++)
if(p[i].getValue() !=null && p[i].getType() == Property.BINARY )
System.out.println(" got property file " + p[i].getValue());
fname=p[i].getValue().toString();
System.out.println(" adding "+fname+" these file to array list " );
al.add(fname);
System.out.println(" file added ");
catch(Exception e) -
How to remove a node from nlb at runtime?
hello,
i need to temporally exclude a node from an nlb.
May happen that a server is up and working but the web application i'm balancing is out of sinch with the same application in the others nodes.
Eg. some static variables are not the same of the same static variables of other nodes, because of a timeout, a write error and so on but the server is still working.
in this case i need to stop the server from nlb because the information in the web application is not in sinch with other nodes.
I need to prevent users from being serverd from this out to date server, untill it will became updated, but i need to do this programmatically
how can i do it?"DuoMi" <[email protected]> wrote in message
news:gnojbf$2sg$[email protected]..
> How to remove a node from XMLList
>
> I want remove the first node from XMLList
>
>
> and how to get the combobox all values string:
>
> <data>
> <value>2</value>
> </date>
> <data>
> <value>5</value>
> </date>
> <data>
> <value>8</value>
> </date>
>
> I need a string whit value "2,5,8"
>
> thkan you.~
I think something like
comboBox.dataProvider..value.toString()
will work. -
How to remove target node if source field value is empty SAP PI Mapping
Hello,
how to remove target node if source field value is empty in graphical Mapping.
Like if
MIddle name in source filed is empty, I would like to eliminate target field from out put XML.
Thank you
JohnHi Jhon,
If you want to remove all empty tags and you dont to complicate your message mapping, you can use a XSL, after the message mapping, to remove all the empty tags:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="*[not(@*|*|comment()|processing-instruction())
and normalize-space()='' ]"/>
</xsl:stylesheet>
Regards -
How to create a node-typed XmlValue from a String with Java?
Hi all,
It's already been a while since I'm trying to get how to construct a node-typed XmlValue from a String value but I keep getting different exceptions no matter what method I try.
I started with the first way that came to my mind:
XmlValue value = new XmlValue("<element/>"); //Even though the String represents a valid xml node, calling value.isString() returns true.
then I thought ok, so I should maybe use the typed constructor:
XmlValue value = new XmlValue(XmlValue.NODE, "<element/>"); //_It does not work either, calling value.isNull() returns true.
I also tried with the rest of types (XmlValue.DOCUMENT, XmlValue.DOCUMENT_NODE, XmlValue.ELEMENT_NODE.....) and it did not work either with any of these.
Fiinally I saw that you can construct a new XmlValue from a XmlDocument but I cannot get a XmlDocument unless I phisically create one, which obviously wont be a very good idea.
So I'm definitely stuck with these, I would really appreciate if someone could tell me how to do this...
Thanks in advance,
Pablo Pareja
PS: I'm using Berkeley dbxml 2.5.13Hi Pablo,
XmlDocument doc = manager.createDocument();
doc.setContent("<bla/>");
XmlValue val = new XmlValue(doc);
System.out.println(val.getType() == XmlValue.NODE);
System.out.println(val.asString());Try this. It doesn't create physically (that is in the container) a document. The output of this piece of program:
true
<bla/>Hope it helps
Vyacheslav -
Requested node not found in configuration file
The following warning appears when I instantiate the ReportClientDocument object:
[main] WARN com.businessobjects.reports.sdk.JRCCommunicationAdapter - Requested node not found in configuration file
This looks to me like a configuration issue. How can I get rid of it?Please read the rules of engagement and add all of the missing info. I'm assuming you are developing in Java so moved your post to the Java forum.
-
Local node not included in the list of host names for grid installation
I'm attempting to install clusterware on Solaris 11 on 2 nodes. I've tried tweaking the /etc/hosts file in a few different ways by including the fully-qualified name and without it for the localhost, but it still gives me this error every time. The runcluvfy.sh script doesn't run on Solaris 11. Does anyone know how to get around this problem?
I've tried this using the silent install and with OUI, but got the same error both ways. This is the format of the node names:
oracle.install.crs.config.clusterNodes=myLocalNode:myLocalNode-vip1,myOtherNode:myOtherNode-vip2
[FATAL] [INS-40907] Local node not included in the list of host names for grid installation.
CAUSE: The local node (the node where you are running the installer) was missing from the list of host names you provided.
ACTION: Include the local node in the list of host names for grid installation.
Edited by: 982828 on Jan 18, 2013 1:18 PMHi,
what Oracle Version are you trying to install?
Best to directly start with 11.2.0.3 and look in MOS for certification, hints requirements.
Regards
Sebastian -
Integration of service processing with warranty claims node not appearing
Dear experts,
Plant Maintenance and Customer Service => Maintenance and Service Processing => Integration of Service Processing with Warranty Claims
Integration of service processing with warranty claims node not appearing in SPRO.We are using ECC 6.0.How should we get this node?
regards,
ashrafHi,
It will not be in core solution. As far as I know you need Aerospace & Defence solution (DIMP) for this functionality.
-Paul -
How to make all nodes in a detailed navigation tree open automatically??
Dear All,
I have added some iViews to two folders and add these two folders to a workset "Time" and then add "Time" to the role of Employee portal user.
How to make all nodes expanded automatically when this workset is clicked in EP??
thanks,
ZitaNot surprising...it does not work even if you follow the exact way...
Role ->
Workset 1
-> Page 1
-> Workset 2
-> Page 2
-> Workset 3
-> Page 3
When the user clicks on Role which is the Entry Point, I want the user to see Page1 (works alright) and want the tree node Workset 2 open (doesn't work)...I want tree node Workset 3 closed (which is what happens...)
The thing is Workset 2 has to be open...
This is what I've done...I've made the Initial State of Navigation Panel set to "Open"...
What else is to be done????
Thanks a lot.
JP -
Primary ISE node (Serving Admin and Monitor personas) is showing two of the PSNs as "NODE-NOT-REACHABLE" under Replication Status on Deployment page on GUI. It can ping the PSNs and PSNs are actually registered to the Primary admin/monitor node. How can I fix this?
Thanks,
KashishHi,
I found the issue on ny network and it was due to a different dns record.
Simple way to check is issuing a dns lookup from admin node cli of the problem node. Then repeat from problem node attempting to resolve admin node.
Then if that looks good you can issue the command on both nodes...
Show logging application ise tail,
That output should give you a listing of the nodes in the ise deployment and the ip addresses of each node.
Thanks.
Sent from Cisco Technical Support Android App
Maybe you are looking for
-
Passing complex object from JavaScript to Flex
Is it possible to call a Flex function (defined with ExternalInterface.addCallback) and pass a complex object from Javascript? The properties of the object are all simple types, but the object itself is an array of objects. For example: <script typ
-
Customer returns items after A/R invoice has closed
Hi I want solution for sales if Customer returns items after A/R invoice has closed. (i.e payment has ok). Pls. provide me solution.
-
How do I transfer music from different iTunes accounts on different computers?
How do I transfer music from different iTunes accounts on different computers?
-
Log & Capture -- audio out of sync
We are editing a feature doc...we logged & captured a few tapes. We are not certain of the fps rate that the DV was shot. We are told it is 24p. We are working off of dubs...if that makes a differnce??? When we do a advanced pulldown the audio is rea
-
ExceptionInInitializer when running Jar
Hi, I have developed an application which uses jdk1.4,jai and 2 classes from the jai demo classes. My application does not work when I create a jar however it does otherwise. I have included the jai_codec.jar and jai_core.jar classes in my jar. When