Coder Social home page Coder Social logo

jacp's Issues

Initial List in Perspective and Workbench

I try setup Workbench and Perspective with Java Configuration of Spring.
I find that the Perspectives Property of Workbench not be initialized.
for example.
@Bean // name will be Method Name
  public DietWorkbench dietWorkbench() {
    DietWorkbench wb=new DietWorkbench();
    List<IPerspective<EventHandler<Event>, Event, Object>> list=new ArrayList<>();
    list.add(creditCardPerspective());
    wb.setPerspectives(list);
    return wb;
  }
if Perspectives is initialized by List then the code can easy to read.
@Bean // name will be Method Name
  public DietWorkbench dietWorkbench() {
    DietWorkbench wb=new DietWorkbench();
     wb.getPerpectives().add(creditCardPerspective());
    return wb;
  }

The same problem for SubComponents Property of Perspective.


Original issue reported on code.google.com by [email protected] on 21 Apr 2012 at 11:38

save current target id before handle

When target is changed outside the handle method (in an action) all information 
about original 
target get lost.
Example: 

button.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(final ActionEvent e) {

                    final IActionListener<ActionListener, ActionEvent, Object> listener = 
getActionListener();
                    setTarget("id02.editor");
                    listener.getAction().setMessage("my_message");
                    listener.getListener().actionPerformed(e);


            }
        });

The action handling currently saves the target in an local variable, handles 
the method and than 
compares old and new value. The code above leads to an state that can cause 
problems. 

If each current target would be saved in an global variable outside the 
component no 
misbehavior can occur.

Original issue reported on code.google.com by [email protected] on 21 May 2010 at 3:59

Synchronisation issue in message notify mechanism

all message notification run in EventDispatch thread  (Listener->observer); 
when fire two equal and long running messages to same component, the second 
message blocks when handled in observer. Solution: run action handling in 
separate threads.

See ASwingObserver:

@Override
    public synchronized void handle(final IAction<ActionEvent, Object> action) {
        final Map<String, Object> messages = action.getMessageList();
        for (final String targetId : messages.keySet()) {
            log(" handle message to: " + targetId);
            handleMessage(targetId, action);
        }

    }

Original issue reported on code.google.com by [email protected] on 16 Jun 2010 at 9:14

NullPointException when not setWorkbenchXYSize()

if not setWorkbenchXYSize() in handleInitialLayout() method of Workbench,
will  cause NullPointerException. 
I think that there should are some default value.

java.lang.NullPointerException
    at org.jacp.javafx.rcp.workbench.AFXWorkbench.setBasicLayout(AFXWorkbench.java:330)
    at org.jacp.javafx.rcp.workbench.AFXWorkbench.start(AFXWorkbench.java:124)
    at org.jacp.project.launcher.AFX2SpringLauncher.start(AFX2SpringLauncher.java:50)
    at com.sun.javafx.application.LauncherImpl$5.run(Unknown Source)
    at com.sun.javafx.application.PlatformImpl$4.run(Unknown Source)
    at com.sun.javafx.application.PlatformImpl$3.run(Unknown Source)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.access$100(Unknown Source)
    at com.sun.glass.ui.win.WinApplication$2$1.run(Unknown Source)

Original issue reported on code.google.com by [email protected] on 20 Apr 2012 at 4:40

save current target id before handle

When target is changed outside the handle method (in an action) all information 
about original 
target get lost.
Example: 

button.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(final ActionEvent e) {

                    final IActionListener<ActionListener, ActionEvent, Object> listener = 
getActionListener();
                    setTarget("id02.editor");
                    listener.getAction().setMessage("my_message");
                    listener.getListener().actionPerformed(e);


            }
        });

The action handling currently saves the target in an local variable, handles 
the method and than 
compares old and new value. The code above leads to an state that can cause 
problems. 

If each current target would be saved in an global variable outside the 
component no 
misbehavior can occur.

Original issue reported on code.google.com by [email protected] on 21 May 2010 at 3:59

Exception when minimize perspectives in window mode

What steps will reproduce the problem?
1. create workspace in window mode
2. add one ore more perspectives
3. minimize perspective window
4. exception occurs

Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: 
cannot add to 
layout: constraint must be a string (or null)
    at java.awt.BorderLayout.addLayoutComponent(BorderLayout.java:409)
    at java.awt.Container.addImpl(Container.java:1074)
    at javax.swing.JLayeredPane.addImpl(JLayeredPane.java:212)
    at javax.swing.JDesktopPane.addImpl(JDesktopPane.java:470)
    at java.awt.Container.add(Container.java:927)
    at com.apple.laf.AquaInternalFramePaneUI.getDock(AquaInternalFramePaneUI.java:76)
    at 
com.apple.laf.AquaInternalFramePaneUI$AquaDockingDesktopManager.addIcon(AquaInte
rnalFra
mePaneUI.java:205)
    at 
com.apple.laf.AquaInternalFrameManager.iconifyFrame(AquaInternalFrameManager.jav
a:92)
    at 
com.apple.laf.AquaInternalFramePaneUI$AquaDockingDesktopManager.iconifyFrame(Aqu
aInterna
lFramePaneUI.java:200)
    at javax.swing.plaf.basic.BasicInternalFrameUI.iconifyFrame(BasicInternalFrameUI.java:576)
    at 
javax.swing.plaf.basic.BasicInternalFrameUI$Handler.propertyChange(BasicInternal
FrameUI.java:1
414)
    at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
    at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
    at java.awt.Component.firePropertyChange(Component.java:8213)
    at javax.swing.JInternalFrame.setIcon(JInternalFrame.java:930)
    at 
com.apple.laf.AquaInternalFrameBorder.doButtonAction(AquaInternalFrameBorder.jav
a:279)
    at 
com.apple.laf.AquaInternalFrameUI$AquaBorderListener.mouseReleased(AquaInternalF
rameUI.jav
a:405)
    at java.awt.Component.processMouseEvent(Component.java:6348)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3255)
    at java.awt.Component.processEvent(Component.java:6113)
    at java.awt.Container.processEvent(Container.java:2085)
    at java.awt.Component.dispatchEventImpl(Component.java:4714)
    at java.awt.Container.dispatchEventImpl(Container.java:2143)
    at java.awt.Component.dispatchEvent(Component.java:4544)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4618)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4282)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
    at java.awt.Container.dispatchEventImpl(Container.java:2129)
    at java.awt.Window.dispatchEventImpl(Window.java:2475)
    at java.awt.Component.dispatchEvent(Component.java:4544)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)


Expected: minimized perspective icon.


Original issue reported on code.google.com by [email protected] on 15 May 2010 at 9:15

Cannot remove button from JACPToolBar

I add add a button in @OnStart function.
  @OnStart
  public void onStartComponent(final FXComponentLayout layout) {
    JACPToolBar topbar = layout.getRegisteredToolBar(ToolbarPosition.NORTH);
    topbar.add(cardButton);
  }

then I remove the button in @OnTearDown
  @OnTearDown
  public void onTearDownComponent(final FXComponentLayout layout) {
    JACPToolBar topbar = layout.getRegisteredToolBar(ToolbarPosition.NORTH);
    topbar.getItems().remove(cardButton);
  }

I can't remove the button from JACPToolBar with getItems().remove(), because 
the button in fact is in the HBox or VBox inside ToolBar.


I suggest the JACPToolbar should add the methods remove() and removeOnEnd() 
like add() and addOnEnd()ใ€‚


Original issue reported on code.google.com by [email protected] on 8 May 2012 at 3:55

Refresh return value of ui component!

When new swing components are added to swing component which is the return 
value of your component the sometimes are not displayed. Refresh return value 
after handling!!

Original issue reported on code.google.com by [email protected] on 20 Jul 2010 at 7:57

