I'm creating toolbar with icons, but i face one problem: can't find how to load stock icons for buttons like save, open, new, ...
I know how to use my icons, but i don't want to create my own or find somewhere and i like applications with stock system icons.
I'm looking for cross-platform solution.
Besides, Dispaly.getSystemImage(), it is not currently supported by SWT (according to this bug report). You can look at the patches attached to the bug report and modify code for your platform to extract other icons/resources.
See Eclipse icons. They are licensed under EPS, so free to use.
Related
My CodenameOne app is mainly intended to be the iOS counterpart of an existing Android app. It is for older devices, in fact, as soon as possible, or in the future, a Swift app is going to replace it for OS 14>.
I need some customised icons and I have the svg code for it.
Initially I had to use the Flamingo tool, that converts svg files in Java classes.
I used it like
ScaleImageButton appButton=new ScaleImageButton(new AppIcon().scaled(doubleButtonSize,doubleButtonSize).toImage());
It is cumbersome but it does not even work on iOS.
So now I resorted to create png images for every icon in every dpi level, as it can also be done on Android.
I renamed the files so they follow the standard I think it is proposed in CodenameOne.
The possible names are:
verylow.png
low.png
medium.png
high.png
veryhigh.png
560.png
hd.png
2hd.png
4k.png
In the end it has to be used like
Image icon = theme.getImage("icon.png");
It seems that the images can be imported in the project in more than one way.
I was said to include them in the theme.
According to the CN1 developer guide I have to set the size for each.
If I import them as a whole (selecting the folder or selecting all images and hitting the "Open" button) in the theme editor a dialog appears with all wrong sizes (but they resemble a particular set of choice, although very unlikely).
They are not always the same sizes but neither they are defaulted according to the provided set of images.
I provide images as 24px, 36px, 48px, 72px, 96px, 144px, 192px, 288px, 384px for normal size icons, and also I provide double sized images for double size icons in my app (the values are not doubled as expected).
I also have to check "Square image" and "Preserve aspect ratio" options (my images are already square).
Then the strangest part is that there is a percentage, I see it is 20 for example.
The caption reads "will affect all entries". I understood that it is to scale images, that is what a developer just do not want, unless the developer has wrong sizes, but still proportioned among themselves, that cannot be the case I think.
However I do not need any scaling, the images are right as they are. I created them on purpose.
The developer guide is not enough clear to me.
So I am asking
is it right to tweak the wrong size to match the right ones, and what about the percentage?
This specific UI is a bit out of date by now and wasn't used much even when it was added. Most users opted to do desktop scaling for multi images.
The scale option is designed to scale down from a high resolution image on the desktop. You don't want/need that.
You don't need to edit the file. Just make sure to turn on the XML team mode and make sure your images use the right file names. Then once you save the images will appear in the resource file.
I suggest adding a multi-image using the standard method of add in the menu. Then replacing all the generated images with your copies and reopening the file, then saving again (the last save is important as it will override the res file).
I have been working on some icon packs for months & will be completed within a few days and I came across CandyBar dashboard.
I'm new learner for android and java. Still studying java & So not enough knowledge of programming but I read the tutorial on CandyBar's wiki page and understood about I guess 80%.
I understood how to configure that app according to my needs.
but I'm little bit confused regarding certain xml files.Tutorial didn't clearly explained which xml needs to be edited & which to be ignored & how to be edited to make my icons pasted in drawable folders to work on different launchers.
From this xda tutorial I understood, three xmls:-
/res/xml/drawable.xml ...........to make icon appear on app to let user select icons
/res/xml/appfilter.xml..................need to add activities in it of various apps
/res/values/iconpack.xml _________(Not available in CandyBar)...... why ?
so by editing 1 & 2 xml I'm able to make my icon pack work on nova launcher and few similar launchers but not on "go launcher", so I'm confused if I'm doing something wrong.
Same xml which are in assets folder too ! :( should I edit them ?
Just want some clarification regarding xmls anybody used it ? or know about it ?
all xml files picture
You can create your icons, right click and right click> New Asset Vector at the top Type of resource: vocaloisa two options Clip Art and Local File (SVG, PSD) by clicking the clip art icon You can do download your own computer with SVG or PSD in case you want a standard that android requires.
You can also import a PNG vector directly into the drawable mass if you can not generate the SVG or PSG, as it is a graph of one and not an image that needs several dimensions you can choose to import only 1 size and work in your By while the default is already 24dp x 24, but when the default is already being erased, 24dp x 24, when you have some impression at some point of view you leave these dimensions, but it is recommended to use the Android icons or whatever you want stay in a more elegant standard. so the icons come in xml and you can edit them if you know how to mechanize with pure xml
High resolution screens are old news, but for some reason we (and the Eclipse guys) ignored them until now. Well, we can't any longer.
What we want to do is create Eclipse applications that work for "normal" displays, but for high resolution ones, too. Right now the icons are way to small to see or click.
This bug links to this (rather sparse) documentation states we only need to use a new constructor for Image. Okay, so we need to create our own implementation of ImageDataProvider.
While that might work for the images we created ourselves, it does not work for the main tool bar icons.
So let's say we'll start a completely new application from scratch: how would we set up everything to make the toolbar work with the new API and so with all kinds of screens?
(There is a similar question, but it's from the perspective of an Eclipse user, while this question is from the perspective of a developer of an Eclipse application.)
When HiDPI mode scaling is in use anything using ImageDescriptor.createFromURL to load images will look for a image with #2x or #1.5x appended to the name depending on the current scaling (so, for example, remove.png and remove#2x.png). This is used to create an ImageDataProvider.
Eclipse will use this for the tool bar images and many other things.
netbeans platform has proved to be most useful for large applications. But what about small applications?
I'm building a small Price-List making software which only has one TopComponent which contains a JTable and a few buttons.
This component I've set to have closing/sliding etc disabled as this is mandatory to be there. I also DO NOT want to have ANY more top components.
Is there a way to remove the tabs? It seems pointles to show just one tab with the name of the TopComponent.
I hope you get what I mean!
Thanks in advance.
Molten Ice,
Geertjan Wielenga's blog is an invaluable source of information for the NetBeans Platform. He's written a post especially for this task:
http://blogs.oracle.com/geertjan/entry/farewell_to_space_consuming_weird
I've used this technique before and it works fine.
If you have any other questions related to the NetBeans Platform I would suggest that you try the Plaform Users section of the NetBeans forums.
I have found some nice dark themes for editing code in Eclipse (screenshot below), but they only apply to the code window itself. The package explorer and outline view are still white background. It would be great if there was some way to make everything dark, even the toolbar at the top. Is this possible?
Thanks,
Jonah
You can customise the user interface by creating a new appearance. This functionality is integrated into Eclipse, and comes with the 'classic' VS as well as the modern one by default. See http://andrei.gmxhome.de/skins/index.html for a custom appearance. You can probably change the colours of the component backgrounds with your own :)
In short: no, not really. SWT doesn't include any kind of skinning capability. If your OS has window color preferences, much of the Eclipse GUI will respect them, but I wouldn't guarantee all would. But you could certainly try using your OS's facilities, and see how far you get with that.
The Juno release of Eclipse (released 27 June 2012) makes it possible to change Eclipse's theme. The theme enables the possibility of changing every GUI color, even the toolbar at the top. The appearance of the editor was already possible. If you change both the theme and the editor's appearance with Eclipse Juno you can have a real nice looking dark theme.
This post has a simple 3 step proces to get a dark theme like this:
This will cost you less than 10 minutes to configure.