Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #36775

Re: Eclipse

From Martin Gregorie <martin@address-in-sig.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Eclipse
Date 2017-06-30 13:02 +0000
Organization A noiseless patient Spider
Message-ID <oj5i54$7ak$1@dont-email.me> (permalink)
References (5 earlier) <7dff7a25-5881-4ecb-a937-ab076082dfcd@googlegroups.com> <oj3ik3$c4n$1@dont-email.me> <6238fdf1-4903-43cd-bc84-088730d15903@googlegroups.com> <oj3rik$c6a$1@dont-email.me> <34a2b6b0-b98c-4e9b-8256-dcc627d7d1b6@googlegroups.com>

Show all headers | View raw


On Fri, 30 Jun 2017 04:55:18 -0700, Eric Douglas wrote:

> On Thursday, June 29, 2017 at 5:35:03 PM UTC-4, Martin Gregorie wrote:
>> Would it help to do something like declaring a MyClass that extends
>> Component and implements MyCustomInterface and that is passed the
>> JTextField, etc as constructor argument? At least this should avoid
>> your casting problem.
>> 
>> 
> It seems that could work.  Instead of making an array of objects that
> implement an interface that Eclipse is uncertain if they may be
> components, I just make an array of component wrappers.
> public class ComponentWrapper extends Component implements
> MyCustomInterface{
>  final MyCustomInterface wrapped;
>  public ComponentWrapper(final MyCustomInterface arg){
>   wrapped = arg;
>  }
>  public void interfaceMethod(){
>   wrapped.interfaceMethod();
>  }
> }

Yep. If a minimal version, i.e. with as little code as possible inside 
it, lets you compile your TableModel extension without complaint it's 
likely you've cracked it.


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Eclipse Eric Douglas <e.d.programmer@gmail.com> - 2017-06-28 07:57 -0700
  Re: Eclipse Eric Douglas <e.d.programmer@gmail.com> - 2017-06-28 09:04 -0700
    Re: Eclipse Eric Douglas <e.d.programmer@gmail.com> - 2017-06-28 12:07 -0700
      Re: Eclipse Eric Douglas <e.d.programmer@gmail.com> - 2017-06-29 06:05 -0700
        Re: Eclipse Jerry Stuckle <jstucklex@attglobal.net> - 2017-06-29 09:32 -0400
          Re: Eclipse Eric Douglas <e.d.programmer@gmail.com> - 2017-06-29 06:42 -0700
        Re: Eclipse Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-06-29 09:47 -0400
          Re: Eclipse Andreas Leitgeb <avl@logic.at> - 2017-06-30 14:47 +0000
            Re: Eclipse Eric Douglas <e.d.programmer@gmail.com> - 2017-06-30 08:22 -0700
              Re: Eclipse Eric Douglas <e.d.programmer@gmail.com> - 2017-07-07 06:19 -0700
                Re: Eclipse Andreas Leitgeb <avl@logic.at> - 2017-07-13 09:29 +0000
        Re: Eclipse Martin Gregorie <martin@address-in-sig.invalid> - 2017-06-29 17:18 +0000
          Re: Eclipse Eric Douglas <e.d.programmer@gmail.com> - 2017-06-29 11:08 -0700
            Re: Eclipse Martin Gregorie <martin@address-in-sig.invalid> - 2017-06-29 18:58 +0000
              Re: Eclipse Eric Douglas <e.d.programmer@gmail.com> - 2017-06-29 12:55 -0700
                Re: Eclipse Martin Gregorie <martin@address-in-sig.invalid> - 2017-06-29 21:31 +0000
                Re: Eclipse Eric Douglas <e.d.programmer@gmail.com> - 2017-06-30 04:55 -0700
                Re: Eclipse Martin Gregorie <martin@address-in-sig.invalid> - 2017-06-30 13:02 +0000
              Re: Eclipse Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-06-29 16:34 -0400
                Re: Eclipse Eric Douglas <e.d.programmer@gmail.com> - 2017-06-29 13:49 -0700
                Re: Eclipse Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-06-29 18:16 -0400
  Re: Eclipse Arne Vajhøj <arne@vajhoej.dk> - 2017-07-02 11:56 -0400

csiph-web