How to check width of loaded image
Hi my script loads an image like this:
image = new Sprite();
imageLoader = new Loader;
imageLoader.load(new URLRequest(imageList.image[1].imgURL));
image.addChildAt(imageLoader, 0);
how can i check the width of loaded image? trace(image.width) gives 0...
You need to wait until the image is loaded before you can try to ffind its width. To do that you need to use the contentLoaderInfo property of the Loader class
imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, manageImage);
The manageImage event handler function is where you can check things since it is triggered after the object is loaded.
Similar Messages
-
How to replace wecenter default loading image(ss.gif).
Hi All ,
I am working on webcenter customization .
Can anyone provide me how to replace webcenter default loading image which appears before webcenter content gets loaded .
Appreciate any prompt response .
Thanks ,
Arun.If it's the splash screen you speak of, a custom skin defining these selectors may work - af|document::splash-screen, af|document::splash-screen-content, af|document::splash-screen-message and af|document::splash-screen-icon.
Please note that I have not tried these myself. -
How do I make a loader image similar to those shown at program opening?
I'm looking to build a loader image, that opens up at the start of my script, and automatically closes after a few seconds. I opened up the image processor script to see how Adobe has added images to alerts, but it's an extensive doc, and I couldn't tell where the image was being pulled from, as the variable only shows up twice, and is only called, and not set. Also is there another method other than alert to call a box like this? I would prefer it have no buttons.
I was able to boil your script down, to what I need. Works great in extendscript, but for some reason, only shows a portion of the image in photoshop and illustrator. This was happening even before i boiled it down. Thoughts? The last thing I'm trying to do with it, is figure out if I can set a transparent background for the window. I also tried using backgroundColor, but was unable to set the attribute correctly... there is a lot to learn with Adobe scripting. I also couldn't find reference to what DELTA_H is, I have a bunch of their PDFs, and googled, but couldn't find reference to this. I'm trying to be resourceful so I don't have to ask such remedial questions.
Here's the revised script, and a link to the image I labelled test on my desktop: http://img2.wikia.nocookie.net/__cb20110725041802/logopedia/images/8/89/Logo_rolling_stone s.png
PreviewWindow = function() {
w = 285;
h = 313;
PreviewWindow.DELTA_H = 1;
PreviewWindow.open = function(file, w, h, title, ms) {
PreviewWindow.openFile(file, w, h, title, ms);
PreviewWindow.openFile = function(file, w, h, title, ms) {
var type = (ms > 0) ? 'palette' : 'dialog';
var win = new Window(type, title || "Preview: " + decodeURI(file.name),undefined,{borderless : true});
win.preview = win.add('image', undefined);
win.preview.icon = file;
win.show();
if (ms > 0) {
$.sleep(ms);
delete win;
$.gc();
PreviewWindow.open("~/Desktop/test.png", undefined, undefined,
"Preview Test", 500); -
How to check the DPI for images on pages
hi,
I want to check the DPI for images programatically, is there any function available in acrobat SDK,
If not what other option we have to check the DPI for images programatically.
Thank you,You don't mention which parts of the SDK, but you can use the Preflight feature of Acrobat via either JavaScript or C/C++ (plugin) to generate a report of images in a document and their information (including dpi).
You can also write a plugin to iterate over each image individually and get its properties. -
How do you size dynamically loaded images?
Hi,
I am loading images from mysql into flash using php, I need
to make thumbnails out of these images, so they need to be resized
as they are loaded in and then displayed to one set size. Does
anyone have any ideas?
thanks
GavinJan-Paul K>
i thought it was _xscale & _yscale?
thahip>
if what you need is "one set size", then use _width &
_height. -
How to calculate width of imported image
I use the code below to layout 12 imported images. The code works fine as long as the images have a consistent width. However, the widths have now changed and my layout is screwed up. To solve the problem I'd like to change my layout formula to place images according to thier widths. However, my problem is that I cannot access the widths of the imported images. So my question is: How can I calculate the width of each imported image?
for(var i:int=0; i<12;i++){
imageLoader = new Loader();
var url:String = "images/animal"+i+".png";
var urlReq:URLRequest = new URLRequest(url);
var sprite:Sprite=new Sprite;
imageLoader.load(urlReq);
imageLoader.x=70*i
imageLoader.y=100
sprite.addChild(imageLoader)
addChild(sprite);Thanks. That makes sense. What type of event do I need for my event handler? If I use:
imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
Should I have:
public function imageLoaded(e:Event):void {
trace("Width="+e.contentLoaderInfo.??) -
How do I position a Loader image inside a Sprite?
In AS3 / CS4 I'm trying to programmatically create a bunch of rectangular objects, let's call them 'cards', that will contain an image and a colored background and eventually some other elements like text. I want to create alot of these cards and move them around inside of a larger panel (also a Sprite) of sorts. I can successfully create colored rectangles in my cards and place the cards where I want in the panel, but whenever I try to add an image to a card, I can't seem to position the image inside the card's coordinate space, it ends up being placed inside the larger panel's coordinate space instead, even though I'm adding the image/loader as a child of the card. I thought maybe it had something to do with having to wait until the image loading was complete, so I added the listener as a test but that didn't work. Here's the code:
var cont:Sprite = new Sprite(); containing 'card'
var rect:Sprite = new Sprite(); // draw a colored rectangle in the card
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, positionLoader);
rect.graphics.beginFill(0xbb3399);
rect.graphics.drawRect(60,60,99,99); // this works as expected
rect.graphics.endFill();
cont.addChild(rect);
addChild(cont);
var req:URLRequest = new URLRequest("top.png");
loader.load(req);
function positionLoader(e:Event):void {
loader.x = 30; // position the image inside the containing card
loader.y = 30;
cont.addChild(loader); // add the image to the cardI solved this problem.
-
I'm often sent what I'm told by professionals are "high res." , "print ready" images- which I would assume are at least 300 dpi CMYK images, but when I check size (image>image size> PS CS6 dialog box tells me these are 72 dpi images. I'm fairly certain the error lies with me rather than with the professional photographersdesigners that send the images.
I'm currently working with an image that says its 1.9M (when I hit info)
Then when I pull the .jpg into PS CS6 and go image>Image size> I see this dialogue box:
https://www.dropbox.com/s/ww3ekp2tfiinxhr/Screenshot%202013-12-04%2009.51.39.png
This happens to me over and over and I have no idea if these are print ready 300 dpi images or not as the size indicates it should be fine by the 72 pix./inch on this dialogue box makes me nervous.
Also, the images always are in RGB, rather than CMYK
Help!I generally get he images from drop box, email or given to me on a thumb drive. I'm not really worried about the RGB facor as anything that comes via web or a camera shoots in RGB, just added that tidbit in case it factored into the answer.
I do understand that dpi is direclty related to image size (here is a great article that was super helpful to my understanding this, just in case anyone else is looking)
http://www.istockphoto.com/article_view.php?ID=199
My, newly revised, understanding is that I'll always have to uncheck resample image, constrain w and h and change to 300 dpi and that will tell me the largest file size that I can have at that resolution. -
How to check background work load
hi gurus,
i want information to how to view background running process in sap 4.7
plz ansHi,
There are various way to find the background load.
1. SM37 - Will show you the active Background job.
2. SM50/SM66 - Will show you the work process load, where you can find the Work Process Type - BGD.
3. ST03N - Will show you the work load for Background job.
Thanks
Lokendra Kumar -
How to check the previous loaded SAP GUI patch number
Hi
now I am installing patch#24 SAP GUI ,now where to check the previous added patches,where I need to check, please mail the pathYes, Rolf is right.
For every patch run there is a sapsetup<n>.log.
Look at the file timestamp for the sequence.
But what you see is a very indirect clue what you have installed.
You see a very verbose installation protocol which is obviously targeted to developers of SAPGUI to troubleshoot installation issues...
What they forgot to trace is the name of the patch file...
The clues for the versions involved are texts like
File version of source file is: 6405.5.24.1016
File version of target file is: 6405.5.23.1016
In this case I have updated 6.40 GUI Patch 23 to Patch 24
HTH, Rudi -
How to check progress of loaded content with Flash Remoting?
Is there a way to monitor the loading progress (percent progress bar style) when using Flex/Flash Remoting?
Thanks!
Enrique.Hi,
Use 2 FileStream objects in async mode (openAsync). One to
read and another to write. When you read in async mode, you get
progress events. When they fire, you can read bytesAvailable
amounts of data and write that to the output filestream.
The output filestream can listen for output_progress events
to ensure that new data can be written to it or not. -
Loading Images/Having images load at the center of a JFrame with random col
Hey Guys,
I was wondering how could i go about loading images two at a time for instance have two circle images load at the center of a J Frame connected to each other and also each time the J Frame is executed the circles are different colors. Ive posted this question before and have posted it on another forum but i have not gotten any help. I looked into using media tracker and the Random command but i am still not if these are the proper solution to my problem. Id appreciate any help if this post doesn't make sense let me know i will try and clarify better. Thanks in advanceAh alright then so what i have to far is i have an image load to my J Frame/J Panel and after it loads it starts to fall like a tetris block and i am able to move it left and right. When the image loads it loads to the default coordinates of 0,0 the left hand top corner. What i want to do it when i run my application the image loads at the center of the J Frame/J Panel but also have another block connected to it when it loads. So basically i have loaded four separate different images and want them to load to my J Frame/ J Panel two at a time side by side like tetris and puyo puyo smashed together here is my code sorry its hard for me to explain it for some reason hope this makes more sense.
import javax.swing.*;
import java.awt.*;
public class DemoTest extends JPanel {
public DemoTest() {
add(new BlockPanel());
public static void main(String[] args) { {
JFrame frame = new JFrame("Tetris");
frame.setContentPane(new BlockPanel());
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(200,500);
frame.setResizable(false);
frame.setVisible(true);
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
public class BlockAnimation extends JPanel {
public static final int numDroppingBlocks=2;
private static final int MAX_X = 200;
private static final int MAX_Y = 430;
private static final int DELTA_Y = 2;
private static final int TIMER_DELAY = 20;
// Declare name's for the Image object.
Image image[];
Timer pptimer;
boolean right,left;
int X = 0;
int x = 32;
int y;
public BlockAnimation() {
super();
//Load an image file into the Image object. This file has to be in the same folder
image = new Image[4];
image[0] = Toolkit.getDefaultToolkit().getImage("block_yellow.png");
image[1] = Toolkit.getDefaultToolkit().getImage("block_blue.png");
image[2] = Toolkit.getDefaultToolkit().getImage("block_green.png");
image[3] = Toolkit.getDefaultToolkit().getImage("block_red.png");
//image5 = Toolkit.getDefaultToolkit().getImage("DeathNote1.jpg");
setFocusable(true);
BlockMove block_move = new BlockMove(); // Make a new video game KeyListener
addKeyListener(block_move);
//setBackground(Color.BLACK);
pptimer = new Timer(TIMER_DELAY, new TimerAction());
pptimer.start();
public void setAnimation(boolean OnandOff) {
if (OnandOff) {
pptimer.start();
} else {
pptimer.stop();
public void paintComponent(Graphics g) {
super.paintComponent(g);
// draw the "stop" line for the animation
g.setColor(Color.black);
g.drawLine(0, MAX_Y, getWidth(), MAX_Y);
// Draw our Image object.
g.drawImage(image[0],X,y,this);
if(right) // Move the block to the right
X++;
if(left) // Move the block to the left
X--;
repaint();
private class BlockMove implements KeyListener {
public void keyTyped(KeyEvent e){}
public void keyReleased(KeyEvent e)
if(e.getKeyCode() == e.VK_RIGHT)
right = false;
if(e.getKeyCode() == e.VK_LEFT)
left = false;
public void keyPressed(KeyEvent e)
if(e.getKeyCode() == e.VK_RIGHT)
right = true;
if(e.getKeyCode() == e.VK_LEFT)
left = true;
class TimerAction implements ActionListener {
public void actionPerformed(ActionEvent e) {
y += DELTA_Y;
if (y + x >= MAX_Y) {
setAnimation(false);
}//end class
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class BlockPanel extends JPanel {
BlockAnimation pa;
BlockPanel() {
pa = new BlockAnimation();
JButton startButton = new JButton("Start");
JButton stopButton = new JButton("Stop");
startButton.addActionListener(new Start());
stopButton.addActionListener(new Stop());
JPanel button = new JPanel();
button.setLayout(new FlowLayout());
button.add(startButton);
button.add(stopButton);
this.setLayout(new BorderLayout());
this.add(button, BorderLayout.SOUTH);
this.add(pa,BorderLayout.CENTER);
class Start implements ActionListener {
public void actionPerformed(ActionEvent e) {
pa.setAnimation(true);
class Stop implements ActionListener {
public void actionPerformed(ActionEvent e) {
pa.setAnimation(false);
}//endclass Edited by: Riz01 on Sep 14, 2009 2:34 PM -
Get width and height of a dynamically loaded image once it's done loading?!
hello : :
well... i'm taking my first shots at flex after programming
in flash for a year now. it's been fun and i've been picking up on
things pretty well (or so i think), but i come across something
today that i used to be able to do in my as2 programming and don't
know how to do in as3...
in flex, i'm loading an image into an image control (by using
"myImgControl.load(urlString)"). i have a "complete" parameter on
the image control that calls a function just fine after the image
is loaded, but if i try and check the hight and width of the loaded
image once it loads, it comes back as zero. how can i get the
height and width of the image after it's loaded?!
in flash/as2 i used to do this little trick/work-around i
found in a forum (kirupa.com, i think) to find out the width and
height once the loaded image listener checked the loading process
and came back "complete"... in the code below, "imgLoader" is the
movieClip the image was loaded using
imgLoaderListener.loadClip(urlString, imgLoader).
quote:
iTot = imgLoader.getBytesTotal();
iLoad = imgLoader.getBytesLoaded();
if (iLoad == iTot && iTot > 4) {
imgH = imgLoader._height;
imgW = imgLoader._width;
that all make sense?!
basically, it's as simple as this: i need to find something
similar to the above for as3 that will tell me the width and height
of a dynamically loaded image after it's done loading...
so there ya have it. i appreciate any help any of you can
throw my way! thank you so much for even reading this!
: : michaelI assume you have probably already figured this out, but just
in case, there should be an event to listen for after which you can
get the height and width information successfully. I can't remember
the exact name, however. Experiment and see which one works
time-wise. -
[How .. ]: Load image to SAP Screen.
Hi All,
I'm having a project where i should display the corresponding picture.
These are questions that i'm going to ask :
1. How can i store the image to SAP Server ? Could you direct me step by step please ..
2. How can i load the picture from the program ? Could it also be directed step by step ..
Many thanks all.
Still need your guidance a lot.
Kindly Regards,
Niel.Niel,
Say thanks to Pavan Praveen who helped me with this sometime back.
To create a logo u have to remember one thing is u have to upload that logo through OAER or SE78
for uploading logo in OAER
Enter class name as PICTURES
Class type as OT
Object key the name of ur logo want to upload
then press F8 or execute
Then it will automatically creates a folder for ur LOGO and upload ur logo in that folder
After that In the left side bottom of the page u can c the following options
1)Detail
2)Document Info
3)Keywords
4)Create
goto Detail in which u can find the Object Id
which u have to paste in the function module of this program
Check this program1
*& Report ZREPORT_LOGO *
REPORT ZREPORT_LOGO.
DATA:
docking TYPE REF TO cl_gui_docking_container,
picture_control_1 TYPE REF TO cl_gui_picture,
url(256) TYPE c .
DATA : sum(4) , num1(4) , num2(4).
PARAMETERS: p_dummy(4) DEFAULT '4' .
PARAMETERS: p_dummy1(4) DEFAULT '5' .
AT SELECTION-SCREEN OUTPUT.
PERFORM show_pic.
START-OF-SELECTION.
num1 = p_dummy.
num2 = p_dummy1.
sum = num1 + num2.
WRITE : / sum.
*& Form show_pic
FORM show_pic.
DATA: repid LIKE sy-repid.
repid = sy-repid.
CREATE OBJECT picture_control_1 EXPORTING parent = docking.
CHECK sy-subrc = 0.
CALL METHOD picture_control_1->set_3d_border
EXPORTING
border = 5.
CALL METHOD picture_control_1->set_display_mode
EXPORTING
display_mode = cl_gui_picture=>display_mode_stretch.
CALL METHOD picture_control_1->set_position
EXPORTING
height = 100
left = 500
top = 10
width = 300.
CALL METHOD picture_control_1->load_picture_from_url
EXPORTING
url = 'c:/pic.bmp'.
IF sy-subrc NE 0.
ENDIF.
ENDFORM. "show_pic
Check this program 2
program zsap_picture_demo.
set screen 200.
TYPE-POOLS cndp.
CLASS c_event_receiver
DEFINITION
class c_event_receiver definition.
The class is used to test the events raised by the cl_gui_picture
class
public section.
methods event_handler_picture_dblclick
for event picture_dblclick of cl_gui_picture
importing mouse_pos_x mouse_pos_y sender.
methods event_handler_context_menu
for event context_menu of cl_gui_picture
importing sender.
methods event_handler_context_menu_sel
for event context_menu_selected of cl_gui_picture
importing fcode sender.
endclass.
DATA
data function like sy-ucomm. " OK-Code field in screen 200
data url type cndp_url. " URL-field in screen 200
data url2 type cndp_url. " URL-field in screen 200
data picture_control_1 type ref to cl_gui_picture.
data picture_control_2 type ref to cl_gui_picture.
data container_1 type ref to cl_gui_custom_container.
data container_2 type ref to cl_gui_custom_container.
data event_receiver type ref to c_event_receiver.
data event_tab type cntl_simple_events.
data event_tab_line type cntl_simple_event.
data return type i.
PBO
before_output
module before_output output.
set pf-status 'MAIN0001'.
IF PICTURE_CONTROL_1 IS INITIAL.
Create controls
create object container_1
exporting container_name = 'PICTURE_CONTROL_1'.
create object container_2
exporting container_name = 'PICTURE_CONTROL_2'.
CREATE OBJECT PICTURE_CONTROL_1 exporting parent = container_1.
CREATE OBJECT PICTURE_CONTROL_2 exporting parent = container_2.
Register the events
EVENT_TAB_LINE-EVENTID = CL_GUI_PICTURE=>EVENTID_PICTURE_DBLCLICK.
append EVENT_TAB_LINE to EVENT_TAB.
EVENT_TAB_LINE-EVENTID = CL_GUI_PICTURE=>EVENTID_CONTEXT_MENU.
append EVENT_TAB_LINE to EVENT_TAB.
EVENT_TAB_LINE-EVENTID = CL_GUI_PICTURE=>EVENTID_CONTEXT_MENU_SELECTED.
append EVENT_TAB_LINE to EVENT_TAB.
CALL METHOD PICTURE_CONTROL_1->SET_REGISTERED_EVENTS
exporting
EVENTS = event_tab.
CALL METHOD PICTURE_CONTROL_2->SET_REGISTERED_EVENTS
exporting
EVENTS = event_tab.
Create the event_receiver object and set the handlers for the events
of the picture controls
create object event_receiver.
set handler event_receiver->event_handler_picture_dblclick
FOR PICTURE_CONTROL_1.
set handler event_receiver->event_handler_context_menu
FOR PICTURE_CONTROL_1.
set handler event_receiver->event_handler_context_menu_sel
FOR PICTURE_CONTROL_1.
set handler event_receiver->event_handler_picture_dblclick
FOR PICTURE_CONTROL_2.
set handler event_receiver->event_handler_context_menu
FOR PICTURE_CONTROL_2.
set handler event_receiver->event_handler_context_menu_sel
FOR PICTURE_CONTROL_2.
Set the display mode to 'normal' (0)
CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL.
CALL METHOD PICTURE_CONTROL_2->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL.
Set 3D Border
CALL METHOD PICTURE_CONTROL_1->SET_3D_BORDER
exporting border = 1.
CALL METHOD PICTURE_CONTROL_2->SET_3D_BORDER
exporting border = 1.
new async implementation since 4.6C
CALL FUNCTION 'DP_PUBLISH_WWW_URL'
EXPORTING
OBJID = 'HTMLCNTL_TESTHTM2_SAP_AG'
LIFETIME = cndp_lifetime_transaction
IMPORTING
URL = url
EXCEPTIONS
OTHERS = 1.
Load the picture by using the url generated by the data provider.
if sy-subrc = 0.
CALL METHOD PICTURE_CONTROL_1->LOAD_PICTURE_FROM_URL_ASYNC
exporting url = url.
endif.
CALL FUNCTION 'DP_PUBLISH_WWW_URL'
EXPORTING
OBJID = 'DEMOWORD97SAPLOGO'
LIFETIME = cndp_lifetime_transaction
IMPORTING
URL = url2
EXCEPTIONS
OTHERS = 1.
load image
if sy-subrc = 0.
CALL METHOD PICTURE_CONTROL_2->LOAD_PICTURE_FROM_URL_async
exporting url = url2.
endif.
endif.
endmodule.
PAI
after_input
module after_input input.
case function.
At the end of the program destroy the control
when 'BACK'.
CALL METHOD container_1->FREE.
CALL METHOD container_2->FREE.
leave to screen 0.
Change the display mode
when 'NORMAL'.
CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL.
CALL METHOD PICTURE_CONTROL_2->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL.
when 'STRETCH'.
CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_STRETCH.
CALL METHOD PICTURE_CONTROL_2->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_STRETCH.
when 'FIT'.
CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT.
CALL METHOD PICTURE_CONTROL_2->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT.
when 'NORMAL_CTR'.
CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL_CENTER.
CALL METHOD PICTURE_CONTROL_2->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL_CENTER.
when 'FIT_CTR'.
CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT_CENTER.
CALL METHOD PICTURE_CONTROL_2->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT_CENTER.
Clear the picture
when 'CLEAR'.
CALL METHOD PICTURE_CONTROL_1->CLEAR_PICTURE.
Load a new picture
when space.
CALL METHOD PICTURE_CONTROL_1->LOAD_PICTURE_FROM_URL
exporting url = url
importing result = return.
call method cl_gui_cfw=>flush.
if return = 0.
url = text-000.
endif.
endcase.
clear function.
endmodule.
CLASS c_event_receiver
IMPLEMENTATION
CLASS C_event_receiver implementation.
CLASS c_event_receiver
METHOD event_handler_picture_dblclick
METHOD EVENT_HANDLER_PICTURE_DBLCLICK.
for event picture_dblclick of c_picture_control
importing mouse_pos_x mouse_pos_y.
DATA pos_x(5) type c.
DATA pos_y(5) type c.
pos_x = mouse_pos_x.
pos_y = mouse_pos_y.
IF SENDER = PICTURE_CONTROL_1.
MESSAGE I000(0K) WITH
'DoubleClick' 'Upper Picture' POS_X POS_Y. "#EC NOTEXT
else.
MESSAGE I000(0K) WITH
'DoubleClick' 'Lower Picture' POS_X POS_Y. "#EC NOTEXT
endif.
endmethod.
CLASS c_event_receiver
METHOD event_handler_context_menu
METHOD EVENT_HANDLER_CONTEXT_MENU.
data menu type ref to cl_ctmenu.
create object menu.
call method menu->ADD_FUNCTION exporting
fcode = text-001
TEXT = TEXT-001.
call method menu->ADD_FUNCTION exporting
FCODE = TEXT-002
TEXT = TEXT-002.
call method menu->ADD_FUNCTION exporting
FCODE = TEXT-003
TEXT = TEXT-003.
call method menu->ADD_FUNCTION exporting
FCODE = TEXT-004
TEXT = TEXT-004.
call method menu->ADD_FUNCTION exporting
FCODE = TEXT-005
TEXT = TEXT-005.
CALL METHOD SENDER->DISPLAY_CONTEXT_MENU
EXPORTING CONTEXT_MENU = MENU.
endmethod.
CLASS c_event_receiver
METHOD event_handler_context_menu_sel
METHOD EVENT_HANDLER_CONTEXT_MENU_sel.
DATA DISPLAY_MODE TYPE I.
IF FCODE = TEXT-001.
DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL.
ENDIF.
IF FCODE = TEXT-002.
DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_STRETCH.
ENDIF.
IF FCODE = TEXT-003.
DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT.
ENDIF.
IF FCODE = TEXT-004.
DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL_CENTER.
ENDIF.
IF FCODE = TEXT-005.
DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT_CENTER.
ENDIF.
CALL METHOD SENDER->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = DISPLAY_MODE.
endmethod.
endclass.
Note: While creating this program I had observed the thing is it will accepts the logo which was having the URL so try to create a logo of URL but u can display the Standard SAP logo using this program
To upload the the logo image on the right hand side of the SAP screen.
Transaction codeSMW0
X - Binary data for WebRFC application
Hit Enter
Click Execute
Click Settings -> Maintain MIME types
Click the Create button
Fill in :- TYPE : image/gif EXTENSION : .GIF
Click Save
Click Back to the Binary data for WebRFC
Click Create
Fill in :- Obj. name : ZXXXX.GIF Description : Company Logo
Click Import and specify the filename where your GIF file is located.File type is BIN. Finish press the Transfer button.
If successful, your logo will be shown in the Binary data for WebRFC.
Transaction codeSM30 - Table/View - SSM_CUST
Click Maintain
Click New Entries
Name Value to be set
START_IMAGE ZXXXX.GIF
RESIZE_IMAGE NO
Logoff and Login again
Check this link
http://www.sap-img.com/fu002.htm -
How to load images from css file in JavaFX 8
I have this css file which loads images in JavaFX 8 application:
#pill-left {
-fx-padding: 5;
-fx-border-image-source: url("/com/dx57dc/images/left-btn.png");
-fx-border-image-slice: 4 4 4 4 fill;
-fx-border-image-width: 4 4 4 4;
-fx-border-image-insets: 0;
-fx-border-image-repeat: stretch;
-fx-background-color: null !important;
#pill-left:selected { -fx-border-image-source: url("/com/dx57dc/images/left-btn-selected.png"); }
#pill-left .label {
-fx-text-fill: #d3d3d3;
-fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.75) , 0, 0.0 , 0 , -1 );
#pill-left:selected .label {
/* -fx-text-fill: black; */
-fx-text-fill: white;
-fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
#pill-center {
-fx-padding: 5;
-fx-border-image-source: url("/com/dx57dc/images/center-btn.png");
-fx-border-image-slice: 4 4 4 4 fill;
-fx-border-image-width: 4 4 4 4;
-fx-border-image-insets: 0;
-fx-border-image-repeat: stretch;
-fx-background-color: null !important;
#pill-center:selected { -fx-border-image-source: url("/com/dx57dc/images/center-btn-selected.png"); }
#pill-center .label {
-fx-text-fill: #d3d3d3;
-fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.75) , 0, 0.0 , 0 , -1 );
#pill-center:selected .label {
-fx-text-fill: black;
-fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
#pill-right {
-fx-padding: 5;
-fx-border-image-source: url("/com/dx57dc/images/right-btn.png");
-fx-border-image-slice: 4 4 4 4 fill;
-fx-border-image-width: 4 4 4 4;
-fx-border-image-insets: 0;
-fx-border-image-repeat: stretch;
-fx-background-color: null !important;
#pill-right:selected { -fx-border-image-source: url("/com/dx57dc/images/right-btn-selected.png"); }
#pill-right .label {
-fx-text-fill: #d3d3d3;
-fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.75) , 0, 0.0 , 0 , -1 );
#pill-right:selected .label {
-fx-text-fill: black;
-fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
The images are located at the Java package com.dx57dc.images
In Java 7_25 this code works as expected but in JavaFX 8 b99 I get this error:
ava.lang.NullPointerException
at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1129)
at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1520)
at com.sun.javafx.sg.prism.NGGroup.renderChildren(NGGroup.java:233)
at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:199)
at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1249)
at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1520)
at com.sun.javafx.sg.prism.NGGroup.renderChildren(NGGroup.java:233)
at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:199)
at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1249)
at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1520)
at com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:99)
at com.sun.javafx.tk.quantum.AbstractPainter.paintImpl(AbstractPainter.java:210)
at com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:95)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:129)
at java.lang.Thread.run(Thread.java:724)
D3D Vram Pool: 13,331,480 used (5.0%), 13,331,480 managed (5.0%), 268,435,456 total
20 total resources being managed
4 permanent resources (20.0%)
1 resources locked (5.0%)
7 resources contain interesting data (35.0%)
0 resources disappeared (0.0%)
D3D Vram Pool: 13,331,480 used (5.0%), 13,331,480 managed (5.0%), 268,435,456 total
20 total resources being managed
4 permanent resources (20.0%)
1 resources locked (5.0%)
7 resources contain interesting data (35.0%)
0 resources disappeared (0.0%)
D3D Vram Pool: 13,331,480 used (5.0%), 13,331,480 managed (5.0%), 268,435,456 total
20 total resources being managed
4 permanent resources (20.0%)
1 resources locked (5.0%)
7 resources contain interesting data (35.0%)
0 resources disappeared (0.0%)
What is the proper way to load images from css in Java 8?
Ref
How to load images from css file in JavaFX 8 - Stack OverflowThere is nothing special to do - you execute the statement from your program just like any other SQL statement. The only thing to be aware of are the privilege/permission issues:
When loading from a file on a client computer:
READ CLIENT FILE privilege is also required for the database user.
Read privileges are required on the directory being read from.
The allow_read_client_file database option must be enabled.
The read_client_file secure feature must be enabled.
Revoking these privileges is also the only way you can prevent a user from executing the statement.
Maybe you are looking for
-
Cannot delete R&R backups, not enough space
I have R&R V3.01.1037.00 installled on my son's laptop. It has some old R&R backups which I want to delete. I've run R&R from the Programs list and found the Advanced tab which allows me to delete backups ... however when I try and delete one it sa
-
PMW - to display multiple payment item
hi, i managed to create own DME tree. the problem now, in the DME content, only last payment item been displayed. suppose got many items that been posted. i have debug the FBPM and still the last item shown. so far the data for the last payment item
-
Ver 32.0.3 for Ubuntu 14.04 LTS. Once I've used a bookmark in a session, it becomes unavailable for the remainder of that session. If I want to go back to the website accessed earlier, I have to exit out of Firefox and restart it.
-
10.1.3.3.0 Request invoke issue
Hi, Currently I have 10.1.3.3.0 Linux redhat application server. When I deploy following jsp and invoking from browser http://myname/testJSP, after 5 minutes I can see System.out.println("*****Start**** " ); message again. for example in log file Sys
-
I downloaded the free upgrade of OS Mavericks then when I was trying to install it, there was an error and prompted me to uninstall. I uninstalled it and tried to download it again. It says that "downloaded" not the option to install. How can I downl