I am trying to create a custom Paper size in JavaFX 12.
The older method would require using the PrintHelper class and the Units class which exists in the package com.sun.javafx.print. However in a JavaFX 11+, this package is not exported and as a result I cannot use these classes.
What are the alternatives to this classes in JavaFX 11+ ? every time I search I get the result from JavaFX 8, which are not helpful in the scenario
Thank to you , your post has steered me to the right direction .
I suppose , to create a new Paper , you are going to use PrintHelper.createPaper(String , double , double , Units) to access the private constructor of Paper.
However, somewhere along the way , we got the message:
class YourClass (in unnamed module #0x2feb050e) cannot access
class com.sun.javafx.print.Units (in module javafx.graphics)
because module javafx.graphics does not export com.sun.javafx.print
to unnamed module #0x2feb050e
By simply adding --add-exports javafx.graphics/com.sun.javafx.print=ALL-UNNAMED into VM option should fix the problem .
hope that I am not too late to answer your question .
Related
I want to use an icon image like in TourDeJewel, but when I use this code then the text "MENU" is showing instead of icon picture. (sdk 0.9.6)
<j:IconButton >
<j:icon>
<js:FontIcon text="menu" material="true"/>
</j:icon>
</j:IconButton>
After check with browser inspector tool then material-icons css is missing
Could someone tell me why ?
Thank you in advance...
To get the CSS linked automatically you need to use MaterialIconType class at least one time so compiler can process it.
The reason is that class has an inject_html directive in its constructor so when the compiler finds it includes it automatically.
In Tour De Jewel we use that class through binding:
<j:IconButton click="drawer.isOpen ? drawer.close() : drawer.open()">
<j:icon>
<js:FontIcon text="{MaterialIconType.MENU}" material="true"/>
</j:icon>
</j:IconButton>
(Note in that file we use a binding bead at top level to make the binding work (i.e: <js:ContainerDataBinding/>).
If you don't want to use MaterialIconType you can link it manually using a custom html template.
I'm trying to build websphere message broker however I've stumbled into weird issue. When using mqsicreatebar to create BAR file the build returns following error trice (three times, with different problem number):
Problem 22: Resource - /ErrorHandlingLib/error/handling/ErrorHandler.subflow; Error message - Class should inherit from MbJavaComputeNode..
I have found solution for this in one of the forums which stated that adding full class path to MbJavaComputeNode (as in: extends com.ibm.broker.javacompute.MbJavaComputeNode) the problem should be solved. However it was older wmbt version and neither this, neither any of the new IBM released wmbt fixes helped.
The error printing three times is probably because Java compute node in the sublfow is used in three different routes.
Websphere message broker toolkit used is v8.0.0.5
The classes, that you assign to the Java Compute nodes in your flows must extend the MbJavaComputeNode class.
This error says that you have some Java Computes that are not referencing such classes.
I suggest creating the classes for the Java Compute nodes with the wizard, which starts when you double click a newly inserted Java Compute node which has no class assigned to it.
Well I am confused because should be a no brainer.
In Xcode 5 I start a new iphone project.
In ViewDidLoad I begin typing:
NSImage *image ...
Actually at the point of "NSI" ... the NSImage is not available.
I see many other options like NSInteger etc...
So from the start I cant create a NSImage object.
Ok so I look at documentation for NSImage and it clearly says object is declared in both following packages (why are there 2 declarations and which one should I use)
Declared in NSGraphics.h
NSImage.h
but I am not allowed to import any of these packages.I just get red line next to it when I try to do that.
So if I am not allowed to import this package ... why does the documentation give me information about the package that it is in. I am sure I should be able to use it ??
So what daft thing am I doing ?
NSImage.h is an OS X class. You should be using UIImage, NSImage's iOS equivalent. This can get confusing considering a lot of the "NS" prefixed names are shared between iOS and OS X, but an easy way to determine what is available is to have a look at the iOS class references for Foundation.framework or UIKit.framework.
You can also expand the headers group in the frameworks group in Xcode's file inspector to see what headers are available to you.
I'm trying to write a custom field editor that will translate between Long and String. IE: String representation on screen but field type is a Long.
I've implemented the PropertyEditor (HrMinPropertyEditor) but don't know how to wire it in. My HrMinField is quite clunky as I needed to use a TriggerFieldCell because the generic types inside TextInputCell etc. prevented me from using them.
Do I need to do a subclass of ValueBaseInputCell? That seems strange since my PropertyEditor has all the Long / String conversions. It also looks difficult.
If so, is there a simple example or some documentation I can read?
BTW, my learning project is Maven based and should be easy to fire up if necessary:
svn checkout http://subversion.assembla.com/svn/freshcode_public/learn/gwt/ learn-gwt
cd learn-gwt
mvn gwt:run
Navigate to GXT | Forms | Time Edit
Thanks in advance,
Pete
PS: I've asked this on the Sencha forum too.
You should use method setPropertyEditor from Field class to specify your custom property editor:
HrMinField f = new HrMinField();
f.setPropertyEditor( new HrMinPropertyEditor() );
I managed to come up with a solution using a Converter and a Validator.
The more complete answer is on the Sencha thread.
I'm very new to XNA. Actually I have XNA 4.0 book by kurt jaegers, so i installed VS 2010 and XNA 4.0 and wrote my first program. But that program didn't run successfully,it kept displaying the ContentLoadException file not found. So i did a bit of research on web and found that there is some issue with XNA 4.0. So I uninstalled the VS 2010 & XNA 4.0 and installed VS 2008(express edition) & XNA 3.0 . Then I compiled my first program on it and i ran successfully.
But,now I'm facing the same problem again with my new projects. I've tried both Syntax :
xx = this.Content.Load<Texture2D>("TitleScreen");
xx = Content.Load<Texture2D>(#"TitleScreen");
And there is no spelling mismatch problem. Please Mods guide me. And please tell me why I'm getting this problem again and again.
System Specs :
XP sp3,i3,2gb RAM.
Content that you want to load into via the ContentManager needs to be in the content project. Pretend for a moment it looks like this
Mygame.Content > SomeFolder > textureName
You would use content.Load<Texture2D>("SomeFolder/textureName") to get to it. If it was at the root of the Content project content.Load<Texture2D>("textureName") will work. If (and since) it isn't there are 2 things to check
Right click on the texture and go to properties. Look at the AssetName properties. This is what you use to load it up via the Content Manger. Try using whatever this name is.
The root directory the Content Manager looks in is "Content". Look at Content.RootDirectory and see what it is. If it isn't "Content" change it to that. That could also work.
In order to properly load content, you'll need to use the generic method
ContentManager.Load<T>
For example, if you're trying to load a Texture2D element, Use the following syntax:
Texture2D texture = Content.Load<Texture2D>("textureName");
Read more about loading content in this link.
There is a known issue with ContentManagers instanced by anything other than the default Game object constructor, which cause the problem you are experiencing.
If you are indeed using a ContentManager object other than the one supplied on the Game object, the solution is:
When you instantiate the ContentManager, you should set it's RootDirectory property to
#"Content"
Hope it helps