Some way of identifying name of ChangeEvent source object?

I'd like to add a series of JSliders to a project I'm working on, before I write my custom interface, so that I can manipulate some parameters live.
There's only one method I want to call from any of these sliders, but a single string argument for the method will change according to which JSlider is the source of the event.
Am I able to write a ChangeListener that can somehow distinguish between the different JSliders I'm using? Because it seems arduous to write a separate ChangeListener for every JSlider object.
Thanks.

Well I tried the getSource().toString() approach, and what I worried would happen happened - it's just an internal description of the JSlider, nothing that I can easily refer to. I have to identify the JSlider in order to pass the correct string argument to my method, yet the only identifying things in the internal description are things like position..
Here's an example of what getSource().toString() produces in a ChangeListener method:
javax.swing.JSlider[,0,55,230x55,alignmentX=0.0,alignmentY=0.0,border=,flags=296,
maximumSize=,minimumSize=,preferredSize=,isInverted=false,majorTickSpacing=10,
minorTickSpacing=1,orientation=HORIZONTAL,paintLabels=true,paintTicks=true,
paintTrack=true,snapToTicks=false,snapToValue=true]Surely there is some way eg. to get the name you gave to the JSlider instance that's producing the ChangeEvent? Because if not, I'll have to write a separate listener for every one, or else a method to map the slider positions to the method call I need (since the position is the only distinguishable thing in the description).
Suggestions?

