How to get the component as an image
i want to save my component as an image.
I add many components to a JPanel, write some string on it, etc etc.
Then I want it whole to be added as an image. How can I do it?
See:
http://forum.java.sun.com/thread.jsp?forum=57&thread=530815
http://forum.java.sun.com/thread.jsp?thread=426455&forum=31&message=1898276
http://forum.java.sun.com/thread.jsp?thread=443125&forum=20&message=1999960
http://forum.java.sun.com/thread.jsp?thread=450369&forum=32&message=2044632
http://forum.java.sun.com/thread.jsp?thread=475053&forum=20&message=2202147
http://forum.java.sun.com/thread.jsp?thread=469584&forum=425&message=2165447
http://forum.java.sun.com/thread.jsp?thread=481131&forum=57&message=2242633
http://forum.java.sun.com/thread.jsp?thread=527767&forum=425&message=2534389
http://forum.java.sun.com/thread.jsp?thread=514356&forum=57&message=2448607
Similar Messages
-
How we get the component at front or back in a Jpanel
How we get the component at front or back in a Jpanel. I want to manage the Z-axis position of the components in the Jpanel.
[url http://java.sun.com/docs/books/tutorial/uiswing/components/layeredpane.html]How to Use Layered Panes
-
F2 on Popups? (Or how to get the Component if F2 is not working)
Hello Experts,
I wonder if somebody has a tip how to get the component of popups?
The F2 Help is not working there.
The Popup I'm actually looking at is called by a button. Is it possible to find out the called component by looking at the button Event? (I have tried - but the source does not tell me any component)
Thanks for answers...
Regards
ChrisChris,
F2 should definitely work if it is a UI component.
You see pop ups on button clicks and F4 value helps. F2 should work in these cases.
For some attributes with F4 help, a DDIC search help is attached. Here F2 does not work.
Anyhow to find out which component it is calling, you use this method
check in the event handler(for button pop ups) or in the outbound plugs specifies in GET_V method(for F4 pop ups) if there is a code like
CALL METHOD comp_controller->window_manager->create_popup etc.,
A Component Usage will be passed to the method. You can check for the component usage in the Run Time Repository.
You will get the component details.
Regards,
Masood Imrani S. -
How to get the component name in webdynpro
Hi all,
how can i get the name of the webdynpro component. The component is being displayed in the portal. Now i need the component name for this.Can any one suggest of how to get this.
Regards,
Kalyan Chakravarthi.MHi ,
get the object of IF_WD_COMPONENT , by calling the method wd_get_api( ) of wd_component attribute , then call the method GET_COMPONENT_INFO( ) ,it will return the object of IF_WD_RR_COMPONENT in that call the method GET_NAME( ) .
Regards
Yash -
How to get the formatName of an image?
Hi,
I'm trying to write a little class which gets as input an image file (gif, jpg or png) and outputs a resized version of it. My aim is to output allways an image having the same format like the input one. I saw that ImageIO.write accepts as parameter the String formatName.
The question is how can somebody get the formatName for the input-image?
Thanks,
IMIAI'd like to have a method like this:
public static String resizeImg(String imgPath, Integer newWidth, Integer newHeight)
It gets as parameter the absolutePath to an image and the new width&height; it should resize the image and return me the absolute path to the resized image.
What I want is that in the case the imgPath points to a gif image the resized image should be a gif as well. If it's a jpg the resized img should be a jpg as well. The only one pb I have is to find out inside the resizeImg what format the imgPath image has, the rest would be clear.
Thanks for your help. -
How to get the Component id (HTMLB id)
Hi all,
I created an application that has two list boxes and one commend button. While clicking the button I need to know how many list items in the list box. Is this possible?
Anybody can guide me for this.
Helpful answer will appreciate.
Thanks & Regards,
Kathiresan Rhi,
In case you are using HTMLB controls what you are looking for is posible...
Do the below mentioned way...
As you need to get the number of items inside the selected list box on action of a button, it means first you need to catch the action generated by the button...
So inside your button, under button tage you can add/have a property called "OnClick("Method Name")"...
so now you define the method inside your controller...
public void method_Name(Event event)
//first het the list box ID:
ListBox lb=(ListBox)this.getComponentByName("Your_ListBox_Name");
now with ID
you can do,
int size=lb.getSize() //Returns the number of elements inside the list box...
for more information please have a look at the below thread...
[ListBox|http://help.sap.com/javadocs/NW04S/SPS09/hb/com/sapportals/htmlb/ListBox.html]
Regards,
Srinivas. -
IDVD quality update... how to get the best looking photo images on your TV
To get the best quality photo slideshow (that looks the best on my TV)
1) create the slideshow with music in "Photo to Movie" program
2) send it to IDVD from "Photo to Movie"
3) create the menu in iDVD
4) make a disc image from iDVD (file - save as disk image) save on the desktop
5) burn DVD at x2 in disc utilities on a Verbatim DVD-R disc
???? Any other suggestions to get a better quality product !!
* special thanks to SDMacuser for all your help and prior posts.
Cheers
iMAC 5,1,Intel Core 2 Duo,2.16GHz Mac OS X (10.4.8)
iMAC 5,1,Intel Core 2 Duo,2.16GHz Mac OS X (10.4.8)in search of the best looking photoslide show DVD to view on a TV..... a couple more questions
if I understand some of the recent posts to get a clear picture:
Question #1
I need to import all of the photos into photoshop CS (or a similar product) and resize them to 1280 x 960 (4:3)ratio then open iDVD and import them.
If I am doing Ken Burn effects then resize them to 2560 x 1920 and use "Photo to Movie" to create the slideshow then import into iDVD (to get a cool menu)
can you just bring the images in from iphoto (in the same format that they were imported from the camera)?
I am using a Nikon D70 6.0 megapixel
Question #2
If I burn the disc in iDVD... it is not as good as using Disk utility or Toast because of the burn speed (2X) ... is this correct? -
How to get the component who has caret?
I put more than one JTextField on the Panel.
I want to get the one who owns the caret of synchronized.look at it
http://java.sun.com/j2se/1.4.2/docs/api/java/awt/KeyboardFocusManager.html#getFocusOwner()
regards
Aniruddha -
How to get the size of an image?
yhanks
try something like:
// in case 'this' is a JComponent or something similar:
MediaTracker mt = new MediaTracker(this);
mt.addImage(myImg1, 1);
mt.addImage(myImg2, 2);
while (!(mt.checkAll(true))) {
try {
Thread.sleep(10);
} catch (InterruptedException iex) { }
// all loadedThis would load all images registered with the MediaTracker but also blocks execution of your program. You might want to start a different thread for this.
cheers,
kelysar -
Dashcode: How do I get the name of an image in a website?
I'm making a widget that gets the filename of an image on a website and it changes the value of some parts of the widget if the filename has a certain name. The only problem is that I don't know how to get the name of this image in the widget. Could somebody please help me?
If I understand well, I think that the XMLHttpRequest object may help you. Please check the following link:
http://developer.apple.com/internet/webcontent/xmlhttpreq.html
Also, if you can program in Perl (or some other scripting language), you can use an external script to read the filename and send it to your Widget.
Mihalis. -
Get the font names and image names in QXD
Hi,
How to get the font names and image name in Quarkxpress document file using java?.
Is any third party packages for getting font n image names in QXD?
thanks,
nithyartuck,
I believe this may solve it:
Open System Preferences and go to Accessibility. Next, select Display from the source list along the left, then check the box labelled Reduce transparency.
It was first presented in this post #15 by TheUlser:
https://forums.adobe.com/message/6854594#6854594 -
How to get the local file system path of an image that loaded into the image component in cq5?
Hi,
I'm having hard time uploading image from filesystem where as drag and drop works.
I'm not getting a path of image selected from filesystem.
here is my code..
private String populateImage() throws Exception {
if (currentNode != null && currentNode.isNode()) {
Node ImageNode = JcrResourceUtil.createPath(currentNode, "image",
null, "nt:unstructured", true);
imageUrl = ImageNode.hasProperty("fileReference") ? ImageNode.getProperty("fileReference").getValue().getString() : "";
imageUrl = imageUrl.trim();
log.info("MANAGE PROFILE BEAN IMAGE URL INSIDE IF IS: " + imageUrl);
} else {
imageUrl = properties.get("fileReference", "");
imageUrl = imageUrl.trim();
log.info("MANAGE PROFILE BEAN IMAGE URL INSIDE ELSE IS: " + imageUrl);
return imageUrl;
So if I drag and drop..
ImageNode.hasProperty("fileReference") is returning a valid path
but if I upload an image it is returning Null.
So how to get the path? any suggestions around would be appreciated...When you say path you mean you want the path to print out in your HTML? Is that accurate? If so you generally need to constructe that path based on the path to the current component. So if you component is located at /content/mysite/en/about/mypage/jcr:content/parsys/image then the path to the image would generally be something like /content/mysite/en/about/mypage/jcr:content/parsys/image.img.jpg/1283829292873.jpg. The .img. selector triggers the servlet associated with the foundation parbase - /libs/foundation/components/parbase/img.GET.java. The reason you reference it this way is that there is no filesystem path to the image - it is stored in the repository not on the file system, and it requires a servlet or script to ge the binary from the repository and steam it.
Normally the way you'd construct this is to use the out of the box Image class - so look at /libs/foundation/components/image/image.jsp. Now this example assumes that your component where you loaded the image extends /libs/foundation/components/parbase. If it doesn't then you either have to change your sling:superResourceType to /libs/foundation/components/parbase or some other component that does exten /libs/foundation/components/parbase. -
How to get the parent of a component in fx?
Here is an example:
Index.fx:
Stage {
title: "Online book library";
width: 1024
height: 768
scene:Scene {
fill: Color.WHITE
content: [
banner ,
login = Login{translateX:715 translateY:135}
};Login.fx:
var logOn : Button = Button {
translateX:25 translateY: 170
text: "Log On"
font: Font {size:11 name: "Verdana Bold"}
action: function() {
showHello();
function showHello(){
// add a label in index.fx whose text is "welcome!";
}I want to show something on the index.fx but I don't know how to get the parent from the child component?
In Flex, we use parent or parentApplication, Is there a similar function in JavaFX?Reusing the same Tile example, I had no problems, I suppose I was doing wrong the first time:
def IMAGES_WIDTH = 100;
def IMAGES_HEIGHT = 100;
var COLUMN_NB = 3;
var ROW_NB = 3;
var scene: Scene;
var previews: Container;
Stage
title: "Test of Tile layout"
scene: scene = Scene
width: 500
height: 500
fill: Color.LAVENDER
content:
previews = Tile
hgap: 10
vgap: 10
layoutX: bind (scene.width - previews.width) / 2
layoutY: bind (scene.height - previews.height) / 2
columns: COLUMN_NB
content: for (i in [ 1 .. COLUMN_NB * ROW_NB ])
ImageView
id: "IV{i}"
image: Image
url: "{__DIR__}clock.gif"
width: IMAGES_WIDTH
preserveRatio: true
onMousePressed: Hide
function Hide(evt: MouseEvent): Void
println("{evt.node} ({evt.node.id}) - {evt.node.parent}");
var nm: Node = evt.node.parent.lookup("IV5"); // Middle node
nm.visible = false;
var ntl: Node = evt.node.parent.lookup("IV1"); //Top left node
(ntl as ImageView).viewport = Rectangle2D { height: IMAGES_WIDTH/2, width: IMAGES_WIDTH/2 };
(evt.node.parent as Tile).hgap = 20; // Strange effect, but works
} -
How to get the floor plan in Webdynpro component ?
Hi,
How to get the floor plan in Webdynpro component ?
Best Regards,
TripathiHi,
Just copy the templates from Webdynpro Component by choosing OIF or GAF or QAF template.
Regards,
Bansidahr -
How to get the image stored in archieve link as an attachment in work item.
Hi All,
through transaction OAWD we are storing scanned images.
Once this transaction is executed a workitem appears in the inbox of the initiator with the scanned invoice as attachment.
When the user executes the work item FV60 screen is displayed where the user enters the data based on the scanned invoice attachment.
After the user Parks the document the custom workflow triggers and a workitem appears in the inbox of an approver.
Our requirement is that the scanned image should also appear as the attachment.
Can you please suggest how to get the image stored in archieve link as an attachment in work item.
Regards
ShraddhaHi Martin,
with every parked document a scanned image is linked.
I need to create a link under objects and attachments in the work item, such that when the user clicks that link the image is displayed.
At present the following functionality is available.
The BO used is FIPP
Objects and attachments:
parkeddocument:AK0108500001252008.(via FIPP binding with WIOBJECT_ID)
On clicking the link below objects and attachments: the parked document AK0108500001252008 opens in display mode.
Now we want to have 2 links:
parkeddocument:AK0108500001252008.
image.
When we click on the link image then the scanned invoice linked to the document should get opened.
I am able to get the image id of the the image through SAP_WAPI_GET__OBJECTS,
export parameter leading_object provides the detail.
But I am not able to figure out how to use it in my workflow to display it as an attachment.
Hope this will give a better understanding of my question.
can you please suggest as to how I should proceed with it.
Maybe you are looking for
-
How do I use my third computer with cloud. I am rendering a project in Avid Media composer
How do I get my third computer to work with when I am rendering Avid project on the other two computers computers
-
Next Slide Problem with Flash In PowerPoint
When I embed a Flash file into a PPT presentation and play Slide Show, my page down (Slide Show advance) key doesn't work once the animation is underway. If I mouse-click the outside borders, it advances properly. Any suggestions on preventing this?
-
I'm unable to deauthorize my computer. Getting an error message "Unable to erase authorization. Please try again after some time."
-
IMac Sleep Problem Waking - Screen Black and Pixelization
I am having a screen problem "waking" my iMac (2010 model) After the iMac is in (deep?) sleep mode (I have it set to enter a password after sleep mode) Screen is blank/off I "wiggle" my mouse or trackpad Screen is still blank (sometimes it may displa
-
Hi All, I have a question like is there any role like that we have first do MIGO (Goods Receipt) and then go to MIRO (invoice receipt r verification) r we can do either of them first. Please give me clear clarification on this. Thanku