renderer

RowSorter not set in renderer

醉酒当歌 提交于 2019-12-12 02:53:43
问题 I implement icon for sorting column in my jTable. I have a button for find result and i implement a default sorting when i launch the worker. Like this : public void refreshStripedViewTable(final List<FlightBox> boxList, final List<FlightBoxModel> boxesModels, final String sortBy) { if (boxList != null && !boxList.isEmpty()) { stripedViewTableModel.setContent(boxesModels); tableRenderer.setStripedViewModelList(boxesModels); final RowSorter<? extends TableModel> sorter = tableFacade

Why does a JTable view update block the entire GUI?

我是研究僧i 提交于 2019-12-12 02:49:47
问题 I have a simple JTable, displaying many data (~1000 rows) with a complex custom cell renderer. It takes a little time to render this cells. During this time the entire GUI seems to be frozen. This can be seen, because a progress indicator is shown to the user. During data generation, it works normally. But if the JTable is triggered trough fireTableDataChanged to update its view, the progress indicator gets frozen. In the following little example, you should press on the button and see the

Custom renderer on a JTextField. Is it possible ?

送分小仙女□ 提交于 2019-12-12 02:46:22
问题 I need to create component that looks like JTextField (same borders, shadows, rounded corners etc) but for displaying some graphic with text. Is it possible to create something like renderer for a JTextField? Or Create custom component based on JPanel, but how to force it to looks same as JTextField Another complication is that application will be running on different LAF's changed on the fly. Do you have any ideas ? 回答1: No, Swing does not provide any DefaultTextFieldRenderer or

GraphStream graph not rendered corectly

前提是你 提交于 2019-12-12 02:28:08
问题 I have the following code while trying to display a graph in a form. For 3 nodes the code works well but after adding other nodes the graph is not showed entirely. I have no idea where the problem can be. public class Test{ public static void main(String args[]) throws IOException{ final DefaultGraph g = new DefaultGraph("my beautiful graph"); g.setStrict(false); Viewer viewer = new Viewer(g, Viewer.ThreadingModel.GRAPH_IN_GUI_THREAD); JFrame myJFrame = new JFrame(); myJFrame.setPreferredSize

Zend framework 2 loop through elements of element collection

夙愿已清 提交于 2019-12-12 02:20:13
问题 I created a collection of inputs with Zend\Form\Element\Collection, like $this->add([ 'type' => 'Zend\Form\Element\Collection', 'name' => 'some-name', 'options' => [ 'label' => 'some name', 'count' => 3, 'target_element' => [ 'type' => 'text', ], ], ]); This codes renders 3 inputs with label and fieldset if I use echo $this->formCollection($form->get('some-name')); (or the like of formCollection) in the view script. I want to wrap each input of the collection into divs. My idea is to iterate

SDL_Renderer won't show textures after passing through the function

大憨熊 提交于 2019-12-11 20:18:08
问题 I have a little problem with SDL_Renderer. I can't understand why it doesn't work. Let's look at this example, it works fine: bool running = true; SDL_Window* window = SDL_CreateWindow("ASDF", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, SDL_WINDOW_SHOWN); SDL_Renderer* renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED); SDL_Texture* texture = IMG_LoadTexture(renderer, "asdf.bmp"); SDL_Event event; while(running) { while(SDL_PollEvent(&event)) { switch(event

Images in Adobe Flex

社会主义新天地 提交于 2019-12-11 12:47:31
问题 Im very new to Adobe Flex/Actionscript and am trying to create a person search application. So far I have my results showing as a horizontal list, but Id like to include an image above each name as my wonderful paint skills show: /* listOfPeople is a list of arrays with a["name"] a["sex"] a["dob"] and a["image"] which is just a URI to the image */ <s:List width="100%" height="100%" id="results" dataProvider="{listOfPeople}" change="clickPerson(event)"> <s:itemRenderer> <fx:Component> <s

SDL2 Invalid Renderer

别来无恙 提交于 2019-12-11 08:57:08
问题 I believe I have an SDL2 bug here and I wanted some verification. When I create a renderer it is invalid and I cannot initialize SDL_ttf because of this. Here is a quick demo program that exhibits the issue on my xubuntu 14.04 distribution. My graphics card is an NVIDIA GTX 550 Ti. Driver version 331.113 proprietary, tested. #include <SDL2/SDL.h> #include <string> #include <stdexcept> #include <iostream> using namespace std; int main() { SDL_Window* _window; SDL_Renderer* _renderer; if( SDL

MapKit Rendering Issues

社会主义新天地 提交于 2019-12-11 08:02:23
问题 So I have an application that draws a polyline on the map depending on the speed of the user, but I have some issues with it. Firstly, sometimes a large amount of the line is one colour even though given speed variations it should be changing. Secondly, if the user moves the map around or zooms, then the whole line goes red. And finally, I get this weird dot that looks like it is something to do with rendering? http://imgur.com/a/o5AKf Pretty new to programming so it might be really obvious!

Creating an area graph below a XYDifference(Renderer) graph

亡梦爱人 提交于 2019-12-11 05:28:50
问题 I have been trying for the last week to find a way to make JFreeChart display something similar to the image below. Basically you are looking at three series (upper, middle, lower) with a fill inbetween. And underneath there is a (light green) fill color, or an area chart as some would perhaps call it - no meaning, just for looks. The only thing really missing from what I have come up with is the last part: the fill underneath / area chart: I even tried to subclass XYDifferenceRenderer and