Forcing PopupFactory to return a heavy weight popup
Hi, in my application I want to display a Popup over the top of a Canvas that is within a JPanel. The way I am trying to achieve this is:
PopupFactory popupFactory = PopupFactory.getSharedInstance();
Popup tipWindow = popupFactory.getPopup(tipComp, tip, theLocation.x, theLocation.y);
tipWindow.show();The variable tipComp is a heavy weight Canvas, and the variable tip is a subclass of JToolTip we are using to provide extra functionality.
Using this code the Canvas is obscuring the Popup, as the Popup returned is light weight. Is there any way to force PopupFactory to return a heavy weight popup?
I did consider this but unfortunately it is not possible. The software has been developed over a long period of time and is very large. It would not be possible to have anything other than a Canvas (we actually have extended Canvas to provide extra functionality). Is there any other way to solve this problem?
Thanks
Similar Messages
-
Quicktime heavy weight components
Hi guys,
Im using the QT java api and have hit some problems with their AWT video window component. The reason I'm posting here rather than the QT forums is that I believe this problem is common to all heavy weight components in Java.
Ok, the QT api offers a factory method for creating what they call QTComponent (awt heavy weight component - extends java.awt.component) which I add to a dedicated JPanel.
I need to be able to set the visibility of the video window so I do;
parent_panel.setVisible(value)
parent_panel.repaint();
parent_panel.invalidate();
parent_panel.validate();
which sets the parent JPanel visibility to hidden but does not hide the child video window. (note: this is called from the event dispatch thread).
I have tried validate, invalidate, repaint (you name it), on both the parent JPanel and the java.awt.component itself, but this still doesn't fix the problem.
One thing to note is that if I resize or minimize then maximize the container JFrame the video window disappears. So i'm guessing the handlers for these events execute routines I need to in my 'setvisible' method.
If anyone could help that would be great.
Many thanks,
AlexLightweight components are components whose printed
sources weigh less than 200 grams.Is a paper and a print face required? -
hi
i have on doubt in swing... awt are heavy weight && swing are light weight .awt are system dependedent ....iam right..
if right System dependent in this sence java is plaftform independent
so how is it possible..
pls give me details
regards
kedarLight weight components: To draw the components the jvm takes the os routine.
Heavy weight components: To draw the components the JVM takes its own routines.
You can check this. If you draw the awt component in one os it gives the different layout in other os. But this is not in the case of swing.This is the main difference . That's why the main components in big project are done in swing.
if in doubt please ask?
javasans -
Laptop monitor crashed due to heavy weight on it
Sir,
I have hp pavilion n15-004TX, bought 6 months ago. I have 1+2 years extended factory warranty.And my laptop screen has crashed due to fall of heavy weight on it. I was wondering if this comes under factory warranty or not?
Waiting for your valuable response.This Forum is not a link to HP Warranty. We are volunteer end users like you. I think the Care Pack may or may not include Accidental Damage coverage. It is very expensive and you have to buy it as an add-on. Your best bet is to call HP. If it is not covered we can help you find a screen and show you how to replace it. How much was damaged? Do you just need the screen or also some platic chassis parts? Screens cost less than you probably think (under $100 in most cases) and the replacement is not real hard.
-
What is lightweight process and heavy weight process
please can any one send the difference between lightweight process and heavy weight process .... and why thread are called lightwieght process
shankrocks wrote:
please can any one send the difference between lightweight process and heavy weight process .... and why thread are called lightwieght processProcess and thread are often used interchangeably (even though process also is used in a wider meaning). In Java a lightweight thread is also called a green thread.
[http://en.wikipedia.org/wiki/Green_threads]
So when programming in Java you're going to be using lightweight threads (unless you somehow bypass the JVM and start OS threads directly).
More generally heavyweight usually refers to something that supplied by the OS. You have the same is Swing/AWT where Swing widgets are called lightweight because they're drawn by Java while AWT widgets are called heayweight because they're drawn by the OS. -
Why the AWT components are called heavy-weight and SWING as light-weight?
Why the AWT components are called heavy-weight and SWING as light-weight?.
Building our own components means overhead on JVM. hence in what sence the SWING components are called light weight.?
I know that the Swing componets are the components which are not going to depend upon peer classes and render, OS independent LOOK n FEEL.
Thanks,
Sanath KumarAll extensions of Component are considered lightweight since, as you point out, they don't have their own dedicated native peer.
Essentially a lightweight component only has a canvas on which to draw itself and some means of receiving events from the system. In fact, there is no need to have one of these "canvas" and "event" objects for each component - the parent component can manage these abilities on behalf of its children. Eventually you end up with only top-level components needing to be heavyweight in order to communicate with the windowing system.
A lightweight component therefore has the minimal dependency on the underlying windowing system giving you maximum cross-platform flexibility.
It is usually true that lightweight => slower and heavyweight => faster since it is reasonable to assume that native peers will be optimal for the windowing system. However, that's not the point of the lightweight/heavyweight distinction.
Hope this helps. -
Hi guys,
Im using the QT java api and have hit some problems with their AWT video window component. The reason I'm posting here rather than the QT forums is that I believe this problem is common to all heavy weight components in Java.
Ok, the QT api offers a factory method for creating what they call QTComponent (awt heavy weight component - extends java.awt.component) which I add to a dedicated JPanel.
I need to be able to set the visibility of the video window so I do;
parent_panel.setVisible(value)
parent_panel.repaint();
parent_panel.invalidate();
parent_panel.validate();
which sets the parent JPanel visibility to hidden but does not hide the child video window. (note: this is called from the event dispatch thread).
I have tried validate, invalidate, repaint (you name it), on both the parent JPanel and the java.awt.component itself, but this still doesn't fix the problem.
One thing to note is that if I resize or minimize then maximize the container JFrame the video window disappears. So i'm guessing the handlers for these events execute routines I need to in my 'setvisible' method.
If anyone could help that would be great.
Many thanks,
AlexAthlon1600 wrote:
that heavy-weight component is JDIC web browser. It's the only cross-platform browser I know and it's one of the main controls in my GUI. can't change thatCan't help you there.
JInternalFrame descends from JComponent? yes?Yep. So it's lightweight.
Well, I'm not smart enough yet to mix lightweight and heavyweight components, but fortunately Google is: [Mixing Heavy and Light Components|http://java.sun.com/products/jfc/tsc/articles/mixing/]
~{color:gray}the first hit by the way{color}~ -
Forcing EWS to return an error an error code
Hi everybody,
Can we force EWS to return an error code, even if it is fine? E.g., send one GetItem and tell it to return a "corrupt" answer so it is actually accessible.
Thanks & regards,
Talib HussainI'm not sure what you're trying to do. You can't make it return an error if there is no error. You could force an error (maybe use a bad item ID)?
-
Forcing CGImageProviderCopyData() to return RGB image without alpha channel
I am using CGDataProviderCreateWithData(), CGImageCreateWindoJPEGDataProvider() and CGImageProviderCopyData() to decode a JPEG image using core graphics. However the problem is that CGImageProviderCopyData() is returning RGBA instead of RGB, and I have to manually run across the entire bitmap contents and get rid of the alpha channel, which is time consuming.
Is there any way I can force CGImageProviderCopyData() to return a RGB image without the alpha channel? Or any other way to decode where I can skip the step of having to manually delete the alpha channel?
Thanks!It would be great if you told us what program you are talking about. And it would be even better if you posted your question in the appropriate product forum, which you may find here:
http://forums.adobe.com/index.jspa?view=discussions
This forum is only for discussions on the forums themselves. -
Return values from a popup to calling form and refresh page?
Hi,
Following thread Re: Popup report window from a PL/SQL proc.? I'm trying to pass the record values(checkbox + record values) to the parent windows (the retruned value is always a unique record). I was able to set the variables values with a procedure ( I vierfied in session state), but I'm unable to pass these values to the parent form and then refreshing the page. I tried the following thread without success : Refresh from Popup page
Any hint would be appreciated.
ThanksAndy,
My page has the following query for the report region (PL/sql function):
DECLARE
v_string VARCHAR2(2000);
vc VARCHAR2(2):=chr(39);
BEGIN
v_string:= 'SELECT '||vc||'<img src="/i//edit_big2.gif" onClick="f_payment_clrRow(this)"></img>'||vc||' Clr, '||
' APEX_ITEM.SELECT_LIST_FROM_QUERY(1,NULL,'||vc||'SELECT TRX_DESCRIPTION, TRX_ID FROM WTL_V_TRX_PAYMENTS WHERE TRX_EFFECT='''||V_Effect||''' '||vc||',''onchange=f_payment_trx_paymode(this); '',''NO'') Description,'||
' APEX_ITEM.SELECT_LIST_FROM_QUERY(2,NULL,'||vc||'SELECT DESCRIPTION, ID_VALUE FROM GEN_PR_TYPES_ENTITY '||vc||',null,''NO'') Bank,'||
' APEX_ITEM.TEXT(3,NULL,10,10,''ondblclick=f_callMyPopup(this);'') Document,'||
' APEX_ITEM.TEXT(4,NULL,10,15) Account,'||
' APEX_ITEM.SELECT_LIST_FROM_QUERY(5,NULL,'||vc||'SELECT ID_VALUE, ID_VALUE FROM WTL_V_TRX_CURRENCY'||vc||',''onchange=f_payment_currency_rate(this);'',''NO'') Currency,'||
' APEX_ITEM.TEXT(6,NULL,15,20,''onblur=f_payment_trx_amount(this); style="text-align:right;" '') Amount, '||
' APEX_ITEM.TEXT(7,NULL, 5, 8,''onblur=f_payment_trx_amount(this); style="text-align:right;" '') Rate, '||
' APEX_ITEM.TEXT(8,NULL,15,20,''readonly style="text-align:right;" '') Trx_Amount, '||
' APEX_ITEM.HIDDEN (9,NULL), '||
' APEX_ITEM.HIDDEN (10,NULL) '||
' from dual';
return v_string;
As u can see, the 3rd item uses the ondblclick to call the js function f_callMyPopup.
My js function in the header of the page is below:
<script>
function f_open_lov2(page, request)
{ var url;
url = 'f?p='+$x('pFlowId').value+':'+page+':'+$x('pInstance').value+':'+request;
w = open(url,"winLov","Scrollbars=1,resizable=1,width=500,height=600");
if (w.opener == null)
w.opener = self;
w.focus();
function f_callMyPopup(x)
var f01;
var p = x.parentNode;
while (p.tagName != "TR")
{ p = p.parentNode;}
var inputs = p.getElementsByTagName("INPUT");
var zz;
for (zz = 0; zz < inputs.length; zz++)
{if (inputs[zz].name = 'f01')
{f01 = inputs[zz].id;}
f_open_lov2(17,97);// I sent 97 as an example.
</script>
and the js in the custom popup page (17) has the following function which is executed when the user selects one of the rows using a button.
<script>
function f_return_value(cstring)
opener.document.getElementById("f03").value = cstring;
close();
</script>
When f_return_value is executed, the selected value is pasted in the first row of the parent page.
Sorry , i don't know what do you mean when you say to pass the id to the custom popup page.
Thanks again,
Fernando
Edited by: fnovilloes on 16/09/2009 12:01 PM
Edited by: fnovilloes on 16/09/2009 03:56 PM
Edited by: fnovilloes on 16/09/2009 03:59 PM -
Problems with embedded font with medium or heavy weight
Hey guys,
I'm switching a current Project from Flashbuilder Beta2 to the Flashbuilder final release.
I have a big problem concerning embedded fonts. The fonts I have to use are Futura Com Medium & Futura Com Heavy.
Here's some of my code:
@font-face
src: url("assets/fonts/FuturaCom-Medium.ttf");
font-weight: normal;
fontFamily: myFuturaMedium;
advancedAntiAliasing: true;
embedAsCff: false;
.myDatagrid{
fontFamily: myFuturaMedium;
color: #ff0000;
this worked well in beta2, but I'm not able to get the embedded Font working in the datagrid with the Flashbuilder final release.
Any help on using embedded fonts in a mx|Datagrid is highly aprechiated.
CheersHey guys,
I'm switching a current Project from Flashbuilder Beta2 to the Flashbuilder final release.
I have a big problem concerning embedded fonts. The fonts I have to use are Futura Com Medium & Futura Com Heavy.
Here's some of my code:
@font-face
src: url("assets/fonts/FuturaCom-Medium.ttf");
font-weight: normal;
fontFamily: myFuturaMedium;
advancedAntiAliasing: true;
embedAsCff: false;
.myDatagrid{
fontFamily: myFuturaMedium;
color: #ff0000;
this worked well in beta2, but I'm not able to get the embedded Font working in the datagrid with the Flashbuilder final release.
Any help on using embedded fonts in a mx|Datagrid is highly aprechiated.
Cheers -
Forcing child to return "success" result to parent
Hi,
I have a child package which has script task that may return an error. I want that even if the script task has an error and went to failure data flow, when the package finishes and returns back to parent, it should pass success result to parent.
Master Package
Child Package
cherrieshHi cherriesh,
If I understand correctly, you want to force the child package return “success (green)” result to the parent package when the child package returns an error.
To achieve this goal, we can change ForceExecutionResult property of the Execute Package Task and Sequence Container from default None to Success value. Because the property can change the execution result of the component to the specified status.
The following result is for your reference:
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
If you have any feedback on our support, please click
here.
Katherine Xiong
TechNet Community Support -
Returning results to a popup, how to format
Hi, i have a printer script and at the end of the command i return the results for verification in a popup window, but it screws up with the formating. So i am wondering if its possible to format it better? or something better to use instead of a popup window
that also formatting?
$shell = New-Object -ComObject “WScript.Shell”
$printername = "test"
$servers = "g1v"
$printerinfo = $null
foreach ($server in $servers) {
if(([wmi]"\\$server\root\cimv2:Win32_Printer.DeviceID='$printername'").name -eq $printername){
$printerinfo += [wmi]"\\$server\root\cimv2:Win32_Printer.DeviceID='$printername'"|
ft SystemName, Name, PortName, DriverName -a
if($printerinfo){
$Shell.Popup(@"
$($printerinfo | Out-String )
"@, 0, “Info”, 0)
ThanksSorry but you cannot control the format of a popup. You would need to build a custom form or use Out-Gridview
$printername='HP LaserJet Professional P 1102w'
$servers='w8test'
$printers=foreach ($server in $servers) {
[wmi]"\\$server\root\cimv2:Win32_Printer.DeviceID='$printername'"
$printers|select SystemName, Name, PortName, DriverName |Out-Gridview
¯\_(ツ)_/¯ -
Handle RETURN event of a popup
Hello,
I have called a popup on a ction of a button from a standard component BP_HEAD. The Popup is a view of a custom component ZTEST which is embaded through component usage of BP_HEAD.
I have added 1 Model node BuilHeader & a value node ZSTOCK in the Pop up view context node.
In the IF_BSP_MODEL~INIT method of value node, I have written code so that it can fetch value from table. Till now it is working fine.
Now from BP_HEAD, I have called the popup from a view set.
LV_POPUP = ME->COMP_CONTROLLER->WINDOW_MANAGER->CREATE_POPUP(
IV_INTERFACE_VIEW_NAME = '/KGO/CO_STK_EXCHG/MainWindow'
IV_USAGE_NAME = 'COStockPopup'
IV_TITLE = 'Stock Exchange' ).
LV_POPUP->SET_ON_CLOSE_EVENT( IV_VIEW = ME IV_EVENT_NAME = 'RETURN').
LV_POPUP->OPEN( ).
The popup is displaying some fields from value context node in Edit mode.
Now if I want to change some field and get details on RETURN event, how can I get value node of my custom component from BP_HEAD event handler?
How can I access the value nodes of my from here?Hi,
You can get the context of your popup on the return method.
- First you have to make a global attribute of your popup reference LV_POPUP.
- Then in your popup component, add the context of the popup view on the ComponentInterface to make it global.
- Now you can read it from the return method of the origin view.
lv_cn_popup = lv_popup->get_context_node( iv_cnode_name = `POPUP_CONTEXT` ).
Hope it helps.
Regards.
Isaac -
How can I force that in af inputFile,File Upload popup only show image file
Hi
jdev 11.1.1.5
Is there any way to force that when click the browse button in af:inputFile ,In InputFile popup only show folder and image type file?
ThanksThere is no filter feature available for fileUpload. You can't force the component to only show specific files.
Timo
Maybe you are looking for
-
How can I regain access to a MAC account? -- Macbook Pro?
Situation: My wife has a 13" Mac Book Pro, that we received in May 2011. OS: Mac OS X Snow Leopard (not sure which version it came with -- 10.6?) My wife's computer had two administrative accounts. She uses one regularly, and the other is the 'prim
-
We had to uninstall iCloud from a PC (Win7 Pro - Outlook 2013). After restarting the PC, I then reinstalled iCloud and it didn't recreate the Calendar or the @me.com pst file. Is there a manualy way to recreate all of this or another way to reinstall
-
Can't hear the real instrument anymore
So I'm new to GB; I've been playing around this past week using the Blue Snowball USB-mic, which had been working nicely, to record vocal and acoustic guitar tracks. I also was playing around with using Apple loops to enhance my recordings. Last nigh
-
When updating to itune 10.5 I get this error message ,older version of bonjour can not be removed, and older version of apple mobile support cannot be removed, any one know how to fix this.
-
How's this partition table for my server?
How's this partition table for my server? Web/DNS/DHCP/Mail Server. hdd1: ~8gb total /boot - 100mb swap - 1gb / - rest of drive hdd2: ~155gb total /var - whole drive This is a Compaq ProLiant 5500 server with 10 drives. Will most things be installe