FileDialog....filter help!
I'm still utterly confused as to how a FilenameFilter works for a filedialog...can anyone give me any sample code? I tried the following:
fileDialog.setFilenameFilter(new java.io.FilenameFilter() {
public boolean accept(File pathname) {
if (pathname.getName().endsWith(".ars")) {
return true;
else {
return false;
});and got this error:
<anonymous windowResults$6> is not abstract and does not override abstract method accept(java.io.File,java.lang.String) in java.io.FilenameFilterwindowResults being the class this is all in.
java.io.FilenameFilter accept method takes two parameters a File object and a String. Use it with a java.awt.FileDialog. A javax.swing.filechooser.FileFilter's accept method takes a single String parameter and is used with a javax.swing.JFileChooser.
Hope that helps
DB
Similar Messages
-
Dear all,
Ive been given a requirement to develop a simple report to query PO data where PO creation date = Inv Posting date
The cubes are available and in the cubes we have the PO creation date and Inv posting date as dimension.
Question is, without changing the dimension and by using the existing cubes, how can I restrict my data just by using the query builder to filter reports and I want my filter to be something like where 0DOC_DATE = 0PSTG_DATE
Thanks in advance.SCHT,
a simple way would be :
create a formula variable on both the dates and find the difference between tem using a CKF.
now havea condition for showing rows only where the difference is zero..
Arun
Assign points if it helps.. -
Hi
I'm using dialog boxes for Open and Save in my progra. Question is: Is it possible just to filter for java and text files.. heres my code.
fd2=new FileDialog(this,"Save As..",FileDialog.SAVE);
fd1=new FileDialog(this,"Open..",FileDialog.LOAD);
Open.addActionListener(
new ActionListener() {
public void actionPerformed( ActionEvent ae2 )
txtmsg="";
fd1.setVisible(true);
String filename=fd1.getFile();
String dirname=fd1.getDirectory();
File openfile=new File(dirname,filename);
try
FileInputStream fis=new FileInputStream(openfile);
int bytelength=fis.available();//calculates the file size
for (int bytecount=0;bytecount<bytelength;bytecount++)
char fch=(char)fis.read();
txtmsg=txtmsg+fch;
ta.setText(txtmsg);
catch(Exception ioe)
System.out.println("An exception has occured");
);yes it is possible
doublle click JAVA_HOME\demo\jc\swingset2\swingset2.jar (its long to start, be patient)
for source code look in JAVA_HOME\demo\jc\swingset2\src\*.java
marvinrouge -
Lowpass filter help for thermocouple reading
Hello
I have an old legacy E-Series AI-16SE 12bit 500KHz PCI card.
I am attempting to setup a temperature reading test program. I will have the E-Series connected to a SCB-68, which will have five T type thermocouples connected. I realize this is not the best test setup but it is an attempt at a quick setup on a bench so hopefully any noise interferance will be minimal.
I will be using LV 8.2 professional development.
I was wondering if I setup a software based lowpass filter if that would be helpful in this situation?
If so can someone show an example the has a cutoff freq for 2Hz? I am unfamilular with all the settings of the lowpass filter VI and some guidance would be much appreciated.
Thanks in advance
Tim C.
1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!Tim,
Rob's idea is probably what you should try first. It is in effect a low pass filter with about a 10 Hz corner frequency.
If you find that you have strong power line frequency interference, you may need to do more aggressive signal conditioning. Especially watch out for ground loops.
Lynn -
Circular Curve Distortion Illustrator 3D/Filter Help?
Hello I am trying to create a circular graphic that is similar to a race track turn with banking. Is there a type of distortion filter or 3d that I can use that can help me create the feeling of a vanishing point that bends around a turn?
Below is sort of the feeling
Thank youYou can do it wwith a simple path with a stroke or two and using the 3D Rotate effect with the option to use a perspective on it. You use no fill on th e path just strookes you get this
This is without the previw on
This is with the preview turned on -
Hi, i have an log file and i try to filter the results but the filter i use doesn't seem to work and i don't know why.. :(
The log has 2 properties, failures and date-time
I want to get all the logs which failure names are like '*denied*' -or '*error*' and also which date-time is within the last 80 minutes.
So i try with:
$timeframe = (get-date).AddMinutes(-80)
$log | ? { $_.failures -like '*Denied*' -or $_.failures -like '*error*' -and $_.'date-time' -ge $timeframe }
It shows correctly the errors which name are like above, but the times of those errors are wrong..
If my current $timeframe is : Friday, January 16, 2015 9:18:11 AM
The script displays failures with time like:
date-time
2015-01-16T07:07:00.632Z
2015-01-16T07:09:07.742Z
2015-01-16T07:09:56.071Z
2015-01-16T07:11:38.454Z
2015-01-16T07:11:47.455Z
2015-01-16T07:28:27.344Z
2015-01-16T07:28:30.246Z
2015-01-16T07:36:28.669Z
2015-01-16T07:36:30.058Z
2015-01-16T07:36:47.920Z
2015-01-16T08:18:53.571Z
2015-01-16T08:32:34.531Z
2015-01-16T08:32:34.547Z
2015-01-16T08:40:47.401Z
2015-01-16T09:00:37.766Z
2015-01-16T09:14:46.396Z
2015-01-16T09:35:29.428Z
2015-01-16T09:35:32.782Z
2015-01-16T09:35:32.798Z
2015-01-16T09:54:47.985Z
2015-01-16T09:54:48.016Z
But it should display the errros which time are over 9:18..
What is wrong with my Filter?
I also tried with:
$log | ? { (($_.failures -like '*denied*' -or $_.failures -like '*error*' ) -and ($_.'date-time' -ge $timeframe)) }
But i got the same result..
Can anyone help?
ThanksNot enough information in the question to know for sure, but I suspect you're doing a string comparison. Try casting your log timestamp to [datatime]:
$timeframe = (get-date).AddMinutes(-80)
$log | ? { $_.failures -like '*Denied*' -or $_.failures -like '*error*' -and [datetime]$_.'date-time' -ge $timeframe }
[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " " -
Ldapsearch or search-filter help required
Hi,
I have two directory Contexts (one is the sub-context of the other).
like : -
ou=SUN,<base DN>
cn=empl1,ou=SUN,<base DN>
ou=IBM,<base DN>
cn=empl2,ou=IBM, <base DN>
The objectClasses for the context entries are Companies and Employees .
Now i want to search for employee by name empl2 who is working in IBM. The returned attributes should contain both the attributes of IBM and the employee empl2.
I swear , the application being developed requires such complex search and as usual for performance sake, result should be fetched using single search constraint (nothing unusual, i am still incompetent) .
some-one please help me solve this problem. Pointers to online resource on complex ldap searches will also help.
thanks in advance
sridhar(&(cn=empl2)(ou=ibm))
-
Automator quartz filter help for pdf downsizing
i am trying to get this thread going on my computers and I can't quite tell what i am doing wrong.
i've to the Reduce File Size (75%).qfilter file but i am not having luck getting it working.
also, i seem to have a convertImages.workflow file but i am reading through about fifty pages of threads and i'm basically at a loss right now.
i /have/ been able to install filters that will let me downsize pdfs from within Preview but can anyone help me get one or both of the above going?
pretty please?oops. here's one of the threads:
https://discussions.apple.com/thread/3058047?start=0&tstart=0 -
I have XML data as in the example below. When all data (elements A_B_PROD, C_PROD, TOTAL_PROD,TOTAL_COACH_PROD, CREDITED_AMOUNT, XDRDAY and TOTAL_CREDITED ) are zero, as the middle person is, i don't want to send anything out of my Burst job.
this is my select expression: select="/BF_ADC_TRACK_TEMPLATE/LIST_BF_ADC_TRACK_BASE/BF_ADC_TRACK_BASE"
I am using this filter expression, but it is not working; an email with PDF is still being generated. Can someone tell me why?
filter="/BF_ADC_TRACK_TEMPLATE/LIST_BF_ADC_TRACK_BASE/BF_ADC_TRACK_BASE/LIST_BF_ADC_PERIOD_PROD/BF_ADC_PERIOD_PROD[TOTAL_PROD!=0] or /BF_ADC_TRACK_TEMPLATE/LIST_BF_ADC_TRACK_BASE/BF_ADC_TRACK_BASE/LIST_BF_ADC_PERIOD_COACH/BF_ADC_PERIOD_COACH[TOTAL_COACH_PROD!=0] or /BF_ADC_TRACK_TEMPLATE/LIST_BF_ADC_TRACK_BASE/BF_ADC_TRACK_BASE/LIST_BF_ADC_PERIOD_REV/BF_ADC_PERIOD_REV[TOTAL_CREDITED!=0]"
***xml data
<?xml version="1.0" encoding="UTF-8" ?>
- <BF_ADC_TRACK_TEMPLATE>
<P_PERSON_ID />
<P_SALESREP_ID />
<P_PERIOD_ID>2011014</P_PERIOD_ID>
- <LIST_BF_ADC_TRACK_BASE>
- <BF_ADC_TRACK_BASE>
<EMPLOYEE_NUMBER>29589</EMPLOYEE_NUMBER>
<FULL_NAME>susy q</FULL_NAME>
<EMAIL_ADDRESS>[email protected]</EMAIL_ADDRESS>
<SALESREP_NUMBER>11111</SALESREP_NUMBER>
<PERSON_ID>11111</PERSON_ID>
<SALESREP_ID>11111</SALESREP_ID>
<HOME_HOSPITAL>1111</HOME_HOSPITAL>
<PERIOD_ID>2011014</PERIOD_ID>
<PERIOD_NAME>BW13-11</PERIOD_NAME>
<INTERVAL_NUMBER>201103</INTERVAL_NUMBER>
<INTERVAL_NUMBER_EXPANDED>2011 - 03</INTERVAL_NUMBER_EXPANDED>
<INTERVAL_START_DATE>06/19/2011</INTERVAL_START_DATE>
<INTERVAL_END_DATE>09/10/2011</INTERVAL_END_DATE>
<INTERVAL_PAY_DATE>10/14/2011</INTERVAL_PAY_DATE>
<PERIOD_START_DATE>07/03/2011</PERIOD_START_DATE>
<PERIOD_END_DATE>07/16/2011</PERIOD_END_DATE>
- <LIST_BF_ADC_PERIOD_PROD>
- <BF_ADC_PERIOD_PROD>
<A_B_PROD>11111</A_B_PROD>
<C_PROD>11111</C_PROD>
<TOTAL_PROD>11111</TOTAL_PROD>
</BF_ADC_PERIOD_PROD>
</LIST_BF_ADC_PERIOD_PROD>
- <LIST_BF_ADC_PERIOD_COACH>
- <BF_ADC_PERIOD_COACH>
<TOTAL_COACH_PROD>0</TOTAL_COACH_PROD>
</BF_ADC_PERIOD_COACH>
</LIST_BF_ADC_PERIOD_COACH>
- <LIST_BF_ADC_PERIOD_REV>
- <BF_ADC_PERIOD_REV>
<CREDITED_AMOUNT>1111</CREDITED_AMOUNT>
<XDRDAY>0</XDRDAY>
<TOTAL_CREDITED>1111</TOTAL_CREDITED>
</BF_ADC_PERIOD_REV>
</LIST_BF_ADC_PERIOD_REV>
</BF_ADC_TRACK_BASE>
- <BF_ADC_TRACK_BASE>
<EMPLOYEE_NUMBER>22222</EMPLOYEE_NUMBER>
<FULL_NAME>speedy heedy</FULL_NAME>
<EMAIL_ADDRESS>[email protected]</EMAIL_ADDRESS>
<SALESREP_NUMBER>22222</SALESREP_NUMBER>
<PERSON_ID>22222</PERSON_ID>
<SALESREP_ID>22222</SALESREP_ID>
<HOME_HOSPITAL>2222</HOME_HOSPITAL>
<PERIOD_ID>2011014</PERIOD_ID>
<PERIOD_NAME>BW13-11</PERIOD_NAME>
<INTERVAL_NUMBER>201103</INTERVAL_NUMBER>
<INTERVAL_NUMBER_EXPANDED>2011 - 03</INTERVAL_NUMBER_EXPANDED>
<INTERVAL_START_DATE>06/19/2011</INTERVAL_START_DATE>
<INTERVAL_END_DATE>09/10/2011</INTERVAL_END_DATE>
<INTERVAL_PAY_DATE>10/14/2011</INTERVAL_PAY_DATE>
<PERIOD_START_DATE>07/03/2011</PERIOD_START_DATE>
<PERIOD_END_DATE>07/16/2011</PERIOD_END_DATE>
- <LIST_BF_ADC_PERIOD_PROD>
- <BF_ADC_PERIOD_PROD>
<A_B_PROD>0</A_B_PROD>
<C_PROD>0</C_PROD>
<TOTAL_PROD>0</TOTAL_PROD>
</BF_ADC_PERIOD_PROD>
</LIST_BF_ADC_PERIOD_PROD>
- <LIST_BF_ADC_PERIOD_COACH>
- <BF_ADC_PERIOD_COACH>
<TOTAL_COACH_PROD>0</TOTAL_COACH_PROD>
</BF_ADC_PERIOD_COACH>
</LIST_BF_ADC_PERIOD_COACH>
- <LIST_BF_ADC_PERIOD_REV>
- <BF_ADC_PERIOD_REV>
<CREDITED_AMOUNT>0</CREDITED_AMOUNT>
<XDRDAY>0</XDRDAY>
<TOTAL_CREDITED>0</TOTAL_CREDITED>
</BF_ADC_PERIOD_REV>
</LIST_BF_ADC_PERIOD_REV>
</BF_ADC_TRACK_BASE>
- <BF_ADC_TRACK_BASE>
<EMPLOYEE_NUMBER>33333</EMPLOYEE_NUMBER>
<FULL_NAME>dolorous ed</FULL_NAME>
<EMAIL_ADDRESS>[email protected]</EMAIL_ADDRESS>
<SALESREP_NUMBER>33333</SALESREP_NUMBER>
<PERSON_ID>33333</PERSON_ID>
<SALESREP_ID>33333</SALESREP_ID>
<HOME_HOSPITAL>3333</HOME_HOSPITAL>
<PERIOD_ID>2011014</PERIOD_ID>
<PERIOD_NAME>BW13-11</PERIOD_NAME>
<INTERVAL_NUMBER>201103</INTERVAL_NUMBER>
<INTERVAL_NUMBER_EXPANDED>2011 - 03</INTERVAL_NUMBER_EXPANDED>
<INTERVAL_START_DATE>06/19/2011</INTERVAL_START_DATE>
<INTERVAL_END_DATE>09/10/2011</INTERVAL_END_DATE>
<INTERVAL_PAY_DATE>10/14/2011</INTERVAL_PAY_DATE>
<PERIOD_START_DATE>07/03/2011</PERIOD_START_DATE>
<PERIOD_END_DATE>07/16/2011</PERIOD_END_DATE>
- <LIST_BF_ADC_PERIOD_PROD>
- <BF_ADC_PERIOD_PROD>
<A_B_PROD>33333</A_B_PROD>
<C_PROD>33333</C_PROD>
<TOTAL_PROD>33333</TOTAL_PROD>
</BF_ADC_PERIOD_PROD>
</LIST_BF_ADC_PERIOD_PROD>
- <LIST_BF_ADC_PERIOD_COACH>
- <BF_ADC_PERIOD_COACH>
<TOTAL_COACH_PROD>0</TOTAL_COACH_PROD>
</BF_ADC_PERIOD_COACH>
</LIST_BF_ADC_PERIOD_COACH>
- <LIST_BF_ADC_PERIOD_REV>
- <BF_ADC_PERIOD_REV>
<CREDITED_AMOUNT>33333</CREDITED_AMOUNT>
<XDRDAY>0</XDRDAY>
<TOTAL_CREDITED>33333</TOTAL_CREDITED>
</BF_ADC_PERIOD_REV>
</LIST_BF_ADC_PERIOD_REV>
</BF_ADC_TRACK_BASE>
</LIST_BF_ADC_TRACK_BASE>
</BF_ADC_TRACK_TEMPLATE>
Edited by: vykingzOR on Aug 8, 2011 5:44 PMAn example of multiple emails is here:
http://garethroberts.blogspot.com/2010/08/ebs-bursting-filter-on-xml-elements.html
Regards,
Gareth -
Hi all,
I'm trying to read in a channel, filter the noise out (supposedly the noise is about 10Hz), and then provide visual feedback for forces. Without the filter, everything works as it's supposed to, with the connection being between the data output of the DAQmx read and the input of the array. But when I add the filter, I get the error: Analysis: The following conditions must be met: 0 < f_low <= f_high <= fs/2. I'm not sure why I am getting this error and why it stops my feedback from occurring. I also have a version with a "nonexpress" filter but my feedback isn't working on this version either. both are attached!
Thank you!
Attachments:
expressfilterAIM2.vi 103 KB
nonexpressfilterAIM2.vi 55 KBWe still have an issue going on. To further explain the program, the program displays peak ground reaction force (GRF) on a chart of someone hopping on a force plate. The program finds the peak GRF by using shift registers, essentially it displays force only when the GRF at the i-1 iteration is greater than GRF at both the previous and next iteration (Aim2Hop2014_v4run.vi). This works until we add a filter (Aim2Hop2014_filt_test.vi). We're not sure what the problem could be, but the case structure is always false for Aim2Hop2014_filt_test.vi, when we didn't have this problem for Aim2Hop2014_v4run.vi. The problem seems to be some lack of compatibility between the case structure and the data coming out of the filter. Does anyone have any ideas about how we can fix this?
Thank you!
Attachments:
AIM2Hop2014_filt_test.vi 53 KB
AIM2Hop2014_v4run.vi 46 KB -
Report filter and column formula filter help
Using OBIEE 11.1.1.6.8
I have a column formula in an OBIEE Analysis that queries data based on a specific File Date: 31-Oct-2013. the formula looks like this: SUM(CASE WHEN "CLOV - File Date"."File Date" = '31-OCT-2013' AND "Pending Claim - Process Time"."Claim Date" <= TIMESTAMP '2013-01-31 00:00:00' THEN 1 ELSE 0 END)
The issue is I have other columns that need to query data as of the most recent File Date available. For that, I usually use this in the report filter section: SELECT MAX("CLOV - File Date"."File Date") FROM "VETSNET OPERATIONS REPORTS". this will pull the most recent date available.
What formula(s) do I need to use so I can have other columns pull the most recent data while the other column always uses the 31-Oct-2013 date?If you like to port the same logic in Analysis then that might be easy to do.
Not sure how to handle other column ie Claim without looking data, but try with a new metric max(File Date) and set the content level may be Year or as per requirement and use that column in the same expression
let us know updates -
Hello,
I am in need of some SQL help as I am not sure how to do it. I want to only return rows of data that meet the following criteria:
1) in tableA columnA it could have a value shown as such: A,B,1,2,3,5,8
2) in tableA columnB it shows one of the following four variables (Test1, Test2, Test3, Test4)
3) in tableA columnC it will show a date.
4) in tableB there is a row for each day of the year.
5) in tableB there is a column that matches each of the four variables in #2 above.
First it should match the date in tableA ColumnC to the row in tableB that matches. Then it should then find the column in tableB that matches to the value in tableA columnB. in that cell it will have a single value from A-D or 1-9. If it is an A for example, it will need to check against tableA columnA. if it has an A in it, it will return it. If it does not, it will not.
Does anyone have any idea how to write this? Is this possible?
Thank you,
JeffCheck the query using hardcoded values first - values taken from your explication
select x.idfield
from tablea x,
(select datedefinefield,
'VARIABLE4' the_variable,
case 'VARIABLE4' when 'VARIABLE1'
then variable1
when 'VARIABLE2'
then variable2
when 'VARIABLE3'
then variable3
when 'VARIABLE4'
then variable4
end the_value
from tableb
where datedefinefield = date '2013-01-01'
) y
where x.datefield = y.datedefinefield
and x.variablefield = y.the_variable
and instr(','||x.codefield||',',','||y.the_value||',') > 0
then replace the hardcoded values with bind variables
select x.idfield
from tablea x,
(select datedefinefield,
:the_variable the_variable,
case :the_variable when 'VARIABLE1'
then variable1
when 'VARIABLE2'
then variable2
when 'VARIABLE3'
then variable3
when 'VARIABLE4'
then variable4
end the_value
from tableb
where datedefinefield = to_date(:the_date,'yyyymmdd')
) y
where x.datefield = y.datedefinefield
and x.variablefield = y.the_variable
and instr(','||x.codefield||',',','||y.the_value||',') > 0
type the values in the window SQL Developer displays before execution to prompt you for bind variable values
VARIABLE4 for the_variable
20130101 for the_date
no quotes this time then hit the Apply ( not very sure that's the caption) button to start execution and you should get the same result as with hardcoded values.
If that works, you can start playing with (submitting values of your choice)
Regards
Etbin -
Audio recorded in a kitchen so it's very hard. Would like to soften and add some bottom to the voice. What filter would I use and settings?
Also see: http://www.kenstone.net/fcphomepage/basic_audio_filterguide.html
and
http://www.kenstone.net/fcphomepage/basic_audio_filter_guidept2.html -
Lost my Pin Marker & Parellel lines in Graduated Filter-HELP!
I'm a bit new to Lightroom and have suddenly lost the Pin marker icon and Parellel lines in the Graduated Filter tool.
What I have in it's place is a "cross" icon and no parellel lines...however it does perform the function but with little contro.
What do I do?That was it!
Thankyou so much, I thought I was going crazy and would have to reinstal it.
Nice when life works out so simply -
Reinstalled PS CS4 - deinterlace filter - help, please?
Hi, I had to wipe my hard drive and reinstall Leopard (I don't want to upgrade to Snow Leopard, please - have my personal reasons) b/c my hard drive was getting too full and thus running out of virtual memory space with the result that some of my applications (i.e. comic life deluxe) wasn't behaving right. Since I wiped the hard drive, reinstalled, reinstalled/activated my Photoshop CS 4 and just updated it to v11.0.2, after adding my Extract Plus plug in back in, and in the process of doing this I noticed a "deinterlace" filter/plug-in in my PS filter/plug in's folder, and I'd like to know - how do I make this filter active/show up when I'm editing photos and I click on "filters"?
Also, how exactly do I use this filter to deinterlace photos that have interlacing in them?
Thanks in advance.Check Image > Mode in the Menu Bar or the Document’s header (wher something like »Untitled-1 @ 100% (RGB/8)« may be written).
Certain Filters do not work on CMYK-images or bit-depths.
Changing CMYK to RGB is best done with Edit > Convert to Profile or, if you are certain the Working Spaces and other Color Settings are appropriate in this case, Image > Mode > RGB Color.
Maybe you are looking for
-
Production order Confirmation Error
Hi All, Need your help on a Issue we are facing. The user is trying to do confirmation using co11n. After entering the order number and operation the system is throwing the error below formula &1 for calculating work contains division by zero The &1
-
Problem with putting applications onto ipodtouch
my ipodtouch is synced with my dad's computer and so i cant put applications from my computer onto it. i am not allowed to delete the applications that he has already put on the ipod so i cant just sync it to my computer.
-
Hai Gurus, I have a report which gives all the requisitions with differrent status in the report based on Req. start date. In addition to this i got a requirement in the same report where user can enter date interval.. Based on the user date interval
-
Solaris 10 - impressions from a GNU/Linux user
Firstly, this isnt flame bait, honest! Until 10, I hadnt seen Solaris since rev6, then, I was worn (then) down by trying to configure a dial up model hacking chap scripts. Anyhow, I thought I'd look at Solaris 10, seeing as it was 'free' to play with
-
ABAP-HR - Payroll output to PDF conversion
Hi experts, I need to convert payslip (in HR-ABAP) to PDF. The payslip is desinged by HR FORM editor. Pls give me idea to do..... Regards, Murugan Arumugam