Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

java - Scrollable JPanel in JTable cell -


i want create custom cell in jtable. used custom renderer , returned jpanel object. works there 1 problem. while program running jpanel draws on using paintcomponent() method. on each "tick" (usually each 100ms) panel getting wider (im drawing kind of graph) , when becomes big rest hidden. id resize , create scrollbar. tried several ways of putting scrollpane none of them worked. basically, want thread view in java visualvm. ideas?

it hard work put scroll pane inside ordinary table cell, because 1 component used render cells in table. may remove jtable , put large set of components in ordinary jpanel grid layout?

if still want use jtable:

every scroll pane contain special jviewport control. jviewport control scrolling work, , jsrollpane layout scroll bars. because single viewport used cells, must store somewhere viewport scroll position , restore every painting cell (on getcellrenderer method). jsrollpane need heavy layout work slow solution.

may preferable solution: override jpane cell renderer paint method, , paint method must create sub-graphics (graphics.create() ) proper scroll offset. scroll offset data must stored somewhere (in table model example). when user click on cell, jtable begin cell editing, , install cell editor. must special cell editor, contains scroll pane itself. user scroll control (none special support required) , went finished cell editing must save scroll position model (in stopcellediting() function). cell rendered paint , in paint method content scroll offset model. user see scrolled cell. can put jscrollbar inside cell rendered, user can see scroll position (but need special support). can use jviewport pain work, in control hard understanding. not see troubles wit use scroll pant in cell editor, must work. in way huge work.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -