How not to sort datagrid column on double click

Hello

I'm currently building an application containing a DataGrid for the representation of data. I created a datagridheader custom in order to add an input text for the filtering of the columns (see code below).

My goal is to hide the textinput and then display it on a double click on the header. So I would like to know how to avoid the type of this column whenever I double click. ?

<? XML version = "1.0" encoding = "utf-8"? >

" < = xmlns:fx s:GridItemRenderer ' http://ns.Adobe.com/MXML/2009 "

xmlns:s = "library://ns.adobe.com/flex/spark".

xmlns:MX = "library://ns.adobe.com/flex/mx" resize = "onColumnResize (event)" clipAndEnableScrolling = 'true' doubleClick = "managefilterField (event)" > "

< fx:Declarations >

<!-the default value of the sortIndicator < code > < code > property.

It must be an IFactory for an IVisualElement.

< p > This value is specified in a < code > < code > fx:Declaration block and can be overridden

by a supporting statement < code > = "defaultSortIndicator" </postcode >

in an MXML subclass. < /p >

@langversion 3.0

@playerversion flash 10

@playerversion AIR 2.0

@productversion flex 4.5

->

< fx:Component id = "defaultSortIndicator" >

< data s:Path = "M 3.5 7.0 L 0.0 0.0 7.0 0.0 L 3.5 7.0 L" implements = "spark.components.gridClasses.IGridVisualElement" >

< fx:Script >

<! [CDATA]

Import spark.components.DataGrid;

Import spark.components.Grid;

/**

* @private

*/

public void prepareGridVisualElement(grid:Grid,_rowIndex:int,_columnIndex:int):void

{

const dataGrid:DataGrid = grid.dataGrid;

If (! dataGrid)

return;

const color: uint = dataGrid.getStyle("symbolColor");

arrowFill1.color = color;

arrowFill2.color = color;

}

[]] >

< / fx:Script >

< s:fill >

< s:RadialGradient rotation = "90" focalPointRatio = "1" >

<!---@private-->

< s:GradientEntry id = "arrowFill1" color = "0" alpha = "0.6" / >

<!---@private-->

< s:GradientEntry id = "arrowFill2" color = "0" alpha = "0.8" / >

< / s:RadialGradient >

< / s:fill >

< / s:Path >

< / fx:Component >

<!-displays the label of renderer property, which is the value of the column < code > < code > headerText.

It must be an instance of a TextBase < code > < code > < code > < code > s:Label.

< p > This Visual element is added to the < code > < code > labelDisplayGroup by of the rendering engine

prepare() < code > < code > method.   Constraint of size/location specified by the labelDisplay

define its location relative to the labelDisplayGroup. < /p >

< p > This value is not specified with a < code > < code > fx:Declaration and can be overridden

by a supporting statement < code > = "labelDisplay" < code >

in an MXML subclass. < /p >

@langversion 3.0

@playerversion flash 10

@playerversion AIR 2.0

@productversion flex 4.5

->

< s:Label id = "labelDisplay".

Red left = "1" = "0" right = "0" top = low '0' = '0 '.

textAlign = 'start '.

fontWeight = "bold".

verticalAlign = "middle".

maxDisplayedLines = "1".

showTruncationTip = "true" / >

< / fx:Declarations >

< fx:Script >

<! [CDATA]

Import net.awl.ismp.console.components.misc.FilterCriteria;

Import net.awl.ismp.console.events.ColumnFilteredEvent;

Import net.awl.ismp.console.events.ColumnResizedEvent;

Import mx.events.ResizeEvent;

Import spark.components.gridClasses.IGridVisualElement;

Import mx.core.IVisualElement;

Import spark.components.DataGrid;

Import spark.components.GridColumnHeaderGroup;

Import spark.components.gridClasses.GridColumn;

Import spark.primitives.supportClasses.GraphicElement;

variables and constants of color chrome

DEFAULT_COLOR_VALUE:uint private static const is 0xCC;.

DEFAULT_COLOR:uint private static const is 0xCCCCCC;.

Private static const DEFAULT_SYMBOL_COLOR:uint = 0 x 000000;

private static var colorTransform:ColorTransform = new ColorTransform();

/**

* @private

*/

private void dispatchChangeEvent(type:String):void

{

If (hasEventListener (type))

{

dispatchEvent (new Event (type));

}

}

protected function onColumnResize(event:ResizeEvent):void

{

dispatchEvent (new ColumnResizedEvent (ColumnResizedEvent.COLUMNRESIZED_EVT, this.width, this.column.columnInde x));

}

