How to control Popup Menus
Hello there,
I have little problem controlling my popup menus, I need to have one menu item in the popup menu when I put the mouse on the top of a selected area. If mouse clicked on the selected area then I need to add more menu items. Here is my code so please help if you can.
public void mousePressed(MouseEvent me) {popupmenus(me, true);}
public void mouseReleased(MouseEvent me) {popupmenus(me, true);}
public void mouseMoved(java.awt.event.MouseEvent me){
popupmenus( me, false);
public void popupmenus(java.awt.event.MouseEvent me, boolean pop)
xpos = me.getX();
ypos = me.getY();
System.out.println(pop);
if (xpos > rect1xco[0]&& xpos < rect1xco[0]+rect1width[0] && ypos >
rect1yco[0] && ypos < rect1yco[0]+rect1height[0])
if(pop==true)
ar[0].add(it[0]);
ar[0].add(it[1]);
System.out.println("true");
rect1Active[0] = true;
ar[0].add(it[2]);
ar[0].show(this,xpos,ypos);
else
rect1Active[0] = false;
Thanks for your help.
What is your particular problem?
I see two things that may be issues...
1) you do the same thing on mousePressed and mouseReleased. This means that if you click on the selected area, it will add the items twice.
2) mouseMoved also seems to add an item, meaning that every registered event in the rectangle will continue to add the same item over and over.
If neither of these are your problem, please share what you need help with.
-JBoeing
Similar Messages
-
Popup menus in Forms 10g and Java Bean
Hi all.
What class in Java corresponds with popup menus(not in menu module) ?
I know that oracle.ewt.lwAWT.lwMenu.LWPopupMenu is corresponds with MenuBar's submenu. I can find Buttons, Text Fields, Menu and other components in my Form-Applet, but I don't know how to find popup menus in forms through Java Bean...Hello François,
I have created a java bean that dynamically creates a popup by left-clicking on the bean.
Set_Custom_Property( 'BLOCK.BEAN', 1, 'ADD_ITEM', 'Item' ) ;
Set_Custom_Property( 'BLOCK.BEAN', 1, 'ADD_SEPARATOR', '' ) ;
Set_Custom_Property( 'BLOCK.BEAN', 1, 'ADD_ITEM', 'Item one' ) ;
Set_Custom_Property( 'BLOCK.BEAN', 1, 'ADD_ITEM', 'Item two' ) ;
My problem is the layout. I want to simulate a button. I can't put the bean transparent over a button and I can't simulate a button with the bean.
How can I add the popup functionality to a button and not only to the bean? Or any other workaround?
Regards Pedro. -
How to control the options in Search popup of an LOV?
I have a query panel which is based on a view criteria of a view object. One of the query item is a ComboListOfValues. I do not have control over the 'Search' window which opens when we click on the LOV inside the Query Panel. Basically, I want to control the width of the results table and I do not want the title('Search') for the dialog. Also, I want to hide the Advanced button. Is there any way to do it?
Hi,
Below is my code for the popup. What I am saying is, inside the popup I have a search parameter which in ComboListOfValues. On click on that LOV it will invoke a search popup on which we do not have control. How to control the properties in that search popup. I am not talking about initial popup(id=popup1) on which we have control and I have set all the properties. I am talking about a LOV search parameter inside the query panel(id = qryId2).
<af:popup id="popup1" contentDelivery="lazyUncached"
popupFetchListener="#{popUpBean.candSearchListener}">
<af:dialog id="dialog1" type="cancel"
title="Search Candidates"
stretchChildren="first" contentWidth="920"
contentHeight="480">
<af:panelGroupLayout layout="vertical" id="pgl30">
<af:panelHeader text="" id="ph2">
<af:query id="qryId2" headerText=""
disclosed="true"
value="#{bindings.SearchCandVOCriteriaQuery.queryDescriptor}"
model="#{bindings.SearchCandVOCriteriaQuery.queryModel}"
queryListener="#{bindings.SearchCandVOCriteriaQuery.processQuery}"
queryOperationListener="#{bindings.SearchCandVOCriteriaQuery.processQueryOperation}"
resultComponentId="::resId2"
modeChangeVisible="false"
saveQueryMode="hidden"
modeButtonPosition="footer"
binding="#{popUpBean.searchCandQuery}"/>
</af:panelHeader>
<af:table value="#{bindings.SearchCandVO1.collectionModel}"
var="row"
rows="#{bindings.SearchCandVO1.rangeSize}"
emptyText="#{bindings.SearchCandVO1.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.SearchCandVO1.rangeSize}"
rowBandingInterval="0"
selectionListener="#{treeSelectionBean.candDetailsSelect}"
rowSelection="single" id="resId2"
inlineStyle="width:inherit;">
<af:column sortProperty="CandidateId" sortable="true"
headerText="Candidate Id" id="resId2c1" width="80">
<af:commandLink text="#{row.CandidateId}" id="cl4"
actionListener="#{treeSelectionBean.candSearchListener}">
<af:setActionListener from="#{row.ClientId}"
to="#{pageFlowScope.clientId}"/>
<af:setActionListener from="#{row.PeopleId}"
to="#{pageFlowScope.candPeopleId}"/>
</af:commandLink>
</af:column>
<af:column sortProperty="Fullname" sortable="true"
headerText="Candidate Name" id="resId2c2" width="160">
<af:outputText value="#{row.Fullname}" id="ot42"/>
</af:column>
<af:column sortProperty="ClientName" sortable="true"
headerText="Client Name" id="resId2c3" width="165">
<af:outputText value="#{row.ClientName}" id="ot41"/>
</af:column>
<af:column sortProperty="InterviewName" sortable="true"
headerText="Interview Name" id="resId2c4" width="215">
<af:outputText value="#{row.InterviewName}"
id="ot40"/>
</af:column>
<af:column sortProperty="InterviewDate" sortable="true"
headerText="Interview Date" id="resId2c5" width="100">
<af:outputText value="#{row.InterviewDate}"
id="ot38">
<af:convertDateTime pattern="#{bindings.SearchCandVO1.hints.InterviewDate.format}"/>
</af:outputText>
</af:column>
<af:column sortProperty="CandStatusName"
sortable="true"
headerText="Candidate Status" id="resId2c6" width="160">
<af:outputText value="#{row.CandStatusName}"
id="ot39"/>
</af:column>
</af:table>
</af:panelGroupLayout>
</af:dialog>
</af:popup>
Thanks! -
How to control the printer selection popup in SAP SCRIPT .
Hi all,
I have written a print program which is calling 5 different layouts forms and printing all the shipping related documents such as packing list, delivery note, shipping label etc . The print program is
attached to a single output type ZEDM.
The issue is that for printing every document a pop-up comes for the printer selection and i want
only one pop-up and all the document should be printed.
Can anyone tell how to control the pop-ups.
Thanks and Regards,
SyedHi,
Open the form with dialog once. and then other forms pass ' ' to dialog parameter in OPEN_FORM .
Open the form for printing
Capture the return code
Capture messages
Other froms
Open the form for printing
Capture the return code
Capture messages
Whenever you have a new form use START_FORM
CALL FUNCTION 'OPEN_FORM'
EXPORTING
device = 'PRINTER'
dialog = 'X'
form = p_fname
language = sy-langu
OPTIONS = p_itcpo
EXCEPTIONS
canceled = 1
device = 2
form = 3
OPTIONS = 4
unclosed = 5
mail_options = 6
archive_error = 7
invalid_fax_number = 8
more_params_needed_in_batch = 9
spool_error = 10
codepage = 11
OTHERS = 12.
IF sy-subrc <> 0.
w_retcode = 1.
PERFORM protocol_update.
ENDIF.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
device = 'PRINTER'
dialog = ' '
form = p_fname
language = sy-langu
OPTIONS = p_itcpo
EXCEPTIONS
canceled = 1
device = 2
form = 3
OPTIONS = 4
unclosed = 5
mail_options = 6
archive_error = 7
invalid_fax_number = 8
more_params_needed_in_batch = 9
spool_error = 10
codepage = 11
OTHERS = 12.
IF sy-subrc <> 0.
w_retcode = 1.
PERFORM protocol_update.
ENDIF.
CALL FUNCTION 'START_FORM'
EXPORTING
form = w_fname
language = sy-langu
startpage = 'PAGE'
program = sy-repid.
Regards
Krishna -
How to hide the menus in Weblogic Portal?
I have to develop a page in Weblogic Portal 10.0 that uses a portlet for the UI presentation.
I have a requirement that the page is hidden by default. When I navigate to the page by selecting a link, I have to display the contents in that page. While displaying I should hide the portal level menus of other books/pages. But I have to display other contents like logo, etc.
Can some one please help me on how to hide the menus in the selected page?
Edited by: [email protected] on Apr 19, 2010 3:43 AMAs a quick and dirty solution i would edit the navigation jsps (singlelevel/multilevel/yourcustom menu jsp) and disable the navigation for all hidden pages.
Or create a backing file and dynamically change the navigation state on the desktop when the hidden page is requested.
Or have the page in a different portal file if possible and set the same header and footer there as well.
Or You could have a look at the detached portlets. These are used as popups often. -
I have a tool bar that I added within a Form that has few popup menus...
When I Run form on Web layout I noticed I have to right click in order to see the popup menu... Before in client server it would only require left mouse click and the popup menu would display.. is there anyway of setting it so it would display if I hit the left button vs the right button. Reason being users who are used to Non Web based will not know to hit the right mouse button vs. Hit the left mouse button..
Anyway to fix thisI would like to respectfully suggest that windows standards are such that a left-click will select an item, and a right-click will display a pop-up context menu if applicable. I believe the action you describe is how it should be. I mean, even on the page that I use to enter this very note, if I click a link or a button, it will perform the action, and if I right-click in this text box I get editing command shortcuts, right-click on a link I get options for how it is to open, etc.
I don't believe a left click should open a context menu. If your users use other Windows standard programs, this should not be an issue, as this is how they work already.
Gary -
Popup Menus from Fireworks to Dreamweaver
I have created popup menus in fireworks and imported the html
into Dreamweaver. But when I do the table cell resizes to the
menu's expanded size. How can I get it to only take space of the
unexpanded button. Where when expanded the dropdown flows OVER the
underlying page.
Desparately seeking help-
Bobbi JoPost a link to the page, please.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"BobbiJo1" <[email protected]> wrote in
message
news:e26n71$c6h$[email protected]..
>I have created popup menus in fireworks and imported the
html into
>Dreamweaver.
> But when I do the table cell resizes to the menu's
expanded size. How can
> I get
> it to only take space of the unexpanded button. Where
when expanded the
> dropdown flows OVER the underlying page.
>
> Desparately seeking help-
> Bobbi Jo
> -
Popup Menus / Bug ID 4634626
The PopupMenu totorial refers to this bug when it refers to look and feel for popup menus. The bug is reported as being fixed however I cannot find an example of how popupmenus should be used correctly so that they respond to the correct look and feel method of invoking a popup.
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4634626
Does anyone know where I can see an example of how this should be done now as the tutorial seems out of date?
Thanks,
JohnFigured it out. The new API has the following:
public void showIfPopupTrigger (MouseEvent e) {
if (e.isPopupTrigger()) {
show(e.getComponent(),
e.getX(), e.getY());
} -
Popup Menus Dissappear too fast.
I have an application that uses Right-Click popup menus. It worked fine with
CVI v4.01. We upgraded to CVI v5.5 and now they pop up and disappear faster
than they can be clicked on. What governs the timing of these popups? How do
I lengthen their screen display time. They disappear even when the cursor is
located within the menu popup.no, cuz if it extends outside the applet or frame, it usually uses a Window as the root popup container, so it shouldn't do that.
-
Popup menus not working on pages with RSS feed javascript
My popup menus were working OK until I added an RSS feed to
the page that
uses javascript to parse the feed. Has anyone else
experienced this? Or
found a way to parse the RSS feed and still have the popup
menus work?
ThanksOn Tue, 1 Aug 2006 17:42:28 -0500, "D Woods"
<[email protected]>
wrote:
>My popup menus were working OK until I added an RSS feed
to the page that
>uses javascript to parse the feed. Has anyone else
experienced this? Or
>found a way to parse the RSS feed and still have the
popup menus work?
Perhaps, if you post a link to the page that doesn't work,
someone can
show you how to fix it.
Gary -
How to reduce Popup Window Size?
Hello All,
I have one popup window, the height of popup window is being displayed too large.
I used method IF_WD_WINDOW->WINDOW_SIZE( ), there are parameters 'Width' and 'Height' of type string, i have passed '30' and also '30%' like formate, it didn't work.
how to control the size of window? Could you please suggest me?To be honest i havent found the size parameters working, what you can do though is to RESTRUCTURE the TEXT to be displayed in the pop-up, that would allow you to controll the WIDTH of the pop-up.
in my code sample below l_text table has 2 entries, we can further have more inserts to it to gain height.
You can create pop-up with different text, by extending the below source.
data : l_cmp_api type ref to if_wd_component,
l_window_manager type ref to if_wd_window_manager,
l_popup type ref to if_wd_window,
l_text type string_table,
l_api type ref to if_wd_view_controller,
RR_POPUP_WINDOW type ref to IF_WD_WINDOW.
l_cmp_api = wd_this->wd_get_api( ).
l_window_manager = l_cmp_api->get_window_manager( ).
insert `Records marked with RED LED contain error into table l_text.
insert `To proceed processing with errors, select YES for this POP-UP.` into table l_text.
rr_popup_window = l_window_manager->create_popup_to_confirm(
text = l_text
button_kind = if_wd_window=>co_buttons_yesnocancel
message_type = if_wd_window=>co_msg_type_warning
window_title = 'INFO'
window_position = if_wd_window=>co_center
). "#EC
rr_popup_window->subscribe_to_button_event(
button = if_wd_window=>co_button_yes
action_name = 'TO_V_PODETAILS' "action on the view that handles click
action_view = ir_view
is_default_button = abap_true ).
RR_POPUP_WINDOW ->open( ).
Greetings
Prashant -
How to make sweet menus like batman - the dark knight- blueray?
I was watching the dark knight on blue ray last night and wondered how those overlay menus was made?
I know the tech side like AE / PS / ENCORE. But how did they make those?
Is it possible to make overlay menus in Encore cs 4 on blue ray?
Doest it require some other software / scripting?I haven't seen the Blu-ray version yet (nor the DVD), but if the popup menus are animated in some way, then you can't do them in Encore CS4 as that is not an offered feature of the software.
Add a feature request for this ability in a future version of Encore.
Note that Encore CS4
can do static popup menus for Blu-ray just fine. -
HOW TO CONTROL ON CREATION OF SALES ORDER WITH REFERENCE TO EARLIER SO?
Dear All,
I want to contol on creation of Sales order with reference to earlier SO? While creation of sales order our enduser are creating sales order with reference to earlier month SO which I want to restrict. Recently I made changes in sales order like payment terms is grayed, system will atomatically pick pay terms from customer master.Now I am getting correct data also but enduser is using old SO no while creating new SO and old payment data is reflecting in fbl5n.
I want to restrict enduser while creating new SO with ref. to old SO. Only for returns they should be able to use Billing refrence. Pl. suggest how to control the with reference to ealier SO.
NikhilNikhil Deshpande,
If you dont want allow create a sales order in referent to other one, just delete the copy control between these sales order type, so when the user tries to create a SO in reference to other one a message is displayed that is not possible.
Thanks,
Mariano. -
CRM Web UI :- How to Control number of session of Web UI for a user
Hello Experts,
We do have very specific requirement which SAP doesn`t recommend in terms of multi-sessioning for a user.So we are little worried upon the challeges.Could you please share your ideas/Experience on following?
1.How to Control number of Internet explorer session for the web UI (may be 2 or 3).?
Though SAP doesn`t recommned more than one but our client requires 2 or more than that but we need to fix it either
2 or 3.
So we are looking for specific setting for this.
2.What are the challenges we need to face if we implement option 1?
3.Specially in interaction record management
a. Is there chance of loosing the data if agent has opened more than two session.
b. In which session interaction record data will get stored,the one on which agent picked up the call or in the latest
one?
Please let me know if I am not clear enough on any point.
Thanks in advance,
Shailendra TolambiyaHi Shailendra,
The following wiki page might be useful in this respect:
http://wiki.sdn.sap.com/wiki/x/gxdKDQ
Best Regards,
Shiromani -
How to control my MacBook Pro with my iPhone ?
I do wanna know how to control my Macbook pro just with my iPhone, please
If you mean copy files from one to the other you can connect the two via firewire cable and boot one into Target Disk Mode.
Maybe you are looking for
-
Itunes says some of music is not authorized to play on my computer
my old computer's screen was damaged, so i went out and got another one when i did geek squad at best buy took the info off my old computer and put it on my new one this included itunes with all of my music, when i went to sync my ipod to the new com
-
How to stop Safari from realoading page and worst, start at the TOP?
When clicking something, for example an article in an online newspaper, after reading, when you scroll back to the newspaper, Safari reloads and starts at the TOP of the page. This drives me crazy, and I have to work hard to figure out were I was in
-
I want to see my history! FF 24 is set to remember browsing, download, search and form! No items it library!
-
Hi Friends, I want to trigger a wf using change doc, WF should be triggered when FORMABSENCE is getting created, Following Steps I have done till now 1 - I have created a class where i have maintained a custom event and an event handler. 2 - In eve
-
How do I transfer gmail e-mails from a Mac to a pc?
How can I transfer e-mails from Mail in Mac to Outlook in a PC that is in a different city?