Similar Messages

  • Pls. identify some seeded views used as Existing Data Source in DBI Reports

    Hi!
    Can someone please identify some seeded views used as Existing Data Source in DBI Reports. I only need some idea how they are defined.
    Thanks.

    Jon632 wrote:
    Hi!
    Can someone please identify some seeded views used as Existing Data Source in DBI Reports. I only need some idea how they are defined.
    Thanks.
    You can find the list of seeded views in eTRM website -- http://etrm.oracle.com/pls/etrm
    Are there seeded tables/views of DBI dimension objects in Oracle EBS?
    Thanks,
    Hussein

  • XmlDataProvider .... is gone completely in my Xaml file. Why? How many different ways to deal with xml data source through WPF

    I followed a procedure described in a book.
    1. insert "Inventory.xml" file to a project "WpfXmlDataBinding" .
    2. add the XML data source through the data panel of "blend for 2013", named it "InventoryXmlDataStore" and store it in the current document.
    3. dragged and droppped the nodes from the Data panel onto the artboard.
    Then I checked my Xaml file against the one provided by the book
    Xaml file by the book:
    <Window.Resources>
    <!-- This part is missing in my xaml file --><XmlDataProvider x:Key="InventoryDataSource"
    Source="\Inventory.xml"
    d:IsDataSource="True"/>
    <!-- This part is missing in my xaml file -->
    <DataTemplate x:Key="ProductTemplate">
    <StackPanel>
    <TextBlock Text="{Binding XPath=@ProductID}"/>
    <TextBlock Text="{Binding XPath=Cost}"/>
    <TextBlock Text="{Binding XPath=Description}"/>
    <CheckBox IsChecked="{Binding XPath=HotItem}"/>
    <TextBlock Text="{Binding XPath=Name}"/>
    </StackPanel>
    </DataTemplate>
    </Window.Resources>
    <Grid>
    <ListBox HorizontalAlignment="Left"
    ItemTemplate="{DynamicResource ProductTemplate}"
    ItemsSource="{Binding XPath=/Inventory/Product}"
    Margin="89,65,0,77" Width="200"/>
    </Grid>
    my Xaml file:
    <Window x:Class="WpfXmlDataBinding.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="922" Width="874">
    <Window.Resources>
    <DataTemplate x:Key="ProductTemplate">
    <StackPanel>
    <TextBlock Text="{Binding XPath=@ProductID}"/>
    <TextBlock Text="{Binding XPath=Cost}"/>
    <TextBlock Text="{Binding XPath=Description}"/>
    <CheckBox IsChecked="{Binding XPath=HotItem}"/>
    <TextBlock Text="{Binding XPath=Name}"/>
    </StackPanel>
    </DataTemplate>
    </Window.Resources>
    <Grid DataContext="{Binding Source={StaticResource InventoryXmlDataStore}}">
    <ListBox HorizontalAlignment="Left" Height="370"
    ItemTemplate="{DynamicResource ProductTemplate}"
    ItemsSource="{Binding XPath=/Inventory/Product}"
    Margin="65,55,0,0" VerticalAlignment="Top" Width="270"/>     
        </Grid>
    </Window>
    All looks quite the same except the <XmlDataProvider ....> part under <Window.Resources>, which is gone completely in my Xaml file.
    1, Why?
    2, How many different ways to deal with xml data source through WPF?
    Thanks, guys.
    (ps My "WpfXmlDataBinding" runs without problem through.)

    Never do yourself down Richard.
    Leave that to other people.
    It's quite common for smart developers to think they're not as good as they are.
    I coach a fair bit and it's a surprisingly common feeling.
    And to repeat.
    Never use anything ends .. provider.  They're for trivial demo apps.  Transform xml into objects and use them.  Write it back as xml.  Preferably, use a database.
    You want to read a little mvvm theory first.
    http://en.wikipedia.org/wiki/Model_View_ViewModel
    Whatever you do, don't read Josh Smiths explanation.  I used to recommend it but it confuses the heck out newbies. Leave that until later.
    Laurent Bugnion did a great presentation at mix10.  Unfortunately that doesn't seem to be working on the MS site, but I have a copy.  Download and watch:
    http://1drv.ms/1IYxl3z
    I'm writing an article at the moment which is aimed at beginners.
    http://social.technet.microsoft.com/wiki/contents/articles/30564.wpf-uneventful-mvvm.aspx
    The sample is just a collection of techniques really.
    I have a sample which involves no real data but is intended to illustrate some aspects of how viewmodels "do stuff" and how you use datatemplates to generate UI.
    I can't remember if I recommended it previously to you:
    https://gallery.technet.microsoft.com/WPF-Dialler-simulator-d782db17
    And I have working samples which are aimed at illustrating line of business architecture.  This is an incomplete step by step series but I  think more than enough to chew on once you've done the previous stuff.
    http://social.technet.microsoft.com/wiki/contents/articles/28209.wpf-entity-framework-mvvm-walk-through-1.aspx
    The write up for step2 is work in progress.
    https://gallery.technet.microsoft.com/WPF-Entity-Framework-MVVM-78cdc204
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

  • Is there any way to identify the two classes are compiled by same vm

    Is there any way to identify the two classes are compiled by same vm?
    Thank's a lot.

    I think this is the better forum than java compiler. The answer to the question you asked is no.
    But that question is not the best way to address your problem.
    If this were me, I'd use a tool like ASM (http://asm.objectweb.org/) to read in that file, and replace the getToday() method, with one like this
    long getToday() {
        return 20080101;
    }and replace the class file with this new one. (keep the old one, they might be using a class loader that verifies class signatures or something)
    (They said the code you are looking at could have been changed by you - so take the hint and change it back).
    If they've ripped you off, this will restore justice much more cheaply and effectively than involving the lawyers. If they then sue you for breaching the license agreement, that would probably force them to disclose their underhand tactics.
    OTOH, if you're lying to us about the purchase, and needing to pay for upgrades to fix the performance issue, and instead are trying to crack some trial software, then I hope they are using a custom class loader that checks the integrity of the classes.
    If you are being ripped off, why are you not telling us the name of the company? I am not sure who is being ripped off here.
    Bruce

  • Is there any way to identify the particular socket connection is closed ?

    Is there any way to identify the particular socket connection is closed or not ?
    Any methods ???
    How can the program knows the connection is lost or some thing ...
    Is the socket throws some excpetions when there is no active connection ???
    namanc

    If you get an IOException when you try to use the socket, the connection was obviously closed.
    The correct way for an application to know if the socket was closed is:
    1) the server sends a message indicating that the socket should be closed
    2) the client closes the socket itself

  • Is there some way to add multiple addresses to an email I am sending that doesn't close the contact list after I click on an address?  This necessitates constantly going back to click the + sign to add each address separately.

    Is there some way to add multiple addresses to an email I am sending that doesn't close the contact list after I click on an address?  This necessitates constantly going back to click the + sign to add each address separately.  Is there some way I can open the contact list, click on all of the individual addresses to which I want to send the email without the list closing between each address entry, and have all of my address entries be listed to the email at one time?  Something like it works in Gmail.  I do not want to use set lists, I want to enter different addresses each time I send an email.  And I am a very slow typist, so I don't want to type the first few letters of each recipient's name.  It is much faster for me to just click on the e-mail addresses in the list as a group.  It doesn't make any sense to me to have to reopen the contact list for each address, when it should be so easy to click on all of the addresses I want at one time and then click once to add them all to the email as a group.  If there is a solution to this, please tell me.  Thanks.

    Vatlily,
    Try this:
    1. Select Mail>File>New Message.
    2. Select Mail>Window>Address Panel.
    3. Use (command+click) on the desired addressees in the Address Panel to create the list.
    4. Click "To:" on the top left of the Address Panel.
    The group that you selected will be added to the "To" field in your New Message.

  • Is there a way to identify MRP requisitions transfered to SRM?

    Hello experts,
    We are using SRM 5.0 connected to an ECC 6.0 backend system, using ECS scenario.
    I have the following question:
    Is there a way to identify in SRM requisitions transtered from ECC that are created in R3 from an MRP process? Meaning like an indicator or a flag in a table in SRM?
    Thanks!
    Regards,
    Gilberto Gallardo

    Hi
    <u>Please go through the SAP OSS Notes below as well -></u>
    Note 451245 Framework conditions connection MRP <-> EBP
    Note 505030 Restrictions for the integration of external requirements
    Note 441892 Integrating external requirements
    Note 831348 Source List for Stock requirments and MRP list -wong results
    Note 528808 Incorrect item numbers during the update (add items)
    Note 540339 Purchase requisitions are transferred incorrectly
    Note 534419 Transfer of purchase requisitions into the procuremnt system
    Note 532293 Fulfillment: incorrect quantity for activities and limits
    Note 447516 Composite SAP note PlugIn Correction for External Requiremts
    Hope this will help.
    Regards
    - Atul

  • Roll Name in the Source Window

    Is there a way to automatically show all of my roll names in the source window? I would like to be able to just click on a roll name in the source window and be able to see those particular photos in the main iPhoto window.

    Welcome to the Apple Discussions.
    No, Rolls don't get listed in the Source Pane.
    However, there is a way to view just the roll you want. Choose Library from the Source Pane and View > Film Rolls. (The entire library must be selected, with no filter in operation. Be sure all Year Smart Albums are selected - look below Library in the Source Pane. Click the little triangle to reveal or hide them.) Each roll has a disclosure triangle next to its title. Click it to open or close the roll. Option-click one triangle to open or close all rolls in your library. With all rolls closed, it is easy to scroll through the roll list, open one roll, and see just the photos in that roll.
    To make it easier, I title all of my film rolls. Click the little i in the lower left corner to open the Info Pane. When you select a roll's header in the main window you can edit its title, roll date, and comments by typing directly in the Info Pane. Comments are especially handy; they display only when the roll is closed. I use comments to list the contents of a roll, so that I know which roll to open when I want to find a particular photo.
    If you still want your rolls in the Source Pane, you can drag the roll's header there and an Album will be created with the same name and photos. To create Albums that automatically update when you change the photos in the rolls, you would have to create a Smart Album for each roll with the category "Roll contains (type the roll name)". That seems too cumbersome, in my opinion.
    Regards.

  • Is there a way to identify a thread you want to return to without tagging?

    Is there a way to identify a thread you want to return to without tagging?
    I will try to explain what I mean.
    Let say someone asks a question and you are curious at what people may suggest as solutions.  The interest could range from simple curiosity to "oh, I don't know how to do that, but would like to learn", or whatever reason that would cause someone to revisit a thread. 
    But the interest is weak enough that you do not want to subscribe to the discussion.  And the topic is not something you want to tag because it is an unusual thread that is unlikely going to re-occur, and you are not sure if you will or will not revisit after a solution is posted or the discussion goes a certain way. 
    Another example is if the question is interesting, you do not want to mark it because there is no answer / solution yet and you are curious if anyone would ever provide a solution, so you do not want to tag it and a subscription would be useless if no one replies.
    OR
    Maybe it is a hot topic of the day / week and that's it..  You would not revisit at a later date.
    But for the moment, you want to easily find it during the day or have a reminder that you want to revisit the thread ether in the near future or later when someone has provided an answer.
    Is there an easy way to mark threads that you want to re-visit?  Like a "todo" list, but rather a "to re-visit" list...
    R
    Solved!
    Go to Solution.

    Delicious is a website wher you can store URL for later use/retrieval. For every link you add you can add some tags, a description, and you can share them with others.
    I'm not using it for the use you have in mind, but it would be an idea. I have set up a special Mouse Gesture in Firefox that creates a delicious entry for the current page.
    I use delicious heavily when I am looking on the internet for a solution to a specific problem, what happens during such a search is that you see 20-30 pages that look promising but only 3 are actually on topic. Sometimes it turns out one of the 'not so good pages' are actually googd pages, but 3 days later you don't know exactly the search term  you used, or you are on another PC and it's hard to trace back your steps on the WWW. So by using Delicious I can easily create a list of pages on a particular topic.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Is there some way to adjust the size of a photo on a site like ebay?

    pls note: i am techno-incompetent and may not use the correct name or term.
    in internet explorer, when you click on a picture in ebay to enlarge it, there is a scale in the toolbar (?) in the lower right corner of the screen that allows you to change the size of the picture. is there some way (or tool or add-on or whatever) that will let me do that in firefox?

    Please update to the current Firefox 28 release.
    *Help > About Firefox
    *https://support.mozilla.org/kb/update-firefox-latest-version.
    *https://support.mozilla.org/kb/Updating+Firefox
    The Firefox 6.0.2 version that you currently run is no longer supported with security updates.
    *It is important to update Firefox and add-ons to the latest version to get all security fixes.
    You can find the full version of the current Firefox 28.0 release in all languages and for all Operating Systems here:
    *http://www.mozilla.org/en-US/firefox/all.html

  • I have an apple developer account to make a new app, but I need to give access to the designer without sharing my payment info or allowing him to have access to my icloud, apps or itunes account. There is some way to have another password?

    I have an apple developer account to make a new app, but I need to give access to the designer without sharing my payment info or allowing him to have access to my icloud, apps or itunes account. There is some way to have another password?

    The designer is usually someone who just handles the user interface portion of the code. The developer would handle core functionality. I assumed you were the developer and the designer was the designer. You are the client and your "designer" is the developer.
    Ideally, you should create a business account so that you can add someone to your team. That is the way it is supposed to work. Otherwise, you will have to ask for the final source code so that you can build and submit the app yourself. You should always have the source code regardless. You should always perform the submission under your own account too. Otherwise, it is the developer's app, not yours.
    Sharing accounts is against the Apple Developer agreement anyway. The App Store Gold Rush is over. Now it is mostly zombie apps and competing fraudsters. You don't want to give someone access to your iTunes account. You really don't want to give someone access to your bank account either.
    The best solution would be to convert your account to a business account. You may be able to have the developer submit the app and then transfer it to you.

  • Identify missing files in source control explorer

    Is there a way to identify which files are in the workspace and not in the TFS source control solution? The "Compare" option in the "Source Control Explorer" is grayed out. Tried using the power tools
    but only the Analyzer is installed. The TFPT.exe is not installed. There is a solution in Stack Overflow however none of it works. Thanks in advance.

    Hi Clem,  
    Thanks for your post.
    In Source Control Explorer, right-click on source folder path and select Add Items to Folder…, then check which file(s) list in the opened dialog and can add to source control.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Some ways to lip sink audio and video ?

    Have shot a song of a music video ,audio is there during the shoot also....
    now what can be a nice way to match the audio of the footage and the real WAV audio clip on the audio track in FCPx ?
    I want to place the dance step clip in a close on the top of the....clip with same dance step in the long shot to see how it would look
    if I could exactly place the two similar audios on each other I would almost match the lip sink....
    but since waveforms are not distinctly visible I can't even take help of that...
    Can you suggest some ways of placing shorter shots on long shots to see the result or will I have to sink them purely on my visual judgement ?

    Select both clips, and go: File: New Mulitcam.. Bam!
    Make sure to give the clips seperate Camera Name and/or Angel.
    Make sure 'Use Audio' is selected.. but that is the default.

  • Do I need to make an archive in some way?

    Hi
    I've just written my first applet. Because of the nature of the code I have had to spread it across several different classes (in separate files). Do the compiled files need to be archived together in some way before they are uploaded to a website?
    I'm basically asking this question because I've already tried to upload the files once, and the result was (so the java console tells me) something to the effect of �bad magic number�, even though the applet works fine when stored locally.
    Thanks very much for your time

    Ok I've tried it within jar a jar archive and without one, both ways get the same problem. My html applet tag looks like this:
    <APPLET height=450 width=450 align=middle code="draughts.gui.DraughtsApplet.class archive="DraughtsApplet.jar"> You need to have a browser with applets enabled to play this game. </APPLET>
    When the applet fails, the java console brings up this:
    java.lang.ClassFormatError: draughts/gui/DraughtsApplet (Bad magic number)
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    The applet works fine when it is on my home machine, however when it is uploaded, it stops working. I have checked that the directory structure is kept the same between when it is uploaded (the jar file in the same directory as the HTML file).
    Thanks for your time

  • How to get the full identifier name?

    I am using the Java Compiler API and walking through the AST to retrieve information. I was able to analyze this program:
      package com.test;
      import java.io.*;
      public class Test
         public static void main(String[] args)
              int x = FOO.ALL + BAR.NONE;
    }When I try to dump out the identifierTree using getName(), all I see is FOO instead of FOO.ALL and BAR instead of BAR.NONE, Am I misinterpreting the meaning of an identifier? Here is the fragment of my visitor code:
       @Override
        public Object visitIdentifier(IdentifierTree identifierTree, TreePath tp)
            // Print out the identifier name
            System.out.println("Identifier: " + identifierTree.getName().toString());
            return super.visitIdentifier(identifierTree, tp);
        }What should I do to extract the full FOO.ALL and BAR.NONE?
    Thanks for any ideas or suggestions.
    Edited by: scott2006 on Dec 29, 2009 6:54 PM

    Here's a quick example:
    import com.sun.source.tree.ClassTree;
    import com.sun.source.tree.CompilationUnitTree;
    import com.sun.source.tree.ExpressionTree;
    import com.sun.source.tree.Tree;
    import com.sun.source.tree.TreeVisitor;
    import com.sun.source.util.JavacTask;
    import com.sun.source.util.SimpleTreeVisitor;
    import java.io.IOException;
    import java.util.List;
    import javax.lang.model.element.ElementKind;
    import javax.lang.model.element.Name;
    import javax.lang.model.element.TypeElement;
    import javax.lang.model.util.Elements;
    import javax.tools.JavaCompiler;
    import javax.tools.JavaFileObject;
    import javax.tools.StandardJavaFileManager;
    import javax.tools.ToolProvider;
    public class Main {
        public static void main(String[] args) throws IOException {
            JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
            StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null);
            Iterable<? extends JavaFileObject> fileObjects = fileManager.getJavaFileObjects(args);
            JavacTask task = (JavacTask)compiler.getTask(null, fileManager, null, null, null, fileObjects);
            Elements elements = task.getElements();
            TreeVisitor<Void, Void> visitor = new CompilationUnitVisitor(elements);
            Iterable<? extends CompilationUnitTree> compilationUnitTrees = task.parse();
            for (CompilationUnitTree compilationUnitTree : compilationUnitTrees) {
                compilationUnitTree.accept(visitor, null);
        private static class CompilationUnitVisitor extends SimpleTreeVisitor<Void, Void> {
            private final Elements elements;
            public CompilationUnitVisitor(Elements elements) {
                super();
                this.elements = elements;
            @Override
            public Void visitCompilationUnit(CompilationUnitTree tree, Void ignore) {
                String currentPackagePrefix = "";
                ExpressionTree packageName = tree.getPackageName();
                if (packageName != null) {
                    String packageNameString = String.valueOf(packageName);
                    if (packageNameString.length() > 0) {
                        currentPackagePrefix = packageNameString + ".";
                TreeVisitor<Void, String> visitor = new ClassVisitor(this.elements);
                List<? extends Tree> typeDeclTrees = tree.getTypeDecls();
                for (Tree typeDeclTree : typeDeclTrees) {
                    typeDeclTree.accept(visitor, currentPackagePrefix);
                return null;
        private static class ClassVisitor extends SimpleTreeVisitor<Void, String> {
            private final Elements elements;
            public ClassVisitor(Elements elements) {
                super();
                this.elements = elements;
            @Override
            public Void visitClass(ClassTree tree, String currentPackagePrefix) {
                Name simpleName = tree.getSimpleName();
                String canonicalName = currentPackagePrefix + simpleName;
                TypeElement typeElement = elements.getTypeElement(canonicalName);
                ElementKind elementKind = typeElement.getKind();
                boolean isInterface = (elementKind == ElementKind.INTERFACE);
                System.out.println(canonicalName + " is an interface: " + isInterface);
                List<? extends Tree> memberTrees = tree.getMembers();
                String memberPrefix = canonicalName + ".";
                for (Tree memberTree : memberTrees) {
                    memberTree.accept(this, memberPrefix);
                return null;
    }Edited by: kschneid on Jan 4, 2010 10:33 AM
    Modified ClassVisitor.visitClass method to handle nested classes/interfaces

Maybe you are looking for

  • Problem with copying and pasting text blocks in Fireworks CS5

    Until recently when I copied and pasted a text block in Fireworks CS5, the block would retain all formatting applied to the copied text block, font, size, color, etc. Now, the pasted block reverts to some default setting. Oddly, if I copy multiple te

  • Transferring to new Windows computer

    I found some of the information I needed but still have a couple of questions. I have an iPod touch. I downloaded Itunes and have transferred my purchases. I have downloaded my photos, will they be wiped from my iPod when I sync? Also I have some mus

  • Unable to download book I purchased?

    Hello, I recently purchased a book through Blackwells, and I received the link to download the book. I opened it, but it said I needed Adobe Digtal Editions installed. After installing it and authorising my computer with my Adobe ID, I then went back

  • Correcting a scanned document that is tilted

    if a document is scanned crooked, how can I fix it Thank you

  • Apex 4 - websheet in database application

    Is there a way to have websheet functionality in standard database apllications? best regards,