Results 1 to 4 of 4
  1. #1
    WACman is offline Member
    Join Date
    Nov 2010
    Posts
    7
    Rep Power
    0

    Default Using Protected Methods, in a Java Library

    Hey, there are a set of java image processing classes I want to use.
    It is a library online... "JHLabs Java Image processing"...

    Download Java Image Processing Classes

    The java docs are here...
    com.jhlabs.image


    For example the class EdgeFilter ... I cant use because the the method that actually does the Edge filtering is a protected method

    ...
    protected int[] filterPixels( int width, int height, int[] inPixels, Rectangle transformedSpace )
    ....

    Same with ErodeFilter etc.. I can make instances of these classes but I cant use its actual necessary function.
    That is same with all the image classes that I want to use.


    Is there anything I am missing... How can I possibly use this library of classes with the netbeans project that I am doing. (I have imported the jar file library this comes with)


    Thanks in advance.

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    7

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,015
    Rep Power
    20

    Default

    Have you read their docs?
    I expect you pass one of these filters into some other part of the code that then actually makes the calls.

    In fact (and it's not my area) but that's how BufferedImageOps work, and that seems to be what these are.

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,535
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by Tolls View Post
    Have you read their docs?
    Of course not; documents only exist to be ignored; if those stupid authors want to type their fingers off, let them but ignore their documentation. The documentation is worthless anyway, i.e. it never spoonfeeds you, it requires reading and, as everybody knows, reading make your eyeballs hurt.

    kind regards,

    Jos ;-)
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Protected access modifier in Java
    By bluepratz in forum New To Java
    Replies: 6
    Last Post: 08-04-2010, 10:08 AM
  2. Replies: 2
    Last Post: 03-23-2010, 04:46 AM
  3. Ask for help on Java access to protected methods
    By fangzhong in forum Advanced Java
    Replies: 3
    Last Post: 02-17-2009, 01:50 PM
  4. Replies: 5
    Last Post: 01-24-2008, 11:53 PM
  5. Loading a library (for native methods)
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-23-2007, 07:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •