Updating labels

Dear All,
I am pretty new to LabView and tried to find any Posts on how to programmable change the labels of indicators or at least use the property node to change the visibilty of the caption, which for some reason just works after I manually change the indicator under the properties.
so my questions are:
Is there a possible way to change the labels in RunTime Mode? If yes how?
and
Why can you change the visibility of the caption just after you activated it once manually? Is that a bug and is there a fix?
Thanks in Advanced
Oliver
LV8.2 /WinXP

I'm not sure what to say.  I duplicated your example and it works for me.
You're also using LV8.2 on WinXP. 
Actually, I changed the caption text manually, then ran the VI which changed it at runtime.  That was to show that changing it or not had no effect.
However, I do have a question.  Are you changing properties of the boolean indicator elsewhere in the code?  Maybe you have a race condition (code at another place undoing what code was supposed to do... ok bad description of race condition. LOL! )
Here's the new pic.
Message Edited by JoeLabView on 11-22-2007 05:53 PM
Attachments:
captionWorks.PNG ‏16 KB

Similar Messages

  • Custom viewer setUserInfo : no updating labels and library?

    Hi all,
    I was wondering:
    If you log in using the native "log in" button in a custom viewer, you see the label change to "log out" and you see the library updating...
    Wouldn't it make more sense if the same would happen if you set the user info using the setUserInfo function?
    Regards,
    M.

    Richard,
    maybe, when the issues don't appear in the content viewer anymore this
    might have to do with v21, wich requires you to set up the orientations you
    want first and then fails to appear on the iPad if you have not added all
    orientations.
    if your folio is only one orientation and you switched to v21, the folio
    settings need to reflect that.
    maybe you can try with a new folio, look at the settings in the new folio
    window.
    this is my initial shot in the dark.
    but if you can provide the product Id to James Roche, he might be able to
    investigate further.
    —Johannes
    (mobil gesendet)
    Am 14.07.2012 15:56 schrieb "Richard Brammer" <[email protected]>:
       Library empty: live App and content viewer  created by Richard Brammer<http://forums.adobe.com/people/Richard+Brammer>in
    Digital Publishing Suite - View the full discussion<http://forums.adobe.com/message/4557527#4557527

  • Updating labels dynamically for a standard transaction - PR05

    Hi All,
    I have a change to do in PR05 Transaction.
    In PR05 -> After hitting Create button -> Enter From/End date -> Then in line item level Enter Travel Expense Type & Amount and select that row and -> Hit on Infos[Addl. Receipt Info.] button then -> it will show 1/2/3 text boxes in Addnl. Info tab.
    Now my requirement is for these 3 text boxes i need to change the 'Labels'  Like changing Business Purpose to Purpose after checking against one Z-Table entries, changing Location to some other lable and so on...
    How can this be achieved for this Screen in PR05.
    What is the approach would be!
    Thanks in advance.
    Thanks,
    Deep.

    Hi,
    Any Resolution for above posted issue!
    Thanks,
    Deep.

  • How do I update label names in images?

    Over time, I've changed the way I use the star ratings and the labels.
    So, if I have an image with a green label that's named X and I change the green label to be Y, HOW do I get the image to have Y and a green label instead of X and a white label?
    I can't find a method in the search that looks at the label text in the image, so how do I find all the images with "X" so I can change them to "Y"?

    Thanks Rikk..........
    Internal groans and laughter here!  That's exactly WHAT I UNDID!!!!!!!!!!  I activated the library filter, and on the "Label" pane, I replaced label with Metadata status (never even LOOKED at the label data) - which didn't work, then opened text and tried putting in the label names, which didn't work, then I did a search through all the menu pulldowns, then an Internet search....  Had I actually LOOKED at the data in "label", I'd have saved myself a lot of fiddling and a bit of embarrassment!
    Off to change a LOT of labels!

  • Update Jcombobox 's label in render

    hi ,everybody, i have a problem about combobox, any body can help me!
    thank you!
    I want to have a combobox with checkbox as item, I rewrite a render writen by ice, because the combobox has three state, when I click diferent checkbox in this combobox , the label of combobox will update rightly, but if I click one checkbox to change the checkbox state ,the label will no update , it seem that when I click one checkbox many times .the menthod
    getListCellRendererComponent(JList list, Object value, int index,
                        boolean isSelected, boolean cellHasFocus)
    will no update label
    my code :
    mainclass:
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.util.Iterator;
    import java.util.Vector;
    import javax.swing.DefaultListCellRenderer;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JList;
    import javax.swing.JPanel;
    import javax.swing.plaf.basic.BasicComboBoxEditor;
    public class mainclass {
          public static void main(String[] args) {
                 final testbox myComboBox = new testbox();
                 myComboBox.addItem("SelectAll");
                 myComboBox.addItem("ClearAll");
                 myComboBox.addItem("GrayedAll");
                 for(int i = 0; i < 5; i++) {
                     myComboBox.addItem("Item " + i);
                 JFrame frame = new JFrame("My ComboBox");
                 frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
                 frame.setSize(150, 60);
                 frame.setLocation(300, 300);
                 //frame.setJMenuBar( menubar );
                 JPanel panel=new JPanel();
                 panel.setLayout(new BorderLayout());
                 panel.add(myComboBox,BorderLayout.NORTH);        
                 frame.getContentPane().add(panel);
                 frame.setVisible(true);
                 final IconedCellRendererField renderer = IconedCellRendererField.getCheckBoxRendererInstance();
                 myComboBox.setRenderer(renderer);
                 myComboBox.addActionListener(new ActionListener()
                     public void actionPerformed(ActionEvent e)
                          if(myComboBox.getSelectedItem().toString().equals("SelectAll")){
                               renderer.selectAll(true);                         
                          if(myComboBox.getSelectedItem().toString().equals("ClearAll")){
                               renderer.clearAll(true);
                          if(myComboBox.getSelectedItem().toString().equals("GrayedAll")){
                               renderer.grayedAll(true);
    }renderer:
    import java.awt.*;
    import java.awt.event.*;
    //import java.io.*;
    //import java.net.*;
    import java.util.*;
    import javax.swing.*;
    //import javax.swing.event.*;
    import javax.swing.border.*;
    //import javax.swing.table.*;
    public class IconedCellRendererField extends DefaultListCellRenderer implements MouseListener {
         public Icon icon, selIcon;
         Icon[] icons = null;
         public boolean useIconBackground = true, useIndexSensitiveIcons = false,
                   useCheckBoxAsIcon = false, useLinkState = false;
         Dimension labelDim = null;
         public JLabel iconLabel;
         public JCheckBox box = null;
         public JPanel noback;
         public SelectionStateHandler selStateHandler = null;     
         private JList theList = null;
         public boolean[] selState = null, enableState = null;
         int offset = 5;
         Rectangle rect = null;
         int currentLinkRow = -1;
         boolean isOnRow = false, paintDivider = false;
         private Icon dividerImage = null;     
         private Color linkColor = Color.blue, hoverColor = Color.red, selectedLinkColor = Color.green;
         /* Initialises the renderer with one icon that is displayed without the
          * cell background.
         public IconedCellRendererField(Icon icon) {
              this(icon,false);
         /* Initialises the renderer with two icons that provide a switch capability
          * when a row is selected/deselected
         public IconedCellRendererField(Icon icon, Icon selIcon) {
              this.icon = icon;
              this.selIcon = selIcon;
              //addMouseListener(this);
         /* Initialises the renderer with two icons that provide a switch capability
          * when a row is selected/deselected. The boolean argument enables the icon
          * to either use the renderer background or appear transparent.
         public IconedCellRendererField(Icon icon, Icon selIcon, boolean useIconBackground) {
              this(icon, selIcon);
              setIconHasBackground(useIconBackground);
              createNoBackgroundPanel();
         /* Initialises the renderer with a single no siwthing icon. The boolean
          * argument enables the icon to either use the renderer background
          * or appear transparent.
         public IconedCellRendererField(Icon icon, boolean useIconBackground) {
              this(icon, icon, useIconBackground);
         /* Initialises the renderer to load two icons from the provided image locations.
          * This enables icon switching on selection.
         public IconedCellRendererField(String iconLoc, String selIconLoc) {
              icon = new ImageIcon(iconLoc);
              selIcon = new ImageIcon(selIconLoc);
              //addMouseListener(this);
         /* Initialises the renderer to load a single icon from the provided image location.
          * The icon can either have the renderer background or not based on the
          * boolean property.
         public IconedCellRendererField(String iconLoc, boolean iconBackground) {
              this(iconLoc, iconLoc, iconBackground);
         /* Initialises the renderer to load two icons from the provided image locations.
          * This enables icon switching on selection. The icon can either have the renderer
          * background or not based on the boolean property.
         public IconedCellRendererField(String iconLoc, String selIconLoc, boolean iconBackground) {
              this(iconLoc, selIconLoc);
              setIconHasBackground(iconBackground);
              createNoBackgroundPanel();
         /* Initialises the renderer to load a single icon from the provided image location.
         public IconedCellRendererField(String iconLoc) {
              this(iconLoc, true);
         /* Initialises the renderer with an array of image icons that are repeated for
          * each row in the list.
         public IconedCellRendererField(Icon[] icons, boolean useIconBackground) {
              this(icons[0], icons[0], useIconBackground);
         public void createNoBackgroundPanel() {
              iconLabel = new JLabel((Icon)null, JLabel.CENTER);
              if(labelDim != null) {      iconLabel.setPreferredSize(labelDim); }
              iconLabel.setBorder( new EmptyBorder(1,5,1,5) );
              noback = new JPanel( new BorderLayout() ) {
                  * Overridden for performance reasons.
                  * See the <a href="#override">Implementation Note</a>
                  * for more information.
                  //public void validate() {}
                 // public void invalidate() {}          
                  public void repaint() {}
                  //public void revalidate() {}
                  public void repaint(long tm, int x, int y, int width, int height) {}
                  public void repaint(Rectangle r) {}
                  protected void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
                        // Strings get interned...
                        if (propertyName == "text"
                                   || ((propertyName == "font" || propertyName == "foreground")
                                       && oldValue != newValue)) {
                            super.firePropertyChange(propertyName, oldValue, newValue);
                  public void firePropertyChange(String propertyName, byte oldValue, byte newValue) {}
                  public void firePropertyChange(String propertyName, char oldValue, char newValue) {}
                  public void firePropertyChange(String propertyName, short oldValue, short newValue) {}
                  public void firePropertyChange(String propertyName, int oldValue, int newValue) {}
                  public void firePropertyChange(String propertyName, long oldValue, long newValue) {}
                  public void firePropertyChange(String propertyName, float oldValue, float newValue) {}
                  public void firePropertyChange(String propertyName, double oldValue, double newValue) {}
                  public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) {}
              if(useCheckBoxAsIcon()) {
                   box = new JCheckBox();
                   //box.addMouseListener(this);
                   box.setOpaque(false);
                   noback.add( box, BorderLayout.WEST );
                   //noback.addMouseListener(this);
                   rect = box.getBounds();
                   //list.addMouseListener(this);
              } else {
                   noback.add( iconLabel, BorderLayout.WEST );
              noback.add( this, BorderLayout.CENTER );
              noback.setBorder( new EmptyBorder(1,1,1,1) );
              noback.setOpaque(false);
         public Component getListCellRendererComponent(JList list, Object value, int index,
                        boolean isSelected, boolean cellHasFocus) {
              System.out.println(value+"+"+index+"+"+isSelected+"+"+cellHasFocus);
              if(theList == null || theList != list) {
                   theList = list;
                   if(useLinkState) {
                        attachLinkSimulationListener();
              setOpaque(true);
              setText( value == null ? "" : value.toString());
              if(useIndexSensitiveIcons) {
                   icon = getIcon(index);
              if(useIconBackground)
                   setIcon(icon);          
              setFont( list.getFont() );
              setToolTipText(value.toString() );
              if(list.isEnabled())
                   setEnabled( isEnabled(index) );
              else
                   setEnabled( list.isEnabled() );
              if(isSelected && isEnabled(index) ) {
                   setForeground( Color.black );
                   setBackground( new Color(223, 235, 245) );
                   if(useIndexSensitiveIcons) {
                        selIcon = getIcon(index);
                   if(useIconBackground)
                        setIcon(selIcon);
              } else {
                   setForeground(Color.black);
                   setBackground(Color.white);
                   setBorder(null);
              if(cellHasFocus) {
                   setBorder( new CompoundBorder( new LineBorder( new Color(150, 150, 220) ),
                                                      new EmptyBorder(2,2,2,2)  ) );
              } else {
                   setBorder( new EmptyBorder(2,2,2,2));
              if(useLinkState) {
                   if(currentLinkRow == index) {
                        setText("<html><u>" + value.toString()+"</u></html>" );     
                        setForeground( getHoverLinkColor() );               
                   } else {
                        setForeground( getLinkColor() );
                   if(isSelected) {
                        setForeground( getSelectedLinkColor() );
                   setBackground(Color.white);
                   setBorder( new EmptyBorder(1,1,1,1) );
              if( shdPaintDivider() ) {
                   Border border = null;
                   if(dividerImage != null) {
                        border = new MatteBorder(0,0,1,0, dividerImage);
                   } else {
                        border = new MatteBorder(0,0,1,0, getLinkColor() );
                   if(index < theList.getModel().getSize() - 1 ) {
                        setBorder( new CompoundBorder(getBorder(),border) );
                   } else {
                        setBorder( new EmptyBorder(1,1,1,1) );
              if(useIconBackground == false) {
                  if(isSelected)
                      iconLabel.setIcon(selIcon);
                  else
                      iconLabel.setIcon(icon);
                  if(useCheckBoxAsIcon()) {
                      if(selState == null) {
                          updateSelectionStateTrackers(list);
                      if(selStateHandler == null) {
                          list.addMouseListener( selStateHandler = new SelectionStateHandler(list) );
                      try {
                          box.setSelected( selState[index] );
                      } catch(Exception e) {}
                  if( shdPaintDivider() ) {              
                      //if(index < theList.getModel().getSize() - 1 ) {
                          noback.setBorder( getBorder() );
                          setBorder( new EmptyBorder(1,1,1,1) );
                      //} else {
                      //  noback.get
                  // this should cause a JComboBox to paint the Label instead of the
                  // check box + label combination
                  if(index == -1) {
                       Vector<Object> v=new Vector<Object>();
                       v=getSelectedObjects();
                        String val=generateString();
                       JLabel label=new JLabel(val);                    
                      if(iconLabel.getIcon() != null) {
                           label.setIcon( iconLabel.getIcon() );
                      System.out.println("label");
                      return label;
                  return noback;
              return this;
         public String generateString()
              String val = "";
              if(selState[0]==true&&selState[1]==false&&selState[2]==false){
                    for(int i = 3; i < theList.getModel().getSize(); i++) {
                           String curString=theList.getModel().getElementAt(i).toString();
                           if(val.length()==0){
                                  val=val+curString+"-1";
                           } else {                              
                                  val=val+"&"+curString+"-1";
               //clear all     
               if(selState[1]==true&&selState[0]==false&&selState[2]==false ){                                   
                      for(int i = 3; i < theList.getModel().getSize(); i++) {
                           String curString=theList.getModel().getElementAt(i).toString();
                           if(val.length()==0){
                                  val=val+curString+"-0";
                           } else {                              
                                  val=val+"&"+curString+"-0";
              //grayedall
               if(selState[2]==true&&selState[0]==false&&selState[1]==false ){                                   
                      val="";                      
               if(selState[0]==false&&selState[1]==false&&selState[2]==false ){
                    for(int i = 3; i < theList.getModel().getSize(); i++) {
                           String curString=theList.getModel().getElementAt(i).toString();
                           if(selState==true&&enableState[i]==false){
                             continue;
                        if(selState[i]==true&&enableState[i]==true){
                             if(val.length()==0){
                                       val=val+curString+"-1";
                             } else {                              
                                       val=val+"&"+curString+"-1";
                        if(selState[i]==false&&enableState[i]==true){
                             if(val.length()==0){
                                       val=val+curString+"-0";
                             } else {                              
                                       val=val+"&"+curString+"-0";
              return val;
         public void updateSelectionStateTrackers(JList list) {
              selState = new boolean[ list.getModel().getSize() ];
              enableState = new boolean[ list.getModel().getSize() ];
              for(int i = 0; i < selState.length; i++) {
                   selState[i] = false;
                   enableState[i] = true;
         public int[] getSelectedIndices() {
              if(!useCheckBoxAsIcon()) {
                   return new int[0];
              int length = 0;
              if(selState==null){
                   return null;
              for(int i = 0; i < selState.length; i++) {
                   if(selState[i]) {
                        length++;
              int[] indices = new int[length];
              for(int i = 0, n = 0; i < selState.length; i++) {
                   if(selState[i]) {
                        indices[n++] = i;
              //System.out.println("Selected Indices.length = " + indices.length);
              return indices;
         public Vector<Object> getSelectedObjects() {
              int[] indices = getSelectedIndices();
              Vector<Object> objects = new Vector<Object>();
              if(indices==null){
                   return null;
              for(int i = 0; i < indices.length; i++) {
                   objects.addElement( theList.getModel().getElementAt(indices[i]) );
              return objects;
         public void setIconHasBackground(boolean b) {
              useIconBackground = b;
         public Icon[] getIcons() {
              return icons;
         public Icon getIcon(int index) {
              if(icons != null && icons.length == 0) {
                   return icon;
              if(icons != null && index > icons.length) {
                   index = index - (icons.length - 1);
              return icons[index];
         public void setIcons(Icon[] icons) {
              if(icons != null) {
                   useIndexSensitiveIcons = true;
              this.icons = icons;
         public void setIcon(Icon icon, int index) {
              if(icons != null && icons.length > 0) {
                   icons[index] = icon;
         public void setIconLabelDimension(Dimension dim) {
              labelDim = dim;
         public static IconedCellRendererField getCheckBoxRendererInstance() {
              IconedCellRendererField cr = new IconedCellRendererField(new EmptyIcon());
                   cr.setUseCheckBoxAsIcon(true);
              return cr;
         public void setUseCheckBoxAsIcon(boolean use) {
              useCheckBoxAsIcon = use;
              createNoBackgroundPanel();
         public boolean useCheckBoxAsIcon() {
              return useCheckBoxAsIcon;
         public void paintComponent(Graphics g) {
              super.paintComponent(g);
         public void setDisplayItemsAsLinks(boolean use) {
              useLinkState = use;
         public void setLinkColor(Color color) {
              linkColor = color;
              if(theList != null) {
                   theList.repaint();
         public Color getLinkColor() {
              return linkColor;
         public void setHoverLinkColor(Color color) {
              hoverColor = color;
              if(theList != null) {
                   theList.repaint();
         public Color getHoverLinkColor() {
              return hoverColor;
         public void setSelectedLinkColor(Color color) {
              selectedLinkColor = color;
              if(theList != null) {
                   theList.repaint();
         public Color getSelectedLinkColor() {
              return selectedLinkColor;
         public void attachLinkSimulationListener() {
              theList.setCursor( Cursor.getPredefinedCursor(Cursor.HAND_CURSOR) );
              theList.addMouseListener( new MouseAdapter() {
                   public void mouseEntered(MouseEvent e) {
                        isOnRow = true;                    
                   public void mouseExited(MouseEvent e) {
                        isOnRow = false;
    currentLinkRow = -1;
    theList.repaint();
              theList.addMouseMotionListener( new MouseMotionAdapter() {
                   public void mouseMoved(MouseEvent e) {
    isOnRow = true;
    currentLinkRow = theList.locationToIndex( e.getPoint() );
    theList.repaint();
              /*table.addMouseListener(new MouseAdapter() {
    public void mouseEntered(MouseEvent e) {
    public void mouseExited(MouseEvent e) {
    isOnRow = false;
    currentHighlightRow = -1;
    table.repaint();
    table.addMouseMotionListener( new MouseMotionAdapter() {
    public void mouseMoved(MouseEvent e) {
    isOnRow = true;
    currentHighlightRow = table.rowAtPoint( e.getPoint() );
    table.repaint();
         public boolean shdPaintDivider() {
              return paintDivider;
         public void setPaintDivider(boolean paintDivider) {
              this.paintDivider = paintDivider;
         public void setDividerImage(Icon icon) {
              this.dividerImage = icon;
              setPaintDivider(true);
         private void dispatchEvent(MouseEvent me) {
    if(rect != null && box != null && rect.contains(me.getX(), me.getY())){
    Point pt = me.getPoint();
    pt.translate(0,0);
    box.setBounds(rect);
    box.dispatchEvent(new MouseEvent(box, me.getID()
    , me.getWhen(), me.getModifiers()
    , pt.x, pt.y, me.getClickCount()
    , me.isPopupTrigger(), me.getButton()));
    if(!box.isValid()) {
         repaint();
         System.out.println("Dispatch Event: Box.invalid called");
    System.out.println("Dispatch Event called");
    } else {
         System.out.println("Dispatch Event Called, rect null");
    public void mouseClicked(MouseEvent me){
    dispatchEvent(me);
    public void mouseEntered(MouseEvent me){
    dispatchEvent(me);
    public void mouseExited(MouseEvent me){
    dispatchEvent(me);
    public void mousePressed(MouseEvent me){
    dispatchEvent(me);
    public void mouseReleased(MouseEvent me){
    dispatchEvent(me);
    public class SelectionStateHandler extends MouseAdapter {
         JList list = null;
         public SelectionStateHandler(JList list) {
              this.list = list;
         public void mouseClicked(MouseEvent e)
              * Handles the checkbox selection process. Uses the bounds property of the
              * check box within the selected cell to determine whether the checkbox should
              * be selected or not
              public void mouseReleased(MouseEvent e) {
                   /*if(list == null || list.getSelectedIndex() == -1
         || !isEnabled( list.locationToIndex(e.getPoint()) ) ) {
         return;
              if(list == null || list.getSelectedIndex() == -1){
                   return;
         int[] indices = list.getSelectedIndices();
         // get the current relative position of the check box
         //rect = box.getBounds(rect);
         for(int i = 0; i < indices.length; i++) {
         // get the current relative position of the check box
         int loc = list.locationToIndex( e.getPoint() );
         rect = list.getCellBounds(loc,loc);
         // ensure the point clicked in within the checkBox
         if(e.getX() < (rect.getX() + 20) ) {
              Object obj=list.getModel().getElementAt(i);
              //if(!obj.equals("SelectAll")&&!obj.equals("ClearAll")&&!obj.equals("GrayedAll")){
                   if(indices[i]>2){
                        selState[0]=false;
                        selState[1]=false;
                        selState[2]=false;
                        //����
                        if(!this.isEnabled(indices[i])&&selState[indices[i]]==true){
                             this.setEnabled(indices[i],true);
                             selState[indices[i]]=false;
                        } else if(this.isEnabled(indices[i])&&selState[indices[i]]==true){
                             //����
                             selState[indices[i]]=true;
                             this.setEnabled(indices[i],false);                              
                        }else if(this.isEnabled(indices[i])&&selState[indices[i]]==false){
                             //����
                             selState[indices[i]]=true;
                             this.setEnabled(indices[i],true);
                   } else {
                        selState[indices[i]] = !selState[indices[i]];
         list.revalidate();
         list.repaint();
         public void selectAll(boolean b) {
              for(int i = 0; i < list.getModel().getSize(); i++) {
                   try {
                        this.enableAll(true);
                        Object obj=list.getModel().getElementAt(i);
                        if(!obj.equals("ClearAll")&&!obj.equals("GrayedAll")){
                             selState[i] = b;
                        } else{
                             selState[i]=!b;
                        selState[0]=false;
                   } catch(ArrayIndexOutOfBoundsException aie) {
                        updateSelectionStateTrackers(list);
                        selectAll(b);
                        return;
              if(list != null) {
                   list.revalidate();
                   list.repaint();
         public void clearAll(boolean b){
              for(int i = 0; i < list.getModel().getSize(); i++) {
                   try {
                        Object obj=list.getModel().getElementAt(i);
                        this.enableAll(true);
                        if(!obj.equals("ClearAll")){
                             selState[i] = !b;
                        } else{
                             selState[i]=b;
                        selState[1]=false;
                   } catch(ArrayIndexOutOfBoundsException aie) {
                        updateSelectionStateTrackers(list);
                        selectAll(b);
                        return;
              if(list != null) {
                   list.revalidate();
                   list.repaint();
         public void grayedAll(boolean b){
              for(int i = 0; i < list.getModel().getSize(); i++) {
                   try {
                        Object obj=list.getModel().getElementAt(i);
                        if(!obj.equals("SelectAll")&&!obj.equals("ClearAll")){
                             if(i==2){
                                  selState[i] = !b;
                             }else{                             
                                  selState[i] = b;
                             this.setEnabled(i,false);
                        } else{
                             selState[i]=!b;                          
                   } catch(ArrayIndexOutOfBoundsException aie) {
                        updateSelectionStateTrackers(list);
                        selectAll(b);
                        return;
              if(list != null) {
                   list.revalidate();
                   list.repaint();
         public void setSelectedIndex(int index) {
              for(int i = 0; i < list.getModel().getSize(); i++) {
                   selState[i] = false;
              selectIndex(index);
         public void selectIndex(int index) {
              try {
                   selState[index] = true;
              } catch(ArrayIndexOutOfBoundsException aie) {
                   updateSelectionStateTrackers(list);
                   selectIndex(index);
                   return;
              if(list != null) {
                   list.revalidate();
                   list.repaint();
         public void setEnabled(int index, boolean b) {
              try {
                   enableState[index] = b;
              } catch(ArrayIndexOutOfBoundsException aie) {
                   updateSelectionStateTrackers(list);
                   setEnabled(index, b);
         public boolean isEnabled(int index) {
              if(index == -1) {
                   return true;
              boolean isEnabled = true;
              try {
                   isEnabled = enableState[index];
              } catch(ArrayIndexOutOfBoundsException aie) {
                   updateSelectionStateTrackers(list);
                   return isEnabled(index);
              return isEnabled;
         public void enableAll(boolean b) {
              for(int i = 0; i < enableState.length; i++) {
                   enableState[i] = b;
    public void selectAll(boolean b) {
         if(selStateHandler == null) {
              return;
         selStateHandler.selectAll(b);
    public void clearAll(boolean b){
         if(selStateHandler == null) {
              return;
         selStateHandler.clearAll(b);
    public void grayedAll(boolean b){
         if(selStateHandler == null) {
              return;
         selStateHandler.grayedAll(b);
    public void setSelectedIndex(int index) {
         if(selStateHandler == null) {
              return;
         selStateHandler.setSelectedIndex(index);
    public void selectIndex(int index) {
         if(selStateHandler == null) {
              return;
         selStateHandler.selectIndex(index);
    public void enableAll(boolean b) {
         if(selStateHandler == null) {
              return;
         selStateHandler.enableAll(b);
    public void setEnabled(int index, boolean enable) {
         if(selStateHandler == null) {
              return;
         selStateHandler.setEnabled(index, enable);
    public boolean isEnabled(int index) {
         if(selStateHandler == null) {
              return true;
         return selStateHandler.isEnabled(index);
    public boolean isEnabledAll() {
         if(enableState == null) return true;
         for(int i = 0; i < enableState.length; i++) {
              if(!isEnabled(i)) {
                   return false;
         return true;
    // EmptyIcon implementation
    public static class EmptyIcon implements Icon {
         int width = 16, height = 16;
         public EmptyIcon() {
         setSize(16,16);
         public EmptyIcon(int width, int height) {
         setSize(width, height);
         public void setSize(int width, int height) {
         this.width = width;
         this.height = height;
         public int getIconWidth() {  return width; }
         public int getIconHeight() { return height; }
         public void paintIcon(Component c, Graphics g, int x, int y) {}
    public int getItemCount(){
         if(theList!=null){
              return theList.getModel().getSize();
         } else {
              return 0;
         public boolean[] getEnableState() {
              return enableState;
         public boolean[] getSelState() {
              return selState;
         public JList getTheList() {
              return theList;
    testbox :import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JFrame;
    import javax.swing.JComboBox;
    import javax.swing.JMenu;
    import javax.swing.JMenuBar;
    public class testbox extends JComboBox
    * @param args
    JComboBox myComboBox;
    public testbox()
    myComboBox = new JComboBox();
    public void setPopupVisible(boolean b)
         if(b)
              myComboBox.showPopup();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             

    You are updating the label value when (index == -1), let change into (index<=0).
    like below
    // this should cause a JComboBox to paint the Label instead of the
                // check box + label combination
                if (index <= 0) {
                    Vector v = new Vector();
                    v = getSelectedObjects();
                    String val = generateString();
                    JLabel label = new JLabel(val);
                    if (iconLabel.getIcon() != null) {
                        label.setIcon(iconLabel.getIcon());
                    System.out.println("label");
                    return label;
                }

  • How to show data value labels in the charts without moving my mouse on the data point?

    Sometimes I need to show a chart with data value labels which is not necessary to move my mouse on the data points. However, it seems Xcelsius does not support this simple feature. Any alternative ways?
    Many thanks!

    Currently, Xcelsius does not support display of labels at data points. It would be difficult to move and update labels on a chart with dynamically updated data. However, a work around for a static chart would be to add a Label component in the desired location. This can be done for multiple static charts by using dynamic visibility.

  • Php question: capturing data in a form  for mysql update

    I'm trying to update my database by building a form that
    links a city with surrounding towns. I want to enter the main town
    and the surrounding towns and then it updates all records that
    contain the main town. the code runs without errors, but the data
    i'm entering is not finding its way into the variables and doesn't
    update the database . . . all help appreciated.
    <form id="form1" name="form1" method="get"
    action="demograph_updatep2.php">
    <label><strong class="innerpageheading">Main
    town</strong>
    <input name="maintown" type="text" id="maintown" />
    </label>
    <p><label><span
    class="results_13px">Nearby Town1</span>
    <input name="nearbytown1" type="text" id="nearbytown1"
    />
    </label>
    </p>
    <p>
    <label><span
    class="results_13px">NearbyTown2</span>
    <input name="nearbytown2" type="text" id="nearbytown2"
    />
    </label>
    </p>
    <p>
    <label><span
    class="results_13px">NearbyTown3</span>
    <input name="nearbytown3" type="text" id="nearbytown3"
    />
    </label>
    </p>
    <p>
    <label><span
    class="results_13px">NearbyTown4</span>
    <input name="nearbytown4" type="text" id="nearbytown4"
    />
    </label>
    </p>
    <p>
    <label>
    <input type="submit" name="Submit" value="Update" />
    </label>
    </p>
    </form>
    <?php
    // setting variables
    $maincity = $_GET['maintown'];
    $nearbycity1 = $_GET['nearbytown1'];
    $nearbycity2 = $_GET['nearbytown2'];
    $nearbycity3 = $_GET['nearbytown3'];
    $nearbycity4 = $_GET['nearbytown4'];
    mysql_connect (localhost,"");
    mysql_select_db("") or die( "Unable to select database");
    mysql_query("UPDATE physician
    SET
    physician_City2 = $nearbycity1
    WHERE physician_City1 IN ($maincity)
    mysql_close();
    ?>
    <?php
    mysql_connect (localhost,"");
    mysql_select_db("") or die( "Unable to select database");
    mysql_query("UPDATE physician
    SET
    physician_City2 = 'East Grand Rapids'
    WHERE physician_City1 IN ('Grand Rapids')
    mysql_close();
    ?>

    please ignore the last ten lines: ?>
    <?php
    mysql_connect (localhost,"");
    mysql_select_db("") or die( "Unable to select database");
    mysql_query("UPDATE physician
    SET
    physician_City2 = 'East Grand Rapids'
    WHERE physician_City1 IN ('Grand Rapids')
    mysql_close();
    ?>
    i was using those to test the sql code

  • Which updates needed on 10.3 - 10.4 update?

    So, I just upgraded my iMac G5 (rev A) from 10.3 to 10.4. (You can laugh now.)
    I installed using Archive and Install from an upgrade disk, and then applied the 10.4.11 combo update.
    After that I ran Software Update. Software Update installed the following:
    Java 1.3.1 and 1.4.2 Release 2
    X11 Update 2006
    Migration and DVD/CD Sharing Update
    J2SE 5.0 Release 4
    Safari 4.0.5
    Java for Mac OS X 10.4, releases 5, 6, 7, 8, 9 (in sequence)
    QuickTime 7.6.4
    Security Update 2009-005 (PowerPC)
    So, my questions:
    1) Is QuickTime 7.6.6 available for 10.4? The page at http://support.apple.com/kb/HT1222 says it is, but SW Update doesn't download it and http://support.apple.com/kb/HT4104 doesn't list any fixes for 10.4. I suspect the listing on the first page is in error but wanted to confirm.
    2) Several other updates listed at http://support.apple.com/kb/HT1222 are listed as being available for 10.4.11, including Security Update 2009-004, Security Update 2009-003, Security Update 2009-002, Security Update 2009-001, and several security updates labeled 2008-00x as well. SW Update did not offer to download or install them.
    I'm especially concerned, of course, about the security updates. Should the earlier ones be installed, or were they all rolled into 2009-005? (I assume they weren't included in 10.4.11, since they are listed as being "available for" 10.4.11.)
    3) Any other critical updates that should be installed?
    Many thanks.

    Hi Joel,
    Is QuickTime 7.6.6 available for 10.4?
    Available for: Mac OS X v10.5.8, Windows 7, Vista, XP SP2 or later
    http://support.apple.com/kb/HT4104
    http://support.apple.com/kb/index?page=search&src=supportsite.kbase.search&locale=enUS&q=QuickTime%207.6.6
    My mostly updated 10.4.11 is QT 7, SU says 7.6.4 is available for Tiger...
    http://support.apple.com/kb/DL838
    Software update sometimes only lists the next one available, some are not cumlative & need to be done incrementally.
    Latest Security Update should include all previous.
    Java must be dine in order.

  • Updatable city map with directory list

    Here's the scenario. A city has a business district that needs a printable aerial view map (llustrated) with numbers indicating each business. These numbers will correspond to a key/directory that will list the number and name of business. The map is updated frequently as businesses come and go. I want the map to renumber itself when making edits. For example, if the business marked as "4." needs to be deleted from the map, the rest of the indicators would renumber themselves and the directory would then renumber itself as well (so that the list doesn't have a missing number). Is this feesible within InDesign?

    You can do it easily
    1) add the map to the page (THE LABELS MUST NOT BE PART OF THE MAP)
    2) create a map label paragraph style "Map Labels" and include in it a numbered list "Map Lables List"
    3) Setup an object style call it Map Labels set the paragraph style to Map Labels,
    Set the fill, corner etc. options as desired.
    4) Make a text Frame and Put in it the name of the place and apply the Map Labels object style to it.
    5) Use copy and Paste to add a label for all the places you need.
    5B) Important! and a bit tough do the copy and paste in the Ideal Order of the list
    In the example below Europe was coppied last, so it go numbered 3, a more desired order (left to right, top to bottom) might have been USA, Europe, Africa
    6) set up a new object style and set the colors to None call it Invisible
    7) After you have finished labeling all the place names select all the page items (Ctrl / Comand A) and run this little snippet
    var selection = app.selection,
          l = selection.length;
    while (l--) if (selection[l].hasOwnProperty ('contents')   && selection[l].appliedObjectStyle = "Map Labels") {
        selection[l].name = selection[l].contents;
        selection[l].insertLabel("Map Labels", "1");
    app.activeWindow.activePage.insertLabel("Map", "1"); // Label Page for future reference
    You now have named all your textFrames and they can be refered to asfor example myDoc.textFrames.itemByName("USA")
    And you can identify them as map lables by using textFrame[x].extractLabel("Map Labels") == 1;
    8) Save a copy of the doc in case you mess up in the future.
    9) Make a character style "Place names" and apply in your document  only on the names you want labeled on your map.
    i.e. you have have a some text(s) somewhere in the document
    The USA is realy ......
    Africa is ......
    10 Now each time you have different references run the following script and the map labels will be updated
    // Labeling script
    // by Trevor (www.creative-scripts.com coming soonish custom and readymade scripts for adobe indesign and other products)
    app.doScript("labelMap()", ScriptLanguage.javascript, undefined, UndoModes.ENTIRE_SCRIPT, "Lable Map");
    function labelMap() {
        var doc = app.activeDocument;
                    app.findTextPreferences = app.changeTextPreferences = null;
                    app.findTextPreferences.appliedCharacterStyle = "Place Names";
        var myPageId = checkForObjectByLabel(doc.pages, "Map");
        if (myPageId === false) {alert("No Map\rBye"); exit();};
        myPageId = myPageId[0];
        var mapPage = doc.pages.itemByID(myPageId),
              mapLabels = checkForObjectByLabel (mapPage.textFrames, "Map Labels"),
              l = mapLabels.length, label, lableFrame;
        while  (l--) {
            lableFrame = mapPage.textFrames.itemByID(mapLabels[l]);
            if (!lableFrame.isValid) continue;
            lableFrame.applyObjectStyle (doc.objectStyles.itemByName("Invisible"), true);
            lableFrame.contents = "";
        // Find names
        var myFinds = doc.findText();
        l = myFinds.length;
        while (l--) {
            label = myFinds[l].contents;
            lableFrame = mapPage.textFrames.itemByName(label);
            if (!lableFrame.isValid) continue;
            lableFrame.contents = label;
            lableFrame.applyObjectStyle (doc.objectStyles.itemByName("Map Labels"), true);
    function checkForObjectByLabel (obj, label, from, to) {
        from = from || 0;
        if (obj .hasOwnProperty('length')) obj = obj[0];
        var parent = obj.parent;
        var co = obj.constructor.name;
        co = co[0].toLowerCase() + co.substr (1, co.length) + "s";   
        var objects = (from != undefined && to != undefined) ? parent[co].itemByRange (from, to) : parent[co].everyItem();
        var objectsLabels = objects.extractLabel(label);
        var reg = /1/g;
        objectsLabels = ("," + objectsLabels.join()).replace (/,1/g, "1");
        reg.lastIndex = 0;
        var n = 0;
        var ids = [];
        var found = true;
        while (found = reg.exec (objectsLabels)) ids[n++] = parent[co] [(reg.lastIndex = found.index + 1) - 1 + from].id;
        return (ids.length > 0) && ids;

  • Changing content of one label, based on the content of another

    Hello all,
    I need some advice on how to go about doing something that should be simple.
    Basically, I have two labels, that will be used in a marquee animation. When label one gets changed, I want label two to mimic label one's content. Since there is no ContentChanged Event for labels, I have been relying on the SizeChanged event of label one
    to do the job.
    However, the issue arises when label one's content extends past that of its parent container, thus no longer firing SizeChanged.
    When label one's supposed length is equal to or greater than that of its container, is when I would start the marquee animation.
    Basically, I need a sure fire, reliable, 100% accurate way to update label two's content to match that of label one's despite its length.
    I have read the following: Label.Content Changed Event
    However this does not solve the issue, as the event fires for "all" custom label classes, due to the ContentProperty being declared Static/Shared.
    Thanks in advance!

    <UserControl x:Class="CustomControls.UserControls.ValidationUserControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    mc:Ignorable="d" Height="36" Width="120">
    <Grid x:Name="z">
    <TextBox x:Name="txtBase" Text="TextBox" Margin="0,0,0,13"/>
    <Label x:Name="lblStatus" Content="Status" HorizontalAlignment="Left" Margin="5,0,0,0" VerticalAlignment="Bottom" FontSize="10" Foreground="#FFE12828" FontWeight="Bold">
    <Label.Effect>
    <DropShadowEffect BlurRadius="5" ShadowDepth="1"/>
    </Label.Effect>
    </Label>
    <Label x:FieldModifier="Friend" x:Name="lblMarquee" Content="{Binding ElementName=lblStatus, Path=Content}" HorizontalAlignment="Right" Margin="0,23,-29,0" FontSize="10" Foreground="#FFE12828" FontWeight="Bold" Background="Transparent" Height="13" VerticalAlignment="Top">
    <Label.Effect>
    <DropShadowEffect BlurRadius="5" ShadowDepth="1"/>
    </Label.Effect>
    </Label>
    </Grid>
    </UserControl>

  • IPS Signature Update S480?

    I noticed that the software for the E4 engine update has been posted for all IPS devices, but no matching signatures (yet).  Also, I see that the IPS updates for MARS now have an update for S480 available, but no matching signatures for IPS.
    Is this just a mix-up with release dates?  Or am I just missing where the S480 signatures are?  Also, will S480 be the first set of sigs released for the E4 engine?
    Anyone with any insight?

    Whoops ... guess I should have read that E4 engine "readme" file that came with the download ...
    "The E4 Engine Upgrade includes a Signature Update labeled S480. S480 will not be available for separate download.  Refer to the archived Active Update Bulletin for S480 for more details on this signature update release.  Active Update Bulletins are available at:
    http://tools.cisco.com/security/center/bulletin.x?i=57 "

  • Satellite L850/0C9: Toshiba Service Station recommending wrong BIOS update?

    I have a Satellite L850-0C9 laptop and Toshiba Service Station is recommending I install the new BIOS update labelled "Satellite Pro C850 BIOS Update - v6.50".
    Should I install this as its not the same model as my laptop,
    If not why is Service Station recommending I install it?

    I assume this is your notebook and these are all the drivers and BIOS available for this notebook model:
    http://www.mytoshiba.com.au/support/computers/satellite/l850/pskdla-0c900r/download
    The latest BIOS is v6.50 and it looks to be the right one.
    The Pro C850 seems to belongs to the same series so possibly the BIOS is the same.
    However, the BIOS update is always an sensitive procedure and from my point of view its not really necessary if you dont have an serious problems.

  • Update jLabel in between Thread.sleep()'s

    I have multiple Thread.sleep()'s in my code under a jButton actionevent evt.
    In between these, I need to be able to update a jLabel, but for some reason it waits until the last thread.sleep() before it updates the jLabel.
    Any ideas why?
    private void jButtonActionPerformed(java.awt.event.ActionEvent evt) {
       try {
          Thread.sleep(1000);
          jLabel.setText("Change Text To This");
          Thread.sleep(1000);
       } catch (InterruptedException ex) {}
    }So rather than waiting 1000ms, then update label, then wait another 1000ms, it just waits 2000ms, then updates the label
    Please help!
    Thanks

    Edward9 wrote:
    I am new to Java and I just cannot work out the tutorials,Hard luck then.
    the code behind my applet doesn't matter as long as it works,Which it will, of you code it correctly after learning from the tutorials.
    I have spend 6 months on this appletWould have taken much less time to learn to do it correctly.
    and everything worksBy your definition of "works"
    apart from this one problem --> jLabel to update between thread.sleep()'s.Easy when you know how.
    Its all I need to do and my project will be over and I can get away from Java.I have a suggestion: why don't you get away from Java right now, take the failing grade you've earned, and get on with your life. Really.
    Is there absolutely no way it can be done?Already covered above and in previous responses.
    I was told the jLabel will not update until the thread is free to do so, so i will need to look up on multiple threads,No, you need to go through the Swing tutorials.
    i have tried to but none of it makes sense to what i need done.Give up. Now.
    db

  • Trouble updating applet..

    I have been trying to update the code in an older Java Applet I created....I've been away from programming for about 7 years, so bear with me.....It's a little tricky in that it has a main window and an option window that pops up when a user right clicks on the main window. I have been trying to change the code in the popup window to close the window when the user clicks the "X"
    This is the original code:
    public boolean handleEvent(Event evt)
    if (evt.id == Event.WINDOW_DESTROY) hide();
    return super.handleEvent(evt);
    Here is one thing I am trying..it just plain doesn't work...if I try to set the class to extend ActionListener or WindowListener, I can't ..is this because there is no init() method??
    public void windowClosing(WindowEvent e) {
    setVisible(false);
    I have also tried:
    public void addWindowListener(AWTEvent WindowEvent)
    Not really sure what should work here...but I think the main problem I am having is that, as mentioned there are two windows and the main window class calls the option window which does not have a main (init) method.
    Anybody have a suggestion?...thanks!
    import java.awt.*;
    import java.awt.event.ActionListener.*;
    import java.awt.event.WindowEvent.*;
    import java.awt.event.WindowListener.*;
    class OptionWindow extends Frame //implements WindowListener
         Ticker aTicker;
         OptionWindow(String title,Ticker parent)
           super(title);
         aTicker = parent;
          MenuBar mb = new MenuBar();
        Menu m1 = new Menu ("Spacing");
        m1.add(new MenuItem("Single"));
        m1.add(new MenuItem("Double"));
        m1.add(new MenuItem("Triple"));
        mb.add(m1);
        Menu m2 = new Menu ("Speed");
        m2.add(new MenuItem("Slow"));
        m2.add(new MenuItem("Medium"));
        m2.add(new MenuItem("Fast"));
        mb.add(m2);
        Menu m3 = new Menu("Direction");
        m3.add(new MenuItem("Forward"));
        m3.add(new MenuItem("Reverse"));
        mb.add(m3);
        setMenuBar(mb);
      public boolean action(Event evt, Object arg)
                 String label = (String)arg;
             if (evt.target instanceof MenuItem)
             aTicker.update(label);
             return true;
             }else return false;
       // public void windowClosing(WindowEvent e) {
        //     setVisible(false);
         //displayMessage("Window closing", e);
    }Edited by: RemedyMan on Mar 21, 2009 9:20 PM

    Somewhere in the initialization (constructor probably):
    addWindowListener(
            new WindowAdapter()
               public void windowClosing(WindowEvent e)
                   setVisible(false);
                   displayMessage("Window closing", e);
    );

  • B75MA-P45 BIOS Update

    I wonder if someone could shed some light on this for me. I currently have a B75MA-P45 mainboard, or MS-7798 as live update labels it. Currently it doesnt allow me to get into the bios with my logitech usb keyboard and I have to plug in a ps2 one which kinda irritates me. Having flashed a great many bioses in the past I thought this should be relatively easy. Oh how wrong was I ?
    So first of all I install live update from the website which comes under my board section so should in theory work, but when I download all the drivers and click bios II it informs me that it doesnt support that board. ? similarly when I try and execute msi control centre it tells me it doesnt support this board.
    So I read in the bios something about winki being able to do it, so I download the image, burn it, start it up and then winki tells me it doesnt support this board.
    How is all this possible when I download them from the msi site under my board section? Really, is there not a simple way to do this ?!?!?!
    I haven't tried usb stick yet because I dont have one, but I just can't believe there isn't a windows flasher that will work.

    Quote from: christopher.roffey on 17-September-13, 04:44:23
    Well most of those options mean I have to go and spend money on a usb stick just to upgrade the bios, which I've never had to before. And sure I'll probably get loads of flamers telling me how cheap they are but that's very much besides the point. I've flashed plenty of motherboards from windows before now without incident, you can always verify it before you reboot.
    And besides, this does not explain the why it is that click bios 2, control centre and winki all say they do not support my board, and yet they were downloaded from the boards section on the msi site.
    Any explanation for this ?
    I also flashed lot of boards before without problem but my last try using a windows and this "great" live update utility lead to a bricked board and it was not my fault. I've got BSOD so there was no way to go back. So many things can happen in windows so my recommendation after this xperience is to never flash the bios in windows! The board is now at manufacturer to reflash the chip... A moth lost for me...

Maybe you are looking for