What Cell,Table can I use to create a grid of only images in every cell, in GWT? - css

I need to create a GWT application that handle the buying of films. So I have to show in a grid (not in a list, I don't like the view) these cell containing image and info about the film like this:( http://static.ipaditalia.com/wp-content/uploads/2012/11/mzl.sckskoqz.480x480-75.jpg ). I think that I need of a grid showing I think, to obtain something like but I wouldn't know to start. thanks for help!

You can use a simple FlowPanel as a container, and add each image with a float set to "left".
Alternatively, you can use a flex-box model with flex-flow: row wrap on a container.
You don't need any widgets for this. This is simple CSS, and it will give you the best performance and the smallest code size.

Related

AEM Grid - How to add spacing between columns in AEM grid

We are on 6.5.3. Like in CSS/bootstrap, there is a property to add the spacing between grid columns. I would like to know if there is any way to achieve this in AEM Grid? We need to add some gaps to ensure content doesn't stick together when content is placed inside the column grids. Modifying the grid.less is an option that we are thinking of as last resort, but we would like to check if there is a declarative way from the AEM grid, for example specifying the spacing in some property.
There is no property for padding/margin in AEM grids by default, this is the reason we have grid.less file in place OOTB. But,you can edit and add a property in your templates for that.
Although, this is not the best approach
If you want to add default spacing in all the grids, you have to do it in grid.less.
This would be even worse, as these changes would be global
A Better Approach
I would suggest to create a spacer component instead of adding a default padding in all grids. That way, when you don't want padding in your grids you wouldn't get stuck again.
Content Authors can just add a spacer component(or multiple) in between different components depending upon the size of padding/margin you need.
Customizing AEM Grid

How to remove padding created by ResponsiveGridLayout control in OpenUI5 (SAPUI5)?

I am creating a form using OpenUI5 and I noticed that when I am using the ResponsiveGridLayout layout, the form gets some padding (blue area around the input fields). Please see result here:
http://plnkr.co/edit/G4NrKPMGdN4DACXZgZOg?p=preview
If I am using the GridLayout layout, the padding is as expected:
http://plnkr.co/edit/Yp6Ul7gLDf0t88vMWrWD?p=preview
Any idea how I can get a form with very a small padding (like in GridLayout example), but in the same time I want to be able to use the 12-column grid system so I can set the size on my input fields?
Ideally, the views need to be XML and to use OpenUI5 classes/controls if possible.
You could just swap the responsible style classes using .addStyleClass() and .removeStyleClass().
Not sure if it works, but thats the easiest possible fix I can think of that might be worth a try.

The usage of block grid and reason of its existence in Foundation5

I recently found Foundation5 has Block Grid which has rarely found use case online anywhere to demostrate the importance of using it... or is it even a great function to have? Because I am currently using Bootstrap3 and found it does not have Block Grid. So I wonder if its really a big feature one should watch out for.
Maybe some critical user case that will be so much better to use Block Grid other than Column based Grid.
Thanks!
There are several differences between the block grid and regular column grid..
The block grid is always evenly spaced and distributed
The block grid requires less markup
The block grid doesn't have inner padding
Take a look at this demo: http://codeply.com/go/XiyFxtMcXT, and you'll see the differences. Notice how the block-grid evenly wraps the items when the items exceed one row.
Block grids give you a way to evenly split contents of a list within the grid. If you wanted to create a row of five images or paragraphs that need to stay evenly spaced no matter the screen size, the block grid is for you.
You could just as easily use a percentage based grid system to achieve the same result.
I think the benefit of the 'block grid' is:
Items are displayed in a 'ul' which will group them together (good, for accessibility).
It's quicker to add one style to a 'ul' that will automatically make each 'li' a 'column' than it is to add "col-x" to each 'li' manually
They've already built it so you don't need to.

Can I use a table view for a table containing many images?

I have a table view in PyQt that needs to have an image in every cell.
I have used delegation of a label (and added a pixmap to that label). But the problem is when I add 12 cells (12 images of size 60x30 pixels), the table becomes too slow, and I need to have a table that contains hundreds of images. Should I be using another delegation? Or is it just not doable with a table view? If so, what is the best widget for such a task?
Any answer for Qt or PyQt would be highly appreciated.
I think you should try using QGraphicsView for your purpose. Its much faster to render images on it.
One clever way to do is created a huge graphicsitem which mimics a table based on ur rows and columns count.
then add children graphicsrectitem item as each cell container.
lastly add the images as qgraphicspixmap item as children of the rectitem. this way u can make it quicker and also interactive since u can select them individually and also make them movable inside the cell by user by checking collision detection to make sure they are not pulled outside the cell boundary.
hope that provides u an alternative.
QListView provides an icon mode where you can stack your images in a grid.

Flex component like a multi-selectable Accordion?

I'm looking for a component like a single-generation treeview that can collapse a section or expand any or all sections, but it would look like an Accordion: headings and canvas "pages".
Obviously, each page would not take up the entire height of the container; they would be fixed height.
Perhaps I am not using the correct terminology (and hence the wrong search terms).
All suggestions are welcome.
You could try a VBox with multiple WindowShade components from the flexlib library, like in this example. You'd need to tweak the styles so it looks more accordian-like though.

Resources