//----------------------------------

maxDisplayedLines

//----------------------------------

private var _maxDisplayedLines:int = 1;

[Bindable ("maxDisplayedLinesChanged")]

[Inspectable (minValue = "-1")]

/**

This property value is used to initialize the

* < code > < code > maxDisplayedLines property of this converter

* < code > labelDisplay < code > element.

*

* @copy #maxDisplayedLines spark.components.supportClasses.TextBase

*

* @default 1

*

* @langversion 3.0

* @playerversion flash 10

* @playerversion AIR 1.5

* @productversion flex 4.5

*/

public function get maxDisplayedLines (): int

{

Return _maxDisplayedLines;

}

override the stateChanged(oldState:String,_newState:String,_recursive:Boolean):void function

{

trace ("status changed to:" + oldState + "to" + newState);

super.stateChanged (oldState, newState, recursive);

}

/**

* @private

*/

public function set maxDisplayedLines(value:int):void

{

If (value == _maxDisplayedLines)

return;

_maxDisplayedLines = value;

If (labelDisplay)

labelDisplay.maxDisplayedLines = value;

invalidateSize();

invalidateDisplayList();

dispatchChangeEvent ("maxDisplayedLinesChanged");

}

//----------------------------------

sortIndicator

//----------------------------------

private var _sortIndicator:IFactory;

private var sortIndicatorInstance:IVisualElement;

[Bindable ("sortIndicatorChanged")]

/**

* A visual element that appears when the column is sorted.

*

* < p > the sortIndicator visual element is added to the < code > < code > sortIndicatorGroup

* by this converter < code > < code > prepare() method.  Constraint of size/location

* specified by the sortIndicator set its location relative to the sortIndicatorGroup. < /p >

*

* @default null

*

* @langversion 3.0

* @playerversion flash 10

* @playerversion AIR 1.5

* @productversion flex 4.5

*/

public function get sortIndicator (): IFactory

{

return (_sortIndicator)? _sortIndicator: defaultSortIndicator;

}

/**

* @private

*/

public function set sortIndicator(value:IFactory):void

{

trace ("setSortIndicator");

If (_sortIndicator is value)

return;

_sortIndicator = value;

If (sortIndicatorInstance)

{

sortIndicatorGroup.includeInLayout = false;

sortIndicatorGroup.removeElement (sortIndicatorInstance);

sortIndicatorInstance = null;

}

invalidateDisplayList();

dispatchChangeEvent ("sortIndicatorChanged");

}

/**

* @private

* Create and add the sortIndicator to the sortIndicatorGroup and the

* labelDisplay in the labelDisplayGroup.

*/

override public function prepare(hasBeenRecycled:Boolean):void

{

trace ("ready!");

Super.Prepare (hasBeenRecycled);

If (labelDisplay & & labelDisplayGroup & & (labelDisplay.parent! = labelDisplayGroup))

{

labelDisplayGroup.removeAllElements ();

labelDisplayGroup.addElement (labelDisplay);

}

trace (sortIndicator);

trace ("sortIndicatorInstance:" + sortIndicatorInstance);

column: GridColumn = const this.column;

If (sortIndicator & & column & & column.grid & & column.grid.dataGrid & & column.grid.dataGrid.columnHeaderGroup)

{

const dataGrid:DataGrid = column.grid.dataGrid;

const columnHeaderGroup:GridColumnHeaderGroup = dataGrid.columnHeaderGroup;

If (columnHeaderGroup.isSortIndicatorVisible (column.columnIndex))

{

If (! sortIndicatorInstance)

{

sortIndicatorInstance = sortIndicator.newInstance ();

sortIndicatorGroup.addElement (sortIndicatorInstance);

chromeColorChanged = true;

invalidateDisplayList();

}

Initialize the sortIndicator

sortIndicatorInstance.visible = true;

const gridVisualElement:IGridVisualElement = sortIndicatorInstance as IGridVisualElement;

If (gridVisualElement)

gridVisualElement.prepareGridVisualElement (column.grid,-1, column.columnIndex);

sortIndicatorGroup.includeInLayout = true;

sortIndicatorGroup.scaleY = (column.sortDescending)? 1:-1;

}

on the other

{

If (sortIndicatorInstance)

{

sortIndicatorGroup.removeElement (sortIndicatorInstance);

sortIndicatorGroup.includeInLayout = false;

sortIndicatorInstance = null;

}

}

}

}

private var chromeColorChanged:Boolean = false;

private var colorized: Boolean = false;

