Action putValue problem.
I'm sure I'm missing something fundamental here but the below code alters the name as it should but the tooltip text isn't changing.
if(showXML){
toggleListDisplay.putValue(NAME, "Hide XML");
toggleListDisplay.putValue(SHORT_DESCRIPTION, "Hide XML in dialogs and tooltips");
}else{
toggleListDisplay.putValue(NAME, "Show XML");
toggleListDisplay.putValue(SHORT_DESCRIPTION, "Show XML in dialogs and tooltips");
}Can anyone see what I can't?
Did some more investigating.
In the AbstractButton class the createActionPropertyChangeListener() method creates a class containing the following code:
if (e.getPropertyName().equals(Action.NAME)) {
Boolean hide = (Boolean)button.getClientProperty("hideActionText");
if (hide == null || hide == Boolean.FALSE) {
String text = (String) e.getNewValue();
button.setText(text);
button.repaint();
} else if (e.getPropertyName().equals(Action.SHORT_DESCRIPTION)) {
String text = (String) e.getNewValue();
button.setToolTipText(text);
} else if (propertyName.equals("enabled")) {
Boolean enabledState = (Boolean) e.getNewValue();
button.setEnabled(enabledState.booleanValue());
button.repaint();
} else if (e.getPropertyName().equals(Action.SMALL_ICON)) {
Icon icon = (Icon) e.getNewValue();
button.setIcon(icon);
button.invalidate();
button.repaint();
} else if (e.getPropertyName().equals(Action.MNEMONIC_KEY)) {
Integer mn = (Integer) e.getNewValue();
button.setMnemonic(mn.intValue());
button.invalidate();
button.repaint();
} else if (e.getPropertyName().equals(Action.ACTION_COMMAND_KEY)) {
button.setActionCommand((String)e.getNewValue());
}For some reason JMenuItem overrides this method and the code looks like this:
if (e.getPropertyName().equals(Action.NAME)) {
String text = (String) e.getNewValue();
mi.setText(text);
mi.repaint();
} else if (propertyName.equals("enabled")) {
Boolean enabledState = (Boolean) e.getNewValue();
mi.setEnabled(enabledState.booleanValue());
mi.repaint();
} else if (e.getPropertyName().equals(Action.SMALL_ICON)) {
Icon icon = (Icon) e.getNewValue();
mi.setIcon(icon);
mi.invalidate();
mi.repaint();
} else if (e.getPropertyName().equals(Action.MNEMONIC_KEY)) {
Integer mn = (Integer) e.getNewValue();
mi.setMnemonic(mn.intValue());
mi.invalidate();
mi.repaint();
}Note, the SHORT_DESCRIPTION property isn't handled, which would explain why the tool tip doesn't change for menu items.
Similar Messages
-
Action script problem for audio player
i have made a introduction with a audio and controller. I am facing one problem. I will like to play as soon as some one enter the page but it does not.
My action script is pasted below and kindly advise me for any changes that can be done
var soundReq:URLRequest = new URLRequest("Sonu Nigam_Alka Yagnik - Suraj Hua M.mp3");
var sound:Sound = new Sound();
var soundControl:SoundChannel = new SoundChannel();
var volumeControl:SoundTransform = new SoundTransform();
var resumeTime:Number = 0;
sound.load(soundReq); sound.addEventListener(Event.COMPLETE, onComplete);
up_btn.addEventListener(MouseEvent.CLICK, increaseVolume);
down_btn.addEventListener(MouseEvent.CLICK, decreaseVolume);
function onComplete(event:Event):void
play_btn.addEventListener(MouseEvent.CLICK, playSound);
stop_btn.addEventListener(MouseEvent.CLICK, stopSound);
function playSound(event:MouseEvent):void
{ soundControl = sound.play(resumeTime);
pause_btn.visible = true;
pause_btn.addEventListener(MouseEvent.CLICK, pauseSound);
play_btn.visible = false; play_btn.removeEventListener(MouseEvent.CLICK, playSound);
function pauseSound(event:MouseEvent):void {
resumeTime = soundControl.position;
soundControl.stop();
play_btn.visible = true;
play_btn.addEventListener(MouseEvent.CLICK, playSound);
pause_btn.visible = false;
pause_btn.removeEventListener(MouseEvent.CLICK, pauseSound);
function stopSound(event:MouseEvent):void {
soundControl.stop();
play_btn.visible = true;
play_btn.addEventListener(MouseEvent.CLICK, playSound);
pause_btn.visible = false; pause_btn.removeEventListener(MouseEvent.CLICK, pauseSound);
function increaseVolume(event:MouseEvent):void {
volumeControl.volume += .5;
soundControl.soundTransform = volumeControl;
function decreaseVolume(event:MouseEvent):void {
volumeControl.volume -= .5;
soundControl.soundTransform = volumeControl;
pause_btn.visible = false;i am having big problem with the coding below with the sound. As it we enter the site, the music auto start very loud which is not good at all for the ear drums. How do i adjust that?
www.hitenkajal.co.uk
var soundReq:URLRequest = new URLRequest("10 Kabhi Alvida Naa Kehna_0.mp3");
var sound:Sound = new Sound();
var soundControl:SoundChannel = new SoundChannel();
var volumeControl:SoundTransform = new SoundTransform();
var resumeTime:Number = 0;
sound.load(soundReq);
sound.addEventListener(Event.COMPLETE, onComplete);
up_btn.addEventListener(MouseEvent.CLICK, increaseVolume);
down_btn.addEventListener(MouseEvent.CLICK, decreaseVolume);
function onComplete(event:Event):void
play_btn.addEventListener(MouseEvent.CLICK, playSound);
stop_btn.addEventListener(MouseEvent.CLICK, stopSound);
function playSound(event:MouseEvent):void
soundControl = sound.play(resumeTime);
pause_btn.visible = true;
pause_btn.addEventListener(MouseEvent.CLICK, pauseSound);
play_btn.visible = false;
play_btn.removeEventListener(MouseEvent.CLICK, playSound);
function pauseSound(event:MouseEvent):void
resumeTime = soundControl.position;
soundControl.stop();
play_btn.visible = true;
play_btn.addEventListener(MouseEvent.CLICK, playSound);
pause_btn.visible = false;
pause_btn.removeEventListener(MouseEvent.CLICK, pauseSound);
function stopSound(event:MouseEvent):void
soundControl.stop();
play_btn.visible = true;
play_btn.addEventListener(MouseEvent.CLICK, playSound);
pause_btn.visible = false;
pause_btn.removeEventListener(MouseEvent.CLICK, pauseSound);
function increaseVolume(event:MouseEvent):void
volumeControl.volume = 1;
soundControl.soundTransform = volumeControl;
function decreaseVolume(event:MouseEvent):void
volumeControl.volume = 0.1;
soundControl.soundTransform = volumeControl;
pause_btn.visible = false;
playSound(null); -
Corrective actions setup problem
Hi guys!
I have problem with setup corrective action for listener avaliability when status is down and action doesnt work at all. I have create template Listener_stuff with metric trasholds for Response Time (msec) and Status is down. Other details for template are:
Corrective Actions
Critical LSNRCTL START LISTENER_TESTDB2
Allow only one corrective action for this metric to run at any given time (checked)
Advanced Threshold Settings
Critical Threshold: Down
Number of Occurrences: 1
Collection Schedule: Every 1 Minute
And corrective action details for listener are:
Name: LSNRCTL START LISTENER_TESTDB2
Description: lsnrctl start LISTENER_TESTDB2
Target Type: Listener
and *'OS Command' Corrective Action* details are:
Command Type: Single Operation
* Command: lsnrctl start LISTENER_TESTDB2
I have saved credentials for that specific listener and host where listener resides. Also i have created notification rule when specific listener is down and that work ok.
Other details are:
Grid control OMS is version 10.2.0.3 , and agent version on test host is 10.2.0.4.
Host has Red Hat Linux EL 4 OS
Please help me with this, or send me some links with more detailed corrective action examples.....
Thank you!
Edited by: rootsman on Jan 11, 2012 1:21 AMAnd this is what i receive related to corrective action job:
Corrective Action=LSNRCTL START LISTENER_TESTDB2
Created By=SYSMAN
Task Type=Host Command
Target Name=LISTENER_TESTDB2_testdb.domain.com
Target Type=Listener
Timestamp=Jan 11, 2012 12:52:30 PM CET
Status=Failed
Metric=Status
Metric Value=0
Severity=Critical
Rule Name=Listener_test
Rule Owner=TEST
Step Output=
Command:Output Log
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 11-JAN-2012 12:52:29
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Starting /db/agent10g/bin/tnslsnr: please wait...
TNS-12545: Connect failed because target host or object does not exist
TNS-12560: TNS:protocol adapter error
TNS-00515: Connect failed because target host or object does not exist
Linux Error: 2: No such file or directory
~~~End Step Output/Error Log~~~ -
Infotype 0000 Actions overview problem
Hi mates,
we are upgrading DEV system from 4.6C to 6.0.
After upgrading the system we cannot see data on overview screen on infotype 0000, and on all other ITs we can see data.
Could you tell me what could be the problem with IT0000?
Thanks
RomanoHi
This problem may have two possible reason:
1)IT0302.You may need to check your entries in T529A, as you might have
activated this infotype (0302 additional actions)and therefore all
completed actions saved in infotype 0000 (actions)also need to be logged
in infotype 0302.
if this IT has been activated y mistake then just deactivate it, if not
you will need to running report 'RPUEVSUP'.(please check the documenta-
tion of this report before hand).
2)If you do not use IT 0302, you will need to check your setting in
table T77S0.
If the switch ADMIN EVSUP has value '1' In order to deactivate this
functionality 'Additional actions' again, just set the value for this
swith ADMIN EVSUP back to 'blank' in table T77S0.
Group Sem.abbr. Value abbr
ADMIN EVSUP ' '
After deactivating this option, the infotype 0000 records should be
diplayed again on the overview screen.
Regards
Ramana -
I have a big problem with Macromedia Flash MX: primitiv action script associated with button (on (release) {
getURL("page.html","framename");
is not passed to frame "framename" of frameset, but open new window.
On 10.4.6 and older this work perfect, but on 10.4.7. is wron on all browswrs (Safari, IE, Firefox)
Please, help me somebody.
Maybe is problem with java implementation...some updates...?this should work... but using frame is...anyway...
try looking for allowScriptAccess in your embed and object
tag and set it to "always" .. it help sometime when using getURL...
other then this you could call a javascript function witch
change the frame current src... -
Bug in form action configuration: problem with multifield
I’ve created a new page in content/geometrixx-outdoors/en/ and added a form component (from the foundation components).
I configure the form’s start element with the action type ‘Mail’ and add a mail address in the Mailto field (xtype="multifield") in the action configuration area.
I save the configuration and see the start node in the JCR having a property ‘mailto’ with the specified value (as expected).
However, if I open the start element’s configuration dialog again and try to change the mail address (in Mailto) or add another mail address (in Mailto, CC or BCC), clicking the dialog’s OK button doesn’t close the dialog and save the values anymore.
Only after I removw a multifield element, I’m able to save the values by clicking the OK button.
(Tested with FF 11 and Chrome 18.)
I'de like to see this problem fixed.
Can I file this problem description as bug anywhere?I forgott to mention that I've already installed CQ5.5.
Unfortunately, I see this bug not fixed yet.
Note: it's the multifield (xtype="multifield") that's bothering me.
This has nothing to do with the radio or checkbox field. There's no default selection possible. -
BIZTALK bts action mapping problem with Message Schemas for the Composite Operation
Hi,
I have a message schema made with the composite operation.
now, I have re-deployed my biztalk project and in the send port for this Oracle composite message the SOAP action header hasn't updated the correct action.
now I tried several verations for this soap action mapping and this is what I got:
><BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <Operation Name="Select" Action="http://Microsoft.LobServices.OracleDB/2007/03/CompositeOperation" />
> <Operation Name="SQLEXECUTE" Action="http://Microsoft.LobServices.OracleDB/2007/03/CompositeOperation" />
> </BtsActionMapping>
Now as you can see the Composite schema has 2 operations one is from an Oracle VIEW and the second one is an Oracle SQL querry.
please if someone could assist me with this issue?
Message Schemas for the Composite Operation
Message Schemas for the Composite OperationFor Composite Operations you don't use the Action Mapping Xml for both the SQL Server and Oracle bindings.
The Action for Oracle Composite Operations is:
http://Microsoft.LobServices.OracleDB/2007/03/CompositeOperation
by itself. No Xml or anything. -
Tower Defense Action Script Problem
Hi, I've been working my way through a tutorial to create a tower defense game. I've ran into a slight problem with a bit of code:
package{
imporProxy-Connection: keep-alive
Cache-Control: max-age=0
I get an Identifier 1078 error, I was hoping that someone might be able to tell me a little more about what this is doing, and
if anyone knows of a solution. Any help would be greatly appreciated!
Here is the link for the tutorial
http://www.flashgametuts.com/tutorials/as3/how-to-create-a-tower-defense-game-in-as3-part- 2/Remove the 2 lines. They're not AS.
imporProxy-Connection: keep-alive
Cache-Control: max-age=0 -
Put in DVD and then no dvd action, finder problems
If I put a dvd in nothing happens and disk utility freezes.
DVD wont come out, wont mount, wont spin.
Eventually finder bogs down.
REstart with disk in is necessary to regain normalcy.
This is a fresh system reinstall a few days ago.
Same problem prior to reinstall too."by removing it and making an appointment at the genius bar?
AASP??? nerd division of AARP?"
Either genius bar or Authorized Apple Service Provider. That's so you don't have any clunk head messing with your Mac. -
Hi All,
I Have written a program to delimit the most recent record of PA0000 and creating a new record by giving the Personnel.no , action type and date in selection screen.
It is delimiting and creating a new record in PA0000 perfectly.
But if i see in PA30 by selecting 0000 ActionsType in display mode i can able to see the newly created record,but i am not able see the new record in overview tab.
hope my question is understood, otherwise please feel free if u have any doubts about my question.
as this is urgent to me, please give me a reply .
Thanks,
JKR.Hi,
Please activate additional actions.
GO to :IMG>Personnal Mngt>Personnel Admin>Customise procedures>Actions-->Set up Personnal actions -->Activation 'Additional Actions'
Remove Test and click on execute.
then check with the overview in pa30 for actions infotype 0000
Regards,
Pranitha -
Simple action creating problem
Hi. I'm having a problem with this simple script. All I want
to is "onClipEvent" go to the next frame in the current movie. I
have it set to _root - but want to use the next frame in the movie
symbol only. Anyone have advice?Is there any sites you guys know of that actually teaches you
the concept of coding.(actionscript) -
JComboBox Action Event problems
I have a complex UI with which I am having action event issues. Basically, the panel displays info about an object, which can be selected from within the panel through a button/popup window mechanism. A JComboBox (#1) selection determines the contents of another JComboBox (#2) on the same panel. Currently an ActionEvent fires when the user makes a selection using #1 that updates #2. This fuctions correctly with repeated testing so long as a new object is not selected.
When a new object is selected from within this panel this ActionEvent no longer fires. JComboBox #1 will be updated correctly and #2 will reflect the initial selection in #1, but user selections in #1 will not fire the ActionEvent and thus #2 is never updated.
Any help is appreciated. I feel like I'm missing something basic here, but I've stared at it for long enough...By the way, the workaround is to use the ItemListener as the ItemStateChanged Event is fired reliably.
-
Session putValue problem ??
I have a byte array in jsp and need to put on session and get by a servlet, can any one tell me how to write ?
Thank you very much !!Thanks
I need to know how to put and get !!
put
String menu[] = {'a','b','c'}
session.putValue("MENU",menu);
get
String menu [] = (String) session.getValue("MENU");
Is it correct? -
I have created the following code and i want the "btnCreate" to open the frame eqstring, i have tried to implement the action listener and it compiles but when i run it the button does nothing
pnlCreate.add(btnCreate);
pnlSimpleExample.add(btnSimpleExample);
pnlHardExample.add(btnHardExample);
pnlTitle.add(new Label("MAIN MENU"));
pnlTitle.setFont(new Font("Arial", Font.BOLD, 36));
// Setup Main Frame
f.getContentPane().setLayout(new BorderLayout());
f.getContentPane().add(pnlCreate, BorderLayout.SOUTH);
f.getContentPane().add(pnlSimpleExample, BorderLayout.WEST);
f.getContentPane().add(pnlHardExample, BorderLayout.EAST);
f.getContentPane().add(pnlTitle, BorderLayout.NORTH);
this.setSize(300, 300);
btnCreate.addActionListener(
new ActionListener()
public void actionPerformed(ActionEvent e)
eqstring mainFrame = new eqstring();
}I think warnerja is stressed and really thinks you
should check out this
[url=http://forum.java.sun.com/rewards.jspa?&threadID=
5150158&messageID=9562382&dukes=10&doActions=rewardtru
e&actionButton=Reward+Duke+Stars]very helpful Java
tool that you can put your code into and itwill tell you what you did wrong.
:-) -
Hi All,
I have an action profile(Method Call) which sends an E-Mail notification for Sales Quotation. This triggers when the status is changed to approved and the document is saved. The E-Mail notification is sent but the Indicator in the scheduled actions(Web UI) is incorrect(and indicator is in red). Can any 1 help me?
Regards,
Pradeep.Hi Pradeep,
Please check if you have set the parameter rp_status = '1' when the email has been sent successfully.
Regards,
Shobhit
Maybe you are looking for
-
How can I get high quality video that will play on my Touch as well as ATV?
Within iMovie there are output settings for the iPod and for the Apple TV. Now I fully understand the video resolution restrictions of the iPod Touch, so I am happy using a widescreen resolution of 640x360 ("Medium" output setting). What I am not hap
-
BI Content Administration entries of BO server
Hi I have installed BI and BO and started integration of BI BO. My question is. i am in middle of process like adding entries in transaction /CRYSTAL/RPTADMIN (Content Administration Workbench). i have given system details and rfc details and also te
-
I am deploying my application components on Oracle RAC database, when i install my app component i will run a script which creates a user and tablespace on bot rac-nodes(node1 and node2) as database is clustered, the user are created on 2 nodes and t
-
when I conenct it says not charging and also is not visualizing ipad in itunes. I am using original cable which works if I charge ipad with adapter. What I have to do ?
-
Help with ipod update - updating it without a cable
Hi, I've just received my new ipod after sending my old one back. I plugged it in and I needed to update it so I did. Not realising you needed a charger to complete the update. Its now showing the charger icon. Is there any way I could reset or cance