I need to change tree cell render on particular node when it is selected.

actually the treecell change its icon when it is selected. yhe other cell doesnot changed its icon

Write your own renderer or extends DefaultTreeCellRenderer. Add something like this to the method
Component getTreeCellRendererComponent(JTree tree,
                                       Object value,
                                       boolean selected,
                                       boolean expanded,
                                       boolean leaf,
                                       int row,
                                       boolean hasFocus)
    if (selected)
       set the icon to be special icon
    else
       set the icon back to normal
}

Similar Messages

  • I want to change my iCloud account. Buying iPad we gave a virtual (forwarding) email addr. We need to change to a real address. But when we try to change the iCloud account, we can only change the password. Note: we don't have Mac, only iPad and Windows.

    I want to change my iCloud account. Buying iPad we gave a virtual (forwarding) email address.
    We need to change to a real address.
    But when we try to change the iCloud account, we can only change the password.
    Note: we don't have a Mac, only an iPad and Windows.

    Welcome to the Apple Community.
    Firstly, you need to change your details with Apple,  Start here, change your country if necessary and go to manage your account.
    In order to change your Apple ID or password for your iCloud account on your iOS device, you need to delete the account from your iOS device first, then add it back using your updated details. (Settings > iCloud, scroll down and hit "Delete Account")
    Providing you are simply updating your existing details and not changing to another account, when you delete your account, all the data that is synced with iCloud will also be deleted from the device (but not from iCloud), but will be synced back to your device when you login again.
    In order to change your Apple ID or password for your iCloud account on your computer, you need to sign out of the account from your computer first, then sign back in using your updated details. (System Preferences > iCloud, click the sign out button)
    In order to change your Apple ID or password for your iTunes account on your iOS device, you need to sign out from your iOS device first, then sign back in using your updated details. (Settings > iTunes & App store, scroll down and tap your ID)
    If you are using iMessages or FaceTime, you will also need to log out and into your ID there too.

  • HT4314 Game center : I need to change my user name to another name when I use games with apple

    Your support needs in this situation

    Chaging your user name is easy. I can see you haven't upgraded to ios7, but that is okay.
    Go to the gamecenter app> click your email> sign in> and scroll down until you see your user name> Then you can cahnge it from there.

  • I need to change what LR does with my files when importing.

    I have no idea when the import "Preferences" changed.  
    When I import DNGs, it COPIES them to another HDD and I cannot find out how to stop this.
    When I go to Preferences I do not see any way to change this.
    I am about ready to uninstall and reinstall ...
    Driving me crazy...
    Dell Studio 1745  Win 7 64
    Lr 3.6  64 bit
    Thanks

    Uninstall/reinstall is not the way to fix this.
    You didn't tell us the desired behavior, and if we don't know that, we can't help you get there.

  • I need to change my user name to another name when I use games with apple

    Your support is highly needed

    Chaging your user name is easy. I can see you haven't upgraded to ios7, but that is okay.
    Go to the gamecenter app> click your email> sign in> and scroll down until you see your user name> Then you can cahnge it from there.

  • Dynamically change the cell editor in the table control

    Hi..
         I have 3 columns in a table . of which in one column we need to change the cell editor dynamically at runtime.
    i.e for example i have  columns as carrid, connid and fldate.
    For the first 2 rows the cell editor for the carrid  clomn shud be a dropdown and from there on in the next rows for the same  carrid column it shud be a input field.
    Can experts plz help me how to achieve this as this is very high priority issue....
    Regards,
    Madhu...

    This is actaully fairly simple to do.  You will need to add a cellVariant to your table column. You can then dataBind a context attribute to the selectedCellVariant property of the column to control which cellVariant will be used. This allows you to control row-by-row which cell editor you want to output.
    http://help.sap.com/saphelp_nw70/helpdata/EN/bd/5d9041d3c72e7be10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/EN/56/5e9041d3c72e7be10000000a1550b0/frameset.htm
    Also here is an example that I did the other day that uses Cell Variants within ALV.  This process is actually a little more complicated because you have to go through the ALV APIs.  To do this in a normal table is actually easier because you can create the cellVariant in the layout designer.
    Re: Freely-programmed value help for a single ALV cell

  • How to change the background of the StackPanel control when any child element has focus?

    Hello folks!
    I need to change the background of the StackPanel control when any element within the StackPanel has focus. I am executing the code snippet below. The code works fine with elements within the Grid control named "main". It doesn't work when I focus
    an element within the Grid control named "header".
    <StackPanel x:Name="techReportStackPanel" Width="250" Background="{Binding ColorBrush}" >
    <StackPanel.Style>
    <Style TargetType="{x:Type StackPanel}">
    <Style.Triggers>
    <DataTrigger Binding="{Binding ElementName=techReportStackPanel, Path=IsKeyboardFocusWithin}" Value="True">
    <Setter Property="Background" Value="Gray" />
    <Setter Property="Opacity" Value=".5" />
    </DataTrigger>
    </Style.Triggers>
    </Style>
    </StackPanel.Style>
    <Grid x:Name="header">
    <TextBlock x:Name="headerColumn" Text="{Binding Name}" Style="{StaticResource ColumHeader}"/>
    <Button Visibility="{Binding ElementName=headerColumn, Path=Text, Converter={StaticResource delButtonVisibilityConverter}}" Command="{Binding DelCommand}" Content="x" ToolTip="{l:Translate TechReportDeleteToolTip}"/>
    </Grid>
    <Grid x:Name="main">
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="*" />
    <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <wpftoolkit:WatermarkTextBox Grid.Column="0" Style="{StaticResource OrdinaryTextbox}" Watermark="{l:Translate LengthLabel}" ToolTip="{l:Translate BoreholeSpacingInRow}" Text="{Binding BoreholeSpacingInRow, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat=F2, Converter={StaticResource zeroToEmptyDoubleConverter}}" />
    <wpftoolkit:WatermarkTextBox Grid.Column="1" Style="{StaticResource OrdinaryTextbox}" Watermark="{l:Translate WidthLabel}" ToolTip="{l:Translate BoreholeSpacingBetweenRow}" Text="{Binding BoreholeSpacingBetweenRow, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat=F2, Converter={StaticResource zeroToEmptyDoubleConverter}}" />
    </Grid>
    </StackPanel>
    Any advice and suggestions will be greatly appreciated!

    >>It doesn't work when I focus an element within the Grid control named "header".
    You mean when the Button in the "header" Grid is focused? A TextBlock is not focusable so when the Button is not visible no element in the "header" Grid will be focused since you only have two elements in the "header" Grid.
    But when the Button is visible it should work. Please refer to the following code:
    <StackPanel x:Name="techReportStackPanel" Width="250" Background="{Binding ColorBrush}" >
    <StackPanel.Style>
    <Style TargetType="{x:Type StackPanel}">
    <Style.Triggers>
    <DataTrigger Binding="{Binding ElementName=techReportStackPanel, Path=IsKeyboardFocusWithin}" Value="True">
    <Setter Property="Background" Value="Gray" />
    <Setter Property="Opacity" Value=".5" />
    </DataTrigger>
    </Style.Triggers>
    </Style>
    </StackPanel.Style>
    <Grid x:Name="header">
    <TextBlock Text="text..."/>
    <Button Visibility="Visible" Content="Button" />
    </Grid>
    <Grid x:Name="main">
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="*" />
    <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <TextBox Grid.Column="0">main grid...</TextBox>
    <TextBox Grid.Column="1">main grid...</TextBox>
    </Grid>
    </StackPanel>
    When the Button is focused the Background colour of the StackPanel is set to Gray as expected.
    If you want to be able to focus the TextBlock you should set its Focusable property to true:
    <Grid x:Name="header">
    <TextBlock Focusable="True" x:Name="headerColumn" Text="{Binding Name}" Style="{StaticResource ColumHeader}"/>
    <Button Visibility="{Binding ElementName=headerColumn, Path=Text, Converter={StaticResource delButtonVisibilityConverter}}" Command="{Binding DelCommand}" Content="x" ToolTip="{l:Translate TechReportDeleteToolTip}"/>
    </Grid>
    Hpoe that helps.
    Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't ask several questions in the same thread.

  • Question(s​) about the Active Cell:Posit​ion property node for a table control

    Hello,
       What determines the Active Cell Position property node for a table control? I have this in my code and I am displaying its value to a front panel indicator. The value displayed is always set to 0,0. The help for the property node say that it is "read -only" so what sets the value of Active Cell Position  for a Table Control?
    Regards,
    Kaspar
    Solved!
    Go to Solution.

    You set the active cell with a property node.  Once you select an active cell, you can do specific things to that cell and that cell alone, things like set the background color.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Is there a way to make a number of cells add to a certain number. I need 5 or 6 cells to add to 1700. If one of the cells becomes 0, I need the other cells to change so the bottom number stays at 1700.

    is there a way to make a number of cells add to a certain number. I need 5 or 6 cells to add to 1700. If one of the cells becomes 0, I need the other cells to change so the bottom number stays at 1700.

    Okay then. If your seven numbers are in column B then the formula next to each number in column C would be
    =IF(B=0,0,1700/COUNTIF(B,">0"))
    This assumes all non-zero numbers are positive numbers. The sum will be 1700.

  • Tree cell disapearing

    Hi
    I'm using Java 1.5.0.11
    I'm trying to make my own tree cell renderer and editor : the goal is to add to the standard tree cell (icon + uneditable text) an icon to the left, to indicate a certain "state". The state can be change by clicking on it, showxing a JPopupMenu to select a new one.
    In my proto, it works well, except that when I change one row, it is redrawn completely blank. I need to click on it again to have it appear.
    Any idea on why?
    Best regards

    TreeSelector. java
    package treeselectproto;
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.event.ActionEvent;
    import java.util.HashMap;
    import java.util.List;
    import java.util.Map;
    import javax.swing.AbstractAction;
    import javax.swing.AbstractCellEditor;
    import javax.swing.JButton;
    import javax.swing.JLabel;
    import javax.swing.JMenuItem;
    import javax.swing.JPanel;
    import javax.swing.JPopupMenu;
    import javax.swing.JScrollPane;
    import javax.swing.JTree;
    import javax.swing.ScrollPaneConstants;
    import javax.swing.tree.TreeCellEditor;
    import javax.swing.tree.TreeCellRenderer;
    import javax.swing.tree.TreePath;
    public class TreeSelector {
         protected JTree itsTree;
         protected JScrollPane itsScrollPane;
         protected Map<Object, State> itsStates=new HashMap<Object, State>();
         protected CellRenderer itsRenderer;
         protected JPopupMenu itsPopupMenu = new JPopupMenu();
         public TreeSelector()
              itsTree=new JTree();
              itsRenderer=new CellRenderer();
              itsTree.setCellRenderer(itsRenderer);
              itsTree.setCellEditor(itsRenderer);
              itsTree.setEditable(true);
              buildScrollPane();
              List<State> theStates=State.getPopupStates();
              for(State s:theStates)
                   PopupAction a=new PopupAction(s);
                   JMenuItem mi=new JMenuItem(a);
                   itsPopupMenu.add(mi);
         private void buildScrollPane() {
              itsScrollPane= new JScrollPane(itsTree,
                        ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
                        ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
         public JScrollPane getScrollPane() {
              return itsScrollPane;
         @SuppressWarnings("serial")
         private  class CellRenderer extends AbstractCellEditor implements TreeCellRenderer, TreeCellEditor
              private JPanel itsPanel;
              private JLabel itsLabel;
              private JButton itsStateBtn;
              private BorderLayout itsLayout;
              public  CellRenderer()
                   itsPanel=new JPanel();
                   itsPanel.setLayout(itsLayout=new BorderLayout());
                   itsPanel.setDoubleBuffered(false);
                   itsLayout.setVgap(1);
                   itsLayout.setHgap(1);
                   itsLabel=new JLabel();
                   itsLabel.setDoubleBuffered(false);
                   itsPanel.add(itsLabel,BorderLayout.CENTER);
                   itsStateBtn=new JButton(new AbstractAction(){
                        public void actionPerformed(ActionEvent aE) {
                             showPopup();
                   itsStateBtn.setBorderPainted(true);
                   itsStateBtn.setContentAreaFilled(false);
                   itsStateBtn.setDoubleBuffered(false);
                   itsPanel.add(itsStateBtn,BorderLayout.WEST);
              protected void showPopup() {
                   itsPopupMenu.show(itsStateBtn, 0, 0);
              public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
                   TreePath thePath=tree.getPathForRow(row);
                   itsPanel.setBackground(tree.getBackground());
                   if(thePath != null)
                        State theState=getStateForTreePath(thePath);
                        String ic=theState.getSign();
                        itsStateBtn.setText(ic);
                   itsLabel.setText(value.toString());
                   itsStateBtn.setPreferredSize(null);
                   itsLabel.setPreferredSize(null);
                   itsPanel.setBackground( selected? Color.lightGray:tree.getBackground());
                   itsLayout.invalidateLayout(itsPanel);
                   return itsPanel;
              private Object itsValue;
              public Component getTreeCellEditorComponent(JTree aTree, Object aValue, boolean aIsSelected, boolean aExpanded, boolean aLeaf, int aRow) {
                   // if edting, it has the focus
                   itsValue=aValue;
                   return getTreeCellRendererComponent(aTree,aValue,aIsSelected,aExpanded,aLeaf,aRow,true);
              public Object getCellEditorValue() {
                   return itsValue;
         public State getStateForTreePath(TreePath thePath) {
              State ret=itsStates.get(thePath.getLastPathComponent());
              if(ret==null)
                   ret=State.defaultState();
              return ret;
         @SuppressWarnings("serial")
         private class PopupAction extends AbstractAction
              protected State itsState;
              public PopupAction(State aState) {
                   super(aState.getLabel());
                   itsState = aState;
              public void actionPerformed(ActionEvent aE) {
                   TreePath thePath=itsTree.getEditingPath();
                   Object theObj=thePath.getLastPathComponent();
                   itsStates.put(theObj, itsState);
    }

  • Need help changing the default Save Path

    Hello,
    We are implementing SAP, and will be using Citrix as the source for the GUI.  One of our requirnments are, that we need to change the default "Save Path" that users save documents too.   By default, this is to the C drive, but, we need it set to a different drive (i.e. V: on the citrix server).
    We found this note on SDN (see below) - however, it does not explain how to change or add this registry value?  Is this done in the GUI options, or in regedit?  If in reg-edit, where abouts in the tree does it go?
    Thanks guys, and any help would be greatly appriciated.
    Richard
    (As of SAP GUI 7.20, patch level 4) the REG_EXPAND_SZ registry value InitSaveDir can be used to configure the default path and folder for users to save the reported information in case of an access denial due to security rules. If users change the default path and save the information to an individual location, this new path will be kept as long as the user does not terminate the program. When starting SAP GUI again, users will get the configured default path again to store the reported information, the individual path changes will be lost. If the registry value does not exist, the default directory is the document directory of the SAP GUI.
    By default none of the above registry values exists. In order to change the behavior of the security module, the registry values need to be created and set to the desired value. A not existing registry value means use the default.
    In this doc:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/002444be-7018-2d10-e18e-a8c537198ef6?quicklink=index&overridelayout=true

    Hi,
    "Security rules that are created for a large number of users can be centrally stored on a server by an administrator. The administrator can use the registry values below under the registry key
    [HKEY_LOCAL_MACHINE\Software\SAP\SAPGUI Front\SAP Frontend Server\Security]
    to configure the behavior of the security module.
    Note: For 64 bit operating systems please use the following registry key
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP\SAPGUI Front\SAP Frontend Server\Security]
    to configure the behavior of the security module."
    You can use regedit for installing this values.
    Best Regards,
    Aleh

  • Unlimited Data Plan-Need to change my phone but don't want to lose!!

    I am "grandfathered" into the unlimited data plan, we have four lines, I need to change my phone as my current one doesn't work. I tried switching to an old phone that I used 6 months ago with the unlimited data via online and it would not allow me to do so. How can I change to another phone without being told I have to buy a data plan? If we need to "buy a data plan" all 4 phones will be going else where....

    Makes no difference about any tin foil hats, Verizon is using ANY MEANS to force unlimited data users off the unlimited and onto share or metered data. It is a fact. They tried twice with me and I pay full price for my devices.
    1) Change your minutes, they want to take away your unlimited.
    2) Buy a new device on subsidy, lose your unlimited data.
    3) Buy a new device on the Edge program, lose unlimited data.
    4) Swap a device on your account, they want to take unlimited away.
    5) Add a prepay tablet to your account, they tell you that you lose Unlimited data.
    However the instructions are you are prepaying for the tablet use so its billed to your credit or debit card yet not really part of your cell phone plan but they want you to lose unlimited.
    In short if you go online or call on the phone or even chat, for any reason in some cases Verizon is removing your unlimited data. And you have to be careful since many here are stating the same as I listed.
    They are a business, if they decided not to have unlimited data trust me it will be gone. So leave a little room in that tin foil so the broadcast will get through.
    Just for a giggle, many many years ago I bought an unlimited Mobil Gasoline coffee cup. You paid for it once and each time you came to a Mobil station you get a free coffee. I still have the cups (they came in two sizes) yet just try and get that free coffee. The company dropped the promotion. And now you get arrested for theft.
    Nothing lasts forever.
    Good Luck

  • How to programmatically change the cell color of an ADF table ?

    Hi all,
    I have an ADF table with some fields on it. Depending on the value of a field named, say, "F1", I would like to change its background color.
    So far I can change the field color with this EL expression inside the InlineStyle table column property:
    font-size:medium; background-color:#{viewScope.myBean.setColor};
    where setColor is a bean function, in where I access the field "F1" via binding, parse its value, and return the right value - so far, so good.
    The bad thing is, the InlineStyle affects that field in all the rows of the table, while I would like to change only the field in the rows, which have that specific value in it.
    So for example having the rows:
    F1
    abc#1 ----> currently selected row
    cde#2
    efg#3
    I want to change the background color to all the F1 fields which have a "1" after the '#' and let the other "F1" row cells background color stay unchanged.
    But as you can imagine, the InlineStyle affect the "F1" background color in all the rows (assuming that the first row of the table is selected).
    So the question: how to access a single cell of a row in an ADF table, and programmatically change its background color ?
    So far I can iterate through the ADF table with:
    BindingContext bindingctx = BindingContext.getCurrent();
    BindingContainer bindings = bindingctx.getCurrentBindingsEntry();
    DCBindingContainer bindingsImpl = (DCBindingContainer) bindings;
    DCIteratorBinding dciter = bindingsImpl.findIteratorBinding("aTableIterator");//access the iterator by its ID value in the PageDef file
    RowSetIterator rsi = dciter.getRowSetIterator();
    System.out.println("rsi getrowcount = " rsi.getRowCount());+
    Row row = null;
    +if (rsi.getRowCount() > 0) {+
    row = rsi.getCurrentRow();
    System.out.println("row attr = " Arrays.toString(row.getAttributeNames()));+
    System.out.println("class : " row.getAttribute("F1").getClass().toString());+
    +}+
    +while (rsi.hasNext()) {+
    row = rsi.next();
    System.out.println("row attr = " Arrays.toString(row.getAttributeNames()));+
    +}+
    Regards,
    Sergio.

    Hi,
    I mean a specific cell within a row.
    Here are two pictures that show an ADF table with two rows and some fields on it:
    https://skydrive.live.com/?cid=7D3084D8BF755808&id=7D3084D8BF755808!107&sc=documents#cid=7D3084D8BF755808&id=7D3084D8BF755808!107&sc=documents
    bild_A is what I have, bild_B is what I would like. Note that:
    in bild_A the first row contain a yellow background color for the field F4 and an orange background color for the field F5. This is correct, because F4 has an "1" at the end of its string value, and F5 has a "3" at the end. So far so good.
    But the second row (again, bild_A) has also the fields F4 with yellow background color, and the field F5 with orange background color, even if the value in both fields is 0.
    What is should be, is shown in bild_B.
    The problem is that the solution provided affects all the cells of the column, while I need to change the background color of a single cell, and leave the other unchanged (see bild_B).
    I hope that clarify a bit :)
    Sergio.

  • I have 2 point security for AppleID. My iPhone 4S is listed as my trusted phone to text. No tel. no. is given. I am updating to iPhone 6Plus with same tel. no. Do I need to change anything for the sign in verification?

    I have 2 point security for AppleID. My iPhone 4S is listed as my trusted phone to text. No tel. no. is given. I am updating to iPhone 6Plus with same tel. no. Do I need to change anything for the sign in verification?

    Of course You can also add your iPhone telephone # as a trusted device.
    This way when you insert your SIM card into any phone, Apple will automatically recognize your cell phone # as a
    trusted device (may be handy if iphone breaks but you insert SIM card into another phone).
    HOWEVER:
    Having also your iPhone as a trusted device, is convenient if you travel and use a different SIM card
    at destination. This way you can still use the iphone for verification, even though you are using a different
    phone #.
    Regards

  • How to change tree colors? example inside.

    Hello,
    I was looking on the Internet to find the way to change background tree to specific colors, not the same color.
    Here is an example...:
    and here's another one:
    Thank you'll.

    I reread your original post, and it is the opposite of what i was thinking. I thought you wanted all the trees to be the same.
    So, to separate your trees, you will need to use a selection. Probably the best way would be to use Select>Color Range
    You can then select that color, then using the selection tools or the quick mask, to remove part of that selection
    I would then copy that selected portion of the trees to a new layer
    Now repeat for another section
    What you could do with each layer before removing the selection is to create a mask, then you can use that mask to easily reselect if necessary. (Should not be needed, but it is an option)
    Now select a layer and use the hue/saturation command or adjustment layer to adjust the hue. (With the adjustment layer you will need to clip it to that layer so it does not affect the remaining layers below it. That means the adjustment layer must be just above that layer no higher or lower)
    When you are done, save as a psd or tiff for your master (just in case you need to change something later on. When you save as a png or jpg the layers will be merged in that file because they do not support layers. Just so you are aware.

Maybe you are looking for

  • 24" iMac (Primo 2009) strange RAM upgrade issue

    I have a 24" iMac (Primo 2009) at work. I been granted a RAM upgrade by the IT department and have received 2 indentical 4 GB modules. The 24" iMac (Primo 2009) uses 1066 MHz DDR3 modules and supports up to 8 GB RAM in 2 slots. I have purchased RAM f

  • AC-3 downmixes not working

    (I posted this over in the Compressor forum, but since I haven't gotten a response, I'm going to post it here, also. Sorry for the double post...) I'm using Compressor 2, and trying to generate an AC3 Dolby 5.1 file that will work on both surround so

  • File searching program

    I don't known how to write File searching program. Please instruct me!!

  • I can´t publish or export to flash

    Hello, I have installed Captivate 6.0.1 in a Mac. When I finished, I try to publish and a blank square was in the screen in time the publish menu. I try upgrade Captivate, reinstalled and the problem is continuous. When I try to export to Flash CS6 o

  • HT1600 Just upgraded my Apple TV and have lost access to You Tube ... why?

    Just upgraded my Apple TV and have lost access to You Tube ... why?