Synchronisation problem when component moving to different target

Problem: one components and two (ore more) perspectives; first message creates 
an long running task where result has same target id, second message gives a 
command to move component to an other perspective and third message creates the 
same long running task as message one;

Result:long running task finishes, second message moves component and third 
message creates an result where component is again in first perspective BUT 
component is registered in perspective 2 !!

Original issue reported on code.google.com by [email protected] on 10 Jun 2010 at 9:01

Lockups whaen synchronizing on component

The perspective Method "handleAndReplaceSubcomponent" is used to prepare 
component and to start an execution thread or delegate to queue of running 
execution thread. Synchronizing on "action" is save but not very fast. If 
synchronizing "component" execution speed up 30x times but often locks! Why?

Original issue reported on code.google.com by [email protected] on 6 Jul 2010 at 9:42

Enhance ObserverThreads

Problem:
at the moment we have a 1 to 1 hierarchy between perspective and observer and a 
1 to n relation between observer an components; all messages are added to 
blocking queue of observers so all components in one perspective can handle 
their messages sequential! The good thing is that perspective methods do not 
have to be synchronized because only one observer thread per perspective is 
accessing the methods. To avoid sequential handling of messages every component 
need his own observer thread (1 to 1) so perspective has to handle as much 
observers as active components! To achieve this goal we have to do following 
things:

1. create an observer pool which creates an observer per component
2. when new component is registered all observers have to be notified
3. when component is unregisterd all observers have to be notified and 
associated observer thread have to be stopped!
4. Perspective methods are now NOT thread save
4.1 synchronize it ?!?
4.2 create for each task (methods like delegate, replace, add) one deamon 
thread with a pool so every observer is placing his tasks in an special pool

Original issue reported on code.google.com by [email protected] on 3 Aug 2010 at 6:42

Dynamic Set of Language

Hello, I would like to set the "localeID" dynamic. I read the favored language 
from the DB. I don't want to set it hard coded via annotiations, so I tried to 
set it in the constructor with "this.setLocaleID(language.getLocale)" but I get 
an "UnsupportedOperationException: Do Not Set document manually". Any idea to 
solve this problem?

Original issue reported on code.google.com by [email protected] on 12 Nov 2012 at 10:35

Syncronisation in SWING-Thread Error

Synchronisation issue in Comonent replace worker:

inconsistent handling of component replacement! Replacement is not handled in 
Swing-Thread

Exception in thread "AWT-EventQueue-0" 
java.lang.ArrayIndexOutOfBoundsException: 2 >= 1
    at java.util.Vector.elementAt(Vector.java:427)
    at javax.swing.JTabbedPane.getComponentAt(JTabbedPane.java:1203)
    at com.apple.laf.AquaTabbedPaneCopyFromBasicUI$TabbedPaneLayout.layoutContainer(AquaTabbedPaneCopyFromBasicUI.java:2241)
    at java.awt.Container.layout(Container.java:1421)
    at java.awt.Container.doLayout(Container.java:1410)
    at java.awt.Container.validateTree(Container.java:1507)
    at java.awt.Container.validateTree(Container.java:1513)
    at java.awt.Container.validateTree(Container.java:1513)
    at java.awt.Container.validate(Container.java:1480)
    at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:669)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:124)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Exception in thread "AWT-EventQueue-0" 
java.lang.ArrayIndexOutOfBoundsException: 2 >= 1
    at java.util.Vector.elementAt(Vector.java:427)
    at javax.swing.JTabbedPane.getComponentAt(JTabbedPane.java:1203)
    at com.apple.laf.AquaTabbedPaneCopyFromBasicUI$TabbedPaneLayout.layoutContainer(AquaTabbedPaneCopyFromBasicUI.java:2241)
    at java.awt.Container.layout(Container.java:1421)
    at java.awt.Container.doLayout(Container.java:1410)
    at java.awt.Container.validateTree(Container.java:1507)
    at java.awt.Container.validate(Container.java:1480)
    at com.apple.laf.AquaTabbedPaneCopyFromBasicUI.ensureCurrentLayout(AquaTabbedPaneCopyFromBasicUI.java:1316)
    at com.apple.laf.AquaTabbedPaneUI.paint(AquaTabbedPaneUI.java:110)
    at javax.swing.plaf.ComponentUI.update(ComponentUI.java:153)
    at javax.swing.JComponent.paintComponent(JComponent.java:752)
    at javax.swing.JComponent.paint(JComponent.java:1029)
    at javax.swing.JComponent.paintChildren(JComponent.java:862)
    at javax.swing.JComponent.paint(JComponent.java:1038)
    at javax.swing.JViewport.paint(JViewport.java:747)
    at javax.swing.JComponent._paintImmediately(JComponent.java:5098)
    at javax.swing.JComponent.paintImmediately(JComponent.java:4882)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:811)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:713)
    at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:693)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:125)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Original issue reported on code.google.com by [email protected] on 10 Jun 2010 at 5:32

implement subcomponent menu handling

Menu entries for subcomponents are not implemented yet. While bar entries are 
always handled by workbench all menu entries of a subcomponent are handled by 
parent perspective.... perspectiveMenu-->subComponentMenu

Original issue reported on code.google.com by [email protected] on 17 Nov 2010 at 10:17

check duplicate children added in AFXComponentWorker

For handleAdd() in AFXComponentWorker, I suggest should check "duplicate 
children add" to prevent Runtime Exception. Such as addComponentByType() in 
FXWorkbenchHander does. 

    private void handleAdd(final Node validContainer, final Node uiComponent,
            final String name) {
        if (validContainer != null && uiComponent != null) {
            this.handleViewState(uiComponent, true);
            final ObservableList<Node> children = FXUtil
                    .getChildren(validContainer);
            children.add(uiComponent); // some time will Throw  "duplicate children add" Exception
        }

    }

Original issue reported on code.google.com by [email protected] on 9 May 2012 at 6:18

Change behaviour of bar handling in subcomponents

Problem: at the moment every subcomponent gets a Map<Layout,Component> injected 
containing all declared bars in workbench. If no bar is declared a NullPointer 
can occurred and you always have to look which type of bar is declared. Next 
big problem is that the API can not differ which entry was set by which 
subcomponent! Better way is to inject an empty map where you can register your 
bar entries (see component registration in perspectives)  for each component. 
When you switch from one Perspective or component to an other the API can add 
and remove bar entries dynamic.

Original issue reported on code.google.com by [email protected] on 23 Nov 2010 at 4:57

correct id handling

At the moment the id pattern (for messages and target change) is:   *id* - 
local massage and *id.id* for messages to components or containers in other 
perspectives: if *id.id* mean local message in current perspective messaging 
fails! So make it more robust and allow *id* AND *myLocalPerspective.id*... 
always check if id is local. At the moment means *id.id* message to remote 
component. Change behavior in component and perspective observer.

Original issue reported on code.google.com by [email protected] on 1 Jun 2010 at 6:45

Target change in single_Pain mode faild

When changing target of component from one perspective to an other, the 
component is put correctly to perspective but never will be visible. In  Window 
Pain mode everything appears to be normal.

Add component to perspective 1, then create button to move component to 
perspective 2.

Original issue reported on code.google.com by [email protected] on 25 May 2010 at 8:02

Wrong blocking of components

Where the error occurs:

- when using performance demo in perspective3 ("send message to bg component")

what happen:

- when pressing the button in component A a message to is send to component A 
to start messaging to component B (running component A in thread). After a 
while no messages are send and logging indicates that message is send to queue. 
This should only happen when component is blocked an running in a thread but 
the component isnt't running!

Original issue reported on code.google.com by [email protected] on 20 Jul 2010 at 7:54

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.