/**

* @private

* Apply the chromeColor style.

*/

override the updateDisplayList(unscaledWidth:Number,_unscaledHeight:Number):void function

{

trace ("update list display");

Apply the color chrome

If (chromeColorChanged)

{

var chromeColor:uint = value ("chromeColor");

If (chromeColor! = DEFAULT_COLOR | colorized)

{

colorTransform.redOffset = ((chromeColor & (0xFF << 16)) > > 16)-DEFAULT_COLOR_VALUE;

colorTransform.greenOffset = ((chromeColor & (0xFF << 8)) > > 8)-DEFAULT_COLOR_VALUE;

colorTransform.blueOffset = (chromeColor & 0xFF) - DEFAULT_COLOR_VALUE;

colorTransform.alphaMultiplier = alpha;

transform.colorTransform = colorTransform;

var exclusions: Array = [labelDisplay, sortIndicatorInstance];

Apply reverse colorization exclusions

If (exclusions & & exclusions.length > 0)

{

colorTransform.redOffset = - colorTransform.redOffset;

colorTransform.greenOffset = - colorTransform.greenOffset;

colorTransform.blueOffset = - colorTransform.blueOffset;

for (var i: int = 0; i < exclusions.length; i ++)

{

var exclusionObject:Object = exclusions [i];

If (exclusionObject & &)

(exclusionObject is DisplayObject |)

exclusionObject is GraphicElement))

{

colorTransform.alphaMultiplier = exclusionObject.alpha;

exclusionObject.transform.colorTransform = colorTransform;

}

}

}

colorized = true;

}

chromeColorChanged = false;

}

super.updateDisplayList (unscaledWidth, unscaledHeight);

}

/**

* @private

*/

override public function styleChanged(styleProp:String):void

{

var allStyles:Boolean =! styleProp | styleProp == "styleName";

super.styleChanged (styleProp);

If (allStyles | styleProp == "chromeColor")

{

chromeColorChanged = true;

invalidateDisplayList();

}

}

protected function managefilterField(event:MouseEvent):void

{

trace ("double click on sortIndicator:" + this.sortIndicatorInstance);

this.filterInput.visible =! this.filterInput.visible;

this.filterInput.includeInLayout = this.filterInput.visible;

this.filterSpacer.visible = this.filterInput.visible;

this.filterSpacer.includeInLayout = this.filterInput.visible;

if(!this.filterInput.visible)

{

this.filterInput.text ="";

dispatchEvent (new ColumnFilteredEvent (ColumnFilteredEvent.COLUMNFILTERED_EVT, new FilterCriteria (this.column.dataField, this.filterInput.text)));

}

this.filterInput.setStyle ("borderColor", 0xFF6319);

this.filterInput.setStyle ("focusColor", 0xFF6319);

() this.filterInput.setStyle

}

protected function onTextInputSelection(event:MouseEvent):void

{

Event.stopImmediatePropagation;

this.filterInput.setStyle ("borderColor", 0xFF6319);

this.filterInput.setStyle ("focusColor", 0xFF6319);

}

protected function onKeyUp(event:KeyboardEvent):void

{

if(Event.charCode==Keyboard.Enter)

{

internship. Focus = null;

}

}

protected function onFocusOut(event:FocusEvent):void

{

this.filterInput.setStyle ("borderColor", 0x00ff00);

this.filterInput.setStyle ("focusColor", 0x70B2EE);

dispatchEvent (new ColumnFilteredEvent (ColumnFilteredEvent.COLUMNFILTERED_EVT, new FilterCriteria (this.column.dataField, this.filterInput.text)));

}

[]] >

< / fx:Script >

< s: states >

< name s: State = "normal" / >

< name s: State = "flat" / >

< name s: State = "low" / >

< / s: states >

<!-layer 1: shadow->

<!---@private-->

< s:Rect id = "shadow" left = "-1" right = "-1" high = low '-1' = '-1' radiusX = "2" >

< s:fill >

< s:LinearGradient rotation = "90" >

< s:GradientEntry color = "0x000000".

Color.Down = "0xFFFFFF"

Alpha = "0.01".

Alpha. Down = "0" / > "

< s:GradientEntry color = "0x000000".

Color.Down = "0xFFFFFF"

Alpha = "0.07"

Alpha. Down = "0.5" / > "

< / s:LinearGradient >

< / s:fill >

< / s:Rect >

<!-layer 2: fill->

<!---@private-->

< s:Rect id = "fill" left = "0" right = "0" top = low "0" = "0" >

