Code Monkey home page Code Monkey logo

Comments (6)

magreenblatt avatar magreenblatt commented on August 16, 2024

Original comment by Anonymous.


Comment 1. originally posted by christophe.cornu on 2014-03-14T14:41:07.000Z:

Thanks for all this JCEF/CEF work and publishing this document about future intentions.

I would like CefBrowser to behave as much like a normal Java UI control as possible. It should encapsulate the canvas implementation and expose control-like functionality. Maybe we can identify an existing Java UI control to use as a model for the interface? For example, it would be cool if it extended Component (or similar) so that users could subclass it and override functionality like preferred size, etc.
What you and Kai say are both true. Why not giving the end-user a widget class that extends java.awt.Container? Internally, the Container will be filled with a Canvas or GLCanvas based on the osr value. Canvas/GLCanvas is an implementation detail of no particular interest to the end-user. Container is more generic and allow us to decide what to use internally. Since it's a Container, user can still treat this widget pretty much like a regular AWT widget.
I know we're talking about AWT and Swing here. This approach is similar to how the org.eclipse.swt.Browser widget is structured - it extends Composite (sort of Container equivalent in AWT) which gives users a generic way to deal with it while making us free to implement it however we need it to be. I was the original committer/creator of the SWT Browser widget so I certainly have a bias :-)

e.g.

public class ChromiumBrowser extends Container {

public ChromiumBrowser(Window parent, boolean osr) {
...
cefClient = new CefClient(clientDelegate, false, osr);
Canvas canvas = cefClient.getCanvas();
setLayout(new BorderLayout());
add(canvas, BorderLayout.CENTER);
...
}
.. other APIs to access CEF functionality
}

Thanks for any feedback, and great work pushing this out. The native window rendering mode is so impressive by its performance.

from java-cef.

magreenblatt avatar magreenblatt commented on August 16, 2024

Comment 2. originally posted by magreenblatt on 2014-03-28T10:05:04.000Z:

from java-cef.

magreenblatt avatar magreenblatt commented on August 16, 2024

Comment 3. originally posted by magreenblatt on 2014-05-23T18:31:26.000Z:

from java-cef.

magreenblatt avatar magreenblatt commented on August 16, 2024

Comment 4. originally posted by magreenblatt on 2014-05-23T18:31:53.000Z:

from java-cef.

magreenblatt avatar magreenblatt commented on August 16, 2024

Comment 5. originally posted by magreenblatt on 2014-06-17T17:36:50.000Z:

All sub-issues are now complete.

from java-cef.

magreenblatt avatar magreenblatt commented on August 16, 2024
  • set state to "resolved"

from java-cef.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.