Thread: [Jsmooth-cvs] jsmooth/src/net/charabia/jsmoothgen/application/gui/skeleditors ImageSelectorEditor.
Status: Beta
Brought to you by:
reyes
From: Rodrigo R. <re...@us...> - 2007-05-27 09:15:55
|
Update of /cvsroot/jsmooth/jsmooth/src/net/charabia/jsmoothgen/application/gui/skeleditors In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv14961/src/net/charabia/jsmoothgen/application/gui/skeleditors Modified Files: SkelPropEditor.java Added Files: ImageSelectorEditor.java Log Message: adds support for the splash screen in the jsmooth application --- NEW FILE: ImageSelectorEditor.java --- /* JSmooth: a VM wrapper toolkit for Windows Copyright (C) 2003-2007 Rodrigo Reyes <re...@ch...> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package net.charabia.jsmoothgen.application.gui.skeleditors; import javax.swing.*; import javax.swing.event.*; import javax.swing.text.*; import java.util.*; import java.awt.event.*; import net.charabia.jsmoothgen.application.gui.util.*; import java.io.*; public class ImageSelectorEditor extends SkelPropEditor { protected FileSelectionTextField m_comp = new FileSelectionTextField(); public ImageSelectorEditor() { GenericFileFilter gff = new GenericFileFilter("Image"); gff.addSuffix("gif"); gff.addSuffix("png"); gff.addSuffix("jpg"); gff.addSuffix("bmp"); m_comp.setFileFilter(gff); } public java.awt.Component getGUI() { return m_comp; } public void valueChanged(String val) { m_comp.setFile(new File(val)); } public boolean labelAtLeft() { return true; } public void set(String o) { m_comp.setFile(new File(o.toString())); } public String get() { if (m_comp.getFile()!=null) return m_comp.getFile().toString(); return "";} public void setBaseDir(java.io.File base) { m_comp.setBaseDir(base); } public boolean isLocalFile() { return true; } } Index: SkelPropEditor.java =================================================================== RCS file: /cvsroot/jsmooth/jsmooth/src/net/charabia/jsmoothgen/application/gui/skeleditors/SkelPropEditor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SkelPropEditor.java 27 Mar 2007 20:21:02 -0000 1.1 --- SkelPropEditor.java 27 May 2007 09:15:48 -0000 1.2 *************** *** 1,66 **** ! /* ! JSmooth: a VM wrapper toolkit for Windows ! Copyright (C) 2003-2007 Rodrigo Reyes <re...@ch...> ! ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2 of the License, or ! (at your option) any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ! ! */ ! ! package net.charabia.jsmoothgen.application.gui.skeleditors; ! ! import net.charabia.jsmoothgen.skeleton.*; ! import net.charabia.jsmoothgen.application.*; ! import net.charabia.jsmoothgen.application.gui.*; ! import net.charabia.jsmoothgen.application.gui.util.*; ! ! import net.charabia.jsmoothgen.skeleton.*; ! ! abstract public class SkelPropEditor ! { ! protected SkeletonProperty m_property; ! ! public void bind(SkeletonProperty prop) ! { ! m_property = prop; ! } ! ! public String getIdName() ! { ! return m_property.getIdName(); ! } ! ! ! public boolean labelAtLeft() ! { ! return true; ! } ! ! public abstract java.awt.Component getGUI(); ! public abstract void valueChanged(String val); ! ! public abstract void set(String o); ! public abstract String get(); ! // { ! // System.out.println("setvalue of " + o + " on " + m_property); ! // m_property.setValue(o.toString()); ! // } ! ! // { ! // System.out.println("getvalue from " + m_property + "=" + m_property.getValue()); ! // return m_property.getValue(); ! // } ! ! } ! --- 1,65 ---- ! /* ! JSmooth: a VM wrapper toolkit for Windows ! Copyright (C) 2003-2007 Rodrigo Reyes <re...@ch...> ! ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2 of the License, or ! (at your option) any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ! ! */ ! ! package net.charabia.jsmoothgen.application.gui.skeleditors; ! ! import net.charabia.jsmoothgen.skeleton.*; ! import net.charabia.jsmoothgen.application.*; ! import net.charabia.jsmoothgen.application.gui.*; ! import net.charabia.jsmoothgen.application.gui.util.*; ! ! import net.charabia.jsmoothgen.skeleton.*; ! ! abstract public class SkelPropEditor ! { ! protected SkeletonProperty m_property; ! ! public void bind(SkeletonProperty prop) ! { ! m_property = prop; ! } ! ! public String getIdName() ! { ! return m_property.getIdName(); ! } ! ! public boolean labelAtLeft() ! { ! return true; ! } ! ! public abstract java.awt.Component getGUI(); ! public abstract void valueChanged(String val); ! ! public abstract void set(String o); ! public abstract String get(); ! ! public void setBaseDir(java.io.File base) ! { ! } ! ! public boolean isLocalFile() ! { ! return false; ! } ! ! } ! |