< s:fill >

< s:LinearGradient rotation = "90" >

< s:GradientEntry color = "0xFFFFFF".

Color.hovered = "0xBBBDBD"

Color.Down = "0xAAAAAA"

Alpha = "0.85" / >

< s:GradientEntry color = "0xD8D8D8".

Color.hovered = "0x9FA0A1"

Color.Down = '0 x 929496'

Alpha = "0.85" / >

< / s:LinearGradient >

< / s:fill >

< / s:Rect >

<!-layer 3: filling lowlight->

<!---@private-->

< s:Rect id = "lowlight" left = "0" right = "0" top = low "0" = "0" >

< s:fill >

< s:LinearGradient rotation '270' = >

< s:GradientEntry color = "0x000000" ratio = "0,0" alpha = "0,0627" / >

< s:GradientEntry color = "0x000000" ratio = alpha '0.48' = "0,0099" / >

< s:GradientEntry color = "0x000000" ratio = alpha "0.48001" = "0" / >

< / s:LinearGradient >

< / s:fill >

< / s:Rect >

<!-layer 4: highlight of fill->

<!---@private-->

< s:Rect id = "highlight" left = "0" right = "0" top = low "0" = "0" >

< s:fill >

< s:LinearGradient rotation = "90" >

< s:GradientEntry color = "0xFFFFFF".

ratio = "0.0".

Alpha = "0.33".

Alpha.hovered = "0.22"

Alpha. Down = "0.12" / >

< s:GradientEntry color = "0xFFFFFF".

ratio = '0.48 '.

Alpha = "0.33".

Alpha.hovered = "0.22"

Alpha. Down = "0.12" / > "

< s:GradientEntry color = "0xFFFFFF".

ratio = "0.48001."

Alpha = "0" / >

< / s:LinearGradient >

< / s:fill >

< / s:Rect >

<!-layer 5: race to highlight (all States except down)->

<!---@private-->

< s:Rect id = "highlightStroke" left = "0" right = "0" top = low '0' = '0' excludeFrom 'low' = >

< s:stroke >

< s:LinearGradientStroke rotation = "90" weight = "1" >

< s:GradientEntry color = "0xFFFFFF" alpha.hovered = "0.22" / > "

< s:GradientEntry color = "0xD8D8D8" alpha.hovered = "0.22" / > "

< / s:LinearGradientStroke >

< / s:stroke >

< / s:Rect >

<!-layer 6: highlight of the stroke (to the low State only)->

<!---@private-->

< s:Rect id = "hldownstroke1" left = "0" right = "0" top = low "0" = "0" includeIn = "bottom" >

< s:stroke >

< s:LinearGradientStroke rotation = "90" weight = "1" >

< s:GradientEntry color = "0x000000" alpha = "0.25" ratio = "0,0" / >

< s:GradientEntry color = "0x000000" alpha = "0.25" ratio = "0.001" / >

< s:GradientEntry color = "0x000000" alpha = "0.07" ratio = "0,0011" / >

< s:GradientEntry color = "0x000000" alpha = "0.07" ratio = "0,965" / >

< s:GradientEntry color = "0x000000" alpha = "0.00" ratio = "0.9651" / >

< / s:LinearGradientStroke >

< / s:stroke >

< / s:Rect >

<!---@private-->

< s:Rect id = "hldownstroke2" left = "1" right = "1" top down = '1' = '1' includeIn = "bottom" >

< s:stroke >

< s:LinearGradientStroke rotation = "90" weight = "1" >

< s:GradientEntry color = "0x000000" alpha = "0.09" ratio = "0,0" / >

< s:GradientEntry color = "0x000000" alpha = "0.00" ratio = "0.0001" / >

< / s:LinearGradientStroke >

< / s:stroke >

< / s:Rect >

<!-< s:Rect id = "fill" left = "0" right = "0" top = low "0" = "0" >

< s:fill >

< s:LinearGradient rotation = "90" >

"< s:GradientEntry color.normal"0xf9f9f9"color.hovered =" = 0xfcfdfa ".

Color.Down = "0xdceac2" alpha = "0.85" / > "

"< s:GradientEntry color.normal"0xeaeaea"color.hovered =" = 0xdceac2 ".

Color.Down = "0xd2e1b5" alpha = "0.85" / > "

< / s:LinearGradient >

< / s:fill >

< / s:Rect >->

<!-< right '7' = left s:VGroup = '7' high low = '5' = '5' gap = "6" verticalAlign = "middle" >

< s:TextInput width = "100%" / >

< s:HGroup width = "100%" >

< s:Group id = "labelDisplayGroup" width = "100%" / >

< s:Group id = includeInLayout = "false" "sortIndicatorGroup" / >

< / s:HGroup >

< / s:VGroup >->

< s:VGroup verticalAlign = "middle" left = "7" = "5" top right = '7' low gap '5' = '2' = >

"< s:TextInput id ="filterInput"width ="100% "visible ="false"includeInLayout = 'false' keyUp =" onKeyUp (event) "Focusout/focusouthandler() =" onFocusOut (event) "click ="onTextInputSelection (event)"/ >

< s:Spacer id = "filterSpacer" visible = "false" includeInLayout = "false" height = "5" / >

< s:HGroup width = "100%" height = "100%" verticalAlign = "middle" >

< s:Group id = "labelDisplayGroup" width = "100%" / >

< s:Group id = includeInLayout = "false" "sortIndicatorGroup" / >

< / s:HGroup >

< / s:VGroup >

< / s:GridItemRenderer >

You can use 'alt' or 'Ctrl' click and just check on the event to see if one of these is 'true '.

Tags: Flex

Similar Questions

  • I installed the SQL 4.0 developer and repository installation was a success. But the tools-&gt; Data Miner-&gt; Make visible option is not enabled. Also when I double click on the data minor user login I get the message the montrela

    I installed the SQL 4.0 developer and repository installation was a success. But the tools-> Data Miner-> Make visible option is not enabled. Also when I double click on the data minor user login I get the message workflow repository data need to be stored as xml binary on databases of version 11.2.0.4 or higher. You want to migrate your data from worklfow binary storage?  WARNING: All sessions with the ODMRUSER role will be disconnected.  Client version: 12.2.0.17.29 Version: 12.1.0.1.0 the database repository Version: 12.1.0.2.1. I don't have an older repository. Please help me solve this problem.

    Try to create a data minor user account (for example DMUSER) using the script createuser.sql in the \dataminer\scripts directory.  Use this user account to connect instead of the anonymous account.

    Thank you.

  • How to add sorting Date columns?

    Hi all

    I have to sort the column date OBIEE answers. I registered using the type of the sort option by clicking on edit option-> sorting-> sort object growing option. Even in this case sorting will not apply to the column. What could be the problem.

    Anyone please shed some light on this issue.

    Thanks in advance,
    Stephanie

    875991 wrote:
    Hi all

    I have to sort the column date OBIEE answers. I applied the sort by using the sort option by clicking on change of object-> sorting-> sorting option growing option. Even in this case sorting will not apply to the column. What could be the problem.

    Anyone please shed some light on this issue.

    Thanks in advance,
    Stephanie

    You are talking in a PivotTable? If Yes, then you do this:

    (1) duplicate the layer of data column and drag it all the way to the left.

    (2) apply the type of this column.

    (3) hide.

    In PivotTables, OBIEE sorts from left to right, whatever by clicking on the arrows to sort. To sort by a particular column, it must be further. If you want a secondary sort, to duplicate the layer of this column and move to second on the far left. Hide the columns so that you do not see the columns twice. Of course, if the column you want to sort by is already in the extreme is left, so no need to duplicate the layer. Simply apply the sort. Most people, however, that the sort to be elsewhere in the section column lines and that's why you need to duplicate the layer, sort and hide.

    I hope this is what you have been struggling with.

  • Camera Raw open as smart object is not re-opening Camera Raw on double click!

    I can't get the Camera Raw dialog to reappear after I open an image as a smart object in Photoshop.

    Note that I'm opening Photoshop CS6, no bridge or Lightroom. I use Open as... (Shift-Ctrl-Alt-O), then select Camera Raw in the file Type drop-down list to open a standard PSD file. It happens in the Camera Raw dialog box. After that making edits (and savings as a preset) I SHIFT-click on the CR Open button to change to Open ACE Object.

    It happens in Photoshop with the changes. The thumbnail of the layer shows the small icon of the smart object to this topic. But when I double-click on top the dialogue came not from Camera Raw. Instead, Photoshop opens what appears to be a copy built of the original image with no editing. It carries the extension .psd, not the usual .psb extension. In addition, any changes to this document and save it has bizarre results on the original image.

    I swear to you that I managed to do work once earlier today, but now he does this again and I don't know what I'm doing wrong. I thought that maybe that's a small problem, but rebooting did not help.

    Thanks if you can understand this a ton!

    Since I realized this file to open a JPG or PNG (and probably a RAW) as Camera Raw works very well. In other words, I can edit in Camera Raw, and then shift-click to Open the Object and the smart object works fine in Photoshop. It's only when I try to open a PSD file type by using the file > open as... (File type: Camera Raw) I get the weird behavior when I opened CR mods as a smart object. Someone know why it works with a JPG or PNG format, but does not work with a PSD file?

    AFTER THAT I have the JPG or PNG opened as a smart object, I can then save it as a PSD and smart objects work fine.

  • How to raise an event during the double click on a tree node

    I have this code that creates the new tab in a remote Java class.

    treeView.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<TreeItem<String>>()
       {
       @Override
       public void changed(ObservableValue<? extends TreeItem<String>> observable, TreeItem<String> oldValue, TreeItem<String> newValue)
       {
       System.out.println("Selected Text : " + newValue.getValue());
       // Create New Tab
       Tab tabdata = new Tab();
       Label tabALabel = new Label("Test");
      tabdata.setGraphic(tabALabel);
    
       DataStage.addNewTab(tabdata);
       }
       });
    

    Can you tell me how I can change the code to open a new tab when I double click a tree node. In my code, the tab opens when I click once. What event handler do I need?

    import java.util.Arrays;
    
    import javafx.application.Application;
    import javafx.event.EventHandler;
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.StackPane;
    import javafx.scene.control.TreeCell;
    import javafx.scene.control.TreeView;
    import javafx.scene.control.TreeItem;
    import javafx.scene.control.SelectionMode;
    import javafx.util.Callback;
    
    public class TreeTest extends Application {
    
      public static void main(String[] args) {
        launch(args);
      }
    
      @Override
      public void start(Stage primaryStage) throws Exception {
        primaryStage.setTitle("TreeView Test");
        primaryStage.setScene(createScene());
        primaryStage.show();
      }
    
      private Scene createScene() {
        final StackPane stackPane = new StackPane();
        final TreeView treeView = new TreeView();
        treeView.setRoot(createModel());
        treeView.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
    
        treeView.setCellFactory(new Callback, TreeCell>() {
          @Override
          public TreeCell call(TreeView treeView) {
            return new ClickableTreeCell();
          }
        });
        stackPane.getChildren().add(treeView);
        return new Scene(stackPane);
      }
    
      private TreeItem createModel() {
        TreeItem root = new TreeItem("RootNode");
        TreeItem packageA = new TreeItem("package A");
        packageA.getChildren().addAll(
            Arrays.asList(new TreeItem("A1"), new TreeItem("A2"), new TreeItem("A3"))
        );
        TreeItem packageB = new TreeItem("package B");
        packageB.getChildren().addAll(
            Arrays.asList(new TreeItem("B1"), new TreeItem("B2"), new TreeItem("B3"))
        );
        root.getChildren().addAll(Arrays.asList(packageA, packageB));
        return root;
      }
    
      private class ClickableTreeCell extends TreeCell {
        ClickableTreeCell() {
          setOnMouseClicked(new EventHandler() {
            @Override
            public void handle(MouseEvent event) {
              // Handle double-clicks on non-empty cells:
              if (event.getClickCount()==2 && ! isEmpty()) {
                System.out.println("Mouse double-clicked on: " + getItem());
              }
            }
          });
        }
    
        @Override
        protected void updateItem(String item, boolean empty) {
          super.updateItem(item, empty);
          if (empty) {
            setText(null);
          } else {
            setText(item);
          }
        }
      }
    }
    
  • music file will not play in second hard drive double click Error "" the requested operation requires a rise ".

    Original title: music file won't play second hard drive by double click.

    Windows 7 ultimate/64

    I have a second hard drive on which I store my music files. If I open a player (Foobar is what I use now) and open the music file in the program, he plays very well, since the second HD.

    But if I double click on the music file (.mp3, usually), I get the message:

    "The requested operation requires a rise."

    I think it should open in the player by default when I do that.

    I remember well, it wasn't the case when I started to use this computer (it's fairly new), while something might have changed.
    I have the .mp3, .wav etc all default extensions for the Foobar player program.

    I went through elaborate measures to appropriate the entire disk and have granted full permissions for me as a user, following to the letter one of the many sites of the detailed instructions for this operation. But there is no help in sight.
    Original title: music file won't play second hard drive by double click

    So I can let my reader opens a music file leave a second drive, but I can't call him by double click or click right/context citing the player. When I do that, nothing happens, but I don't get the message "requires a rise."

    Every time I think that I am getting to know Windows 7, something like this happens. Avoid to receive life dull, of course.

    Thanks a lot for your suggestions. I've pretty much exhausted my own attempts.

    Jack

    Update: I think I've solved the problem. I have no idea that what caused it, but here's what fixed it:

    1 uninstalled Foobar with usual Control Panel uninstall
    2A through the startup disk everything and delete folders or files with the name "foobar" in them.
    3 did the same for the registry (creating a point of restoration first, of course)
    4 restarted
    5 download and install Foobar.

    Yes.

    Works very well.

    A big thank you to all who responded.

    Jack

  • How can I sort a column of short phrases in numbers?

    For example, "search for" appears as a first, second and third word in some sentences in column B, but not in all. How can I make the phrases "search for" in a column on a new sheet? I repeat this process for other keywords to make them into categories.

    Hi Ricketer,

    Here are two methods. Both the screening of the string at the top of its column to the string in column B, but are not distinguished between this chain as a word on its own or part of a word string (as in the examples highlighted).

    Formulas:

    C2: = IF (ISERROR (FIND(C$1,$B2,)),"", $B2 ")

    Filled on the right in column C and all lines below.

    E2: = IF (LEN ($B2) > LEN (SUBSTITUTE($B2,E$1,"",)) ", $B2," "")

    Filled on the right in column F and all lines below.

    Kind regards

    Barry

  • How ItemRenderer change for DataGrid column based on the value of this column?

    Hello! I am trying to create a DataGrid that has a component Button to register when the value of this column is 'Open', then a label saying full when the value of this column is "Full". But Im having a hell of a time he find.

    Here's my MXML with 2 different inline installation of components for different rendering engines point 2:

    <? XML version = "1.0" encoding = "utf-8"? >
    "" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml ' layout = "absolute" >

    < mx:Component id = "RegFull" >
    < mx:VBox horizontalAlign = "center" verticalAlign = "middle" >
    < mx:Label id = 'Full text' text = "Full" / >
    < / mx:VBox >
    < / mx:Component >

    < mx:Component id = "RegButton" >
    < mx:VBox horizontalAlign = "center" verticalAlign = "middle" >
    < mx:Button label = "Save" / >
    < / mx:VBox >
    < / mx:Component >

    < mx:DataGrid id = "scGrid" width = "100%" height = "100%" number of lines = "4" >

    < mx:dataProvider >
    < mx:Object label = "Status" data = 'Open' / >
    < mx:Object label = "Status" data = "Full" / >
    < mx:Object label = "Status" data = 'Open' / >
    < mx:Object label = "Status" data = "Full" / >
    < mx:Object label = "Status" data = 'Open' / >
    < mx:Object label = "Status" data = "Full" / >
    < / mx:dataProvider >

    < mx:columns >
    < mx:DataGridColumn id = "RegCol" headerText = "Reg" dataField = "data" / >
    < / mx:columns >

    < / mx:DataGrid >
    < / mx:Application >

    How can I dynamically use the right of itemrenderer based on the value of the field? THANKS FOR ANY HELP PROVIDED!

    The best
    Stephen

    You can have more than 1 column renderer engine. There are two ways to do this. One way would be to use States. A State for each possible value in the data. Since you either want a button (data == 'open') or a label (data == 'Full') by using the States wouldn't be a bad choice.

    Alternatively, you can use a canvas instead of a VBox. Make a label and a button with horizontalCenter = "0" "0" = red to make them each other. Make it visible according to the data value:






    where dataField is the value of the property dataField on this converter DataGridColumn.

  • Photoshop smart object layer does not open in ACR when I double click

    I have a file open in photoshop raw, it reproduces, is smart, when objects I click on the smart object on the file icon, I get another copy of the file in photoshop, the file does not open up in acr, is there a setting I'm missing?

    Post edited by: Rodwf

    This is because the smart object is a raster layer image not a raw file.  If you want a smart object RAW you must do the ACR. Instead of clicking the image open in Photoshop button. Hold down the SHIFT key the key will change to open the object in Photoshop.

  • I am not able to open user accounts, double-click on and nothing happens.

    I want to check my administrator settings because I can't load my new printer.

    Hi acapellasky,

    Welcome to the Windows Vista answers Forum!

    First try to set the default Administrator account and check if you can access the account.

    1. click on the Start button

    2. on the Start Menu, click all programs Accessories followed

    3. in the menu accessories, right click on the option from the command line

    4. in the menu that appears, click on the option "Run as Administrator"

    5. If you have the User Account Control (UAC) enabled, you will be asked permission before the opening of the command line. You simply press the button continue if you are the administrator or insert password etc.

    6. in the command prompt window, type the command net user administrator / Active: Yes and press ENTER.

    7. close the elevated command prompt.

    8. close the session (in the Start Menu) and you will see your new administrator integrated next to your current account.

    9. click on the new account administrator display photo icon and connect to it.

    For more information, see the following links on the configuration of the user account control:

    http://TechNet.Microsoft.com/en-us/library/cc709628 (WS.10) .aspx

    http://Windows.Microsoft.com/en-us/Windows-Vista/change-a-users-account-type

    If it works on the default Administrator account, and then you try to create a new user account and check if it works.

    For more information, you can consult the following link to correct the corrupted user profile.

    http://Windows.Microsoft.com/en-us/Windows-Vista/fix-a-corrupted-user-profile

    Hope this information is useful.

    Jeremy K

    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How do you disconnect the double click to single click? or it is not available in Windows 7

    How can I change my mouse to double click to single click?  or is this not possible in Windows 7?  I think remember me from that of previous versions.

    Thank you

    It is in the http://windows.microsoft.com/en-US/windows7/Change-folder-options Folder Options

  • How do I sort on datagrid spark.

    I am trying to sort a spark datagrid column when users click on the individual column header. I put the sortableColumns property to true, but still have no luck

    I would be grateful if anyone here can help me out. Thank you very much.

    You will get useful information from the link:

    http://help.Adobe.com/en_US/Flex/using/WS8b1c39bd7e9fc3647f39ab2512d530e9965-8000.html

  • How to really sort by name of no type.

    I am trying to sort my files strictly by name when I press 'name' not of type file, and then by name alias is the same thing by clicking on sort by type. Can you please explain to me how not to sort by name, regardless of the type.

    I am trying to sort my files strictly by name when I press 'name' not of type file, and then by name alias is the same thing by clicking on sort by type. Can you please explain to me how not to sort by name, regardless of the type.

    Hello

    Looks like you're in a library folder.

    The options you choose may depend on what type of files are in the folder. If you are in a file optimized for photos, you can see the different options available in a file optimized for Documents.

    Alphanumeric sorting in an images folder, select the folder in the menu arrange by.

    Just above the menu arrange by, click the drop-down Options menu, and then select Details.

    Now you have columns, name, Date, label, size, etc.

    Click the upper part of the column name to sort by name. Whenever you click on the top of the column, reverse the order. You can do the same thing with any of the other columns.

    In a file optimized for the Documents, it is substantially the same, except that the list in the menu arrange by is different. Simply click name in the list and details in the Options menu.

    Outside the libraries, in the normal files, such as images of C:\Users\yourname\My. You will see no the menu reorganization, only the View Menu. Simply select the details to get the named columns.

    Let us know if you have any other questions.

    Thank you for using Windows 7

    Ronnie Vernon MVP
  • Resizing DataGrid column width

    How can I enable the user to quickly adjust automatically a column by double-clicking it, as you can do in Excel?

    Also, how could I have the columns automatically sized this way during load?

    No mechanism built as far as I know. This shuold help you get started:

    var int cols = this.dg.columnCount;
    for (var i: int = 0; i< cols;="" i++)="">
    Col: DataGridColumn var = dg.columns [i];

    var tlm:TextLineMetrics = dg.measureText (col.headerText);
    Col.Width = tlm.width;
    }

    Basically, you'll need to go on each column, measure the width of the text that is in this case, I will put only the width as wide as the header text - using the TextLineMetrics class and set the column width. You might alos have invalidated the DataGrid Properties after the loop to force a refresh.

    ATTA

  • Images, do not open by double-clicking

    Hello

    This problem happened to me a little lonely with CS4, so I thought I would finally ask. Virtually all of my images are configurΘ for dΘmarrer with Photoshop. My problem is that many times, I double click on an image on my computer to open it in photoshop, and then photoshop rises and don't open it or even try. Usually, the image opens if photoshop is currently not open, and is lanuched by double clicking the image well. The problem seems very random and it to JPEG, PNG, GIF and BMP, and TIFF, as far as I am awear. PSD looks good. Note that this problem has not been resolved by resetting the preferences as I recently have doen it and it's still there. Any suggestions on how to make it work?

    How are defined the default file associations?  In Vista go to control programs by default/Panel associated with the files.

    Not a geek but see my jpeg file is set for Windows Photo Gallary and PDS is defined for CS3.

    Can check it because this program is open could influence where it loads?

Maybe you are looking for