Re: Identifying a JPopupMenu

41 views
Skip to first unread message

Ravi Chandra

unread,
Jan 23, 2013, 2:22:29 AM1/23/13
to easyt...@googlegroups.com
Ok...I was able to identify the popup menu after all by using the code below.
JPopupMenuFixture calendarPopupMenu = new JPopupMenuFixture(getRobot(), getRobot().findActivePopupMenu());

On Friday, January 18, 2013 10:35:12 AM UTC+5:30, Ravi Chandra wrote:
Hi,

can someone tell me how I can look up a JPopupMenu using the FEST API? I basically have a custom date/time selection calendar popup, and from the hierarchy I see that this is a JPanel inside a JPopupMenu.

I am looking for a procedure similar to looking up of JPanel using getMainWindow().panel("<panel name>");


Here is the hierarchical structure of the window's components, 

[junit] javax.swing.JFrame[frame1,0,0,855x935,invalid,layout=java.awt.BorderLayout,title=Application Title,resizable,normal,defaultCloseOperation=DO_NOTHING_ON_CLOSE,rootPane=javax.swing.JRootPane[,8,30,839x897,invalid, layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]

[junit]  javax.swing.JRootPane[,8,30,839x897,invalid,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777673,maximumSize=,minimumSize=,preferredSize=]

[junit]   javax.swing.JLayeredPane[null.layeredPane,0,0,839x897,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=64,maximumSize=,minimumSize=,preferredSize=,optimizedDrawingPossible=false]

[junit]  javax.swing.JPanel[,559,297,223x287,layout=java.awt.BorderLayout,alignmentX=0.0,alignmentY=0.0,border=com.jgoodies.looks.common.ShadowPopupBorder@8e79f2,flags=16281,maximumSize=,minimumSize=,preferredSize=]

[junit] javax.swing.JPopupMenu[DateTimePopup,0,0,218x282,layout=javax.swing.plaf.basic.DefaultMenuLayout,alignmentX=0.0,alignmentY=0.0,border=com.jgoodies.looks.plastic.PlasticBorders$PopupMenuBorder@1e83585, flags=328,maximumSize=,minimumSize=,preferredSize=,desiredLocationX=567,desiredLocationY=327,label=,lightWeightPopupEnabled=true,margin=,paintBorder=true]

[junit]  javax.swing.JPanel[CalendarPanel,0,0,212x244,layout=java.awt.BorderLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=73,maximumSize=,minimumSize=,preferredSize=]

Thanks,
Ravi.

Reply all
Reply to author
Forward
